diff --git a/TODO.md b/TODO.md index 3c568dc..4153fc3 100644 --- a/TODO.md +++ b/TODO.md @@ -1,15 +1,14 @@ # TODO ## Features -- [ ] implement import of non-datalad projects -- [ ] implement a way to use another backlog repo as a project +- implement import of non-datalad projects +- implement a way to use another backlog repo as a project -- [ ] find a way to convey the mathematical structure of what EXACTLY is the form of the correlator in a specific project +- find a way to convey the mathematical structure of what EXACTLY is the form of the correlator in a specific project - this could e.g. be done along the lines of mandatory documentation -- [ ] keep better track of the versions the code, that was used for a specific measurement. +- keep better track of the versions of the code, that was used for a specific measurement. - maybe let this be an input in the project file? - git repo and commit hash/version tag -- [ ] implement local caching with pickle files ## Bugfixes - [ ] revisit the reimport function for single files diff --git a/corrlib/meas_io.py b/corrlib/meas_io.py index 1f1e920..9a3806b 100644 --- a/corrlib/meas_io.py +++ b/corrlib/meas_io.py @@ -139,8 +139,8 @@ def load_records(path: str, meas_paths: list[str], preloaded = {}) -> list[Union returned_data: list = [] for file in needed_data.keys(): for key in list(needed_data[file]): - if os.path.exists(cache_path(path, file, key)): - returned_data.append(load_object(cache_path(path, file, key))) + if os.path.exists(cache_path(path, file, key) + ".p"): + returned_data.append(load_object(cache_path(path, file, key) + ".p")) else: if file not in preloaded: preloaded[file] = preload(path, file) @@ -156,13 +156,13 @@ def cache_dir(path, file): cache_path_list = [path] cache_path_list.append(".cache") cache_path_list.extend(file.split("/")[1:]) - cache_path = os.path.join(cache_path_list) + cache_path = "/".join(cache_path_list) return cache_path def cache_path(path, file, key): cache_path = os.path.join(cache_dir(path, file), key) - return cache_path + ".p" + return cache_path def preload(path: str, file: str):