Compare commits

..

2 commits

Author SHA1 Message Date
b51a69bc69
fix file unlock
Some checks failed
Mypy / mypy (push) Failing after 45s
Pytest / pytest (3.12) (push) Failing after 2s
Pytest / pytest (3.13) (push) Failing after 2s
Pytest / pytest (3.14) (push) Failing after 2s
Ruff / ruff (push) Failing after 2s
2026-03-06 15:35:49 +01:00
b2ac8939a3
fix: cli show stat failed for single values 2026-02-27 11:20:28 +01:00
2 changed files with 6 additions and 3 deletions

View file

@ -9,6 +9,7 @@ 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
@ -120,12 +121,14 @@ def stat(
"--dataset",
"-d",
),
record: str = typer.Argument(),
record_id: str = typer.Argument(),
) -> None:
"""
Show the statistics of a given record.
"""
record = mio_load_record(path, record)[0]
record = mio_load_record(path, record_id)
if isinstance(record, Corr):
record = record[0]
statistics = record.idl
print(statistics)
return

View file

@ -114,7 +114,7 @@ def unlock(path: str, file: str) -> None:
"""
tracker = get_tracker(path)
if tracker == 'datalad':
dl.unlock(file, dataset=path)
dl.unlock(os.path.join(path, file), dataset=path)
elif tracker == 'None':
Warning("Tracker 'None' does not implement unlock.")
pass