diff --git a/corrlib/cli.py b/corrlib/cli.py index 5ceb5e3..f205026 100644 --- a/corrlib/cli.py +++ b/corrlib/cli.py @@ -9,7 +9,6 @@ from .main import update_aliases from .meas_io import drop_cache as mio_drop_cache from .meas_io import load_record as mio_load_record import os -from pyerrors import Corr from importlib.metadata import version @@ -121,14 +120,12 @@ def stat( "--dataset", "-d", ), - record_id: str = typer.Argument(), + record: str = typer.Argument(), ) -> None: """ Show the statistics of a given record. """ - record = mio_load_record(path, record_id) - if isinstance(record, Corr): - record = record[0] + record = mio_load_record(path, record)[0] statistics = record.idl print(statistics) return diff --git a/corrlib/tracker.py b/corrlib/tracker.py index e535b03..5cc281c 100644 --- a/corrlib/tracker.py +++ b/corrlib/tracker.py @@ -114,7 +114,7 @@ def unlock(path: str, file: str) -> None: """ tracker = get_tracker(path) if tracker == 'datalad': - dl.unlock(os.path.join(path, file), dataset=path) + dl.unlock(file, dataset=path) elif tracker == 'None': Warning("Tracker 'None' does not implement unlock.") pass