Merge branch 'develop' into tests/find
This commit is contained in:
commit
a90b992326
1 changed files with 3 additions and 3 deletions
|
|
@ -175,7 +175,7 @@ def load_records(path: Path, meas_paths: list[str], preloaded: dict[str, Any] =
|
||||||
if cache_enabled(path):
|
if cache_enabled(path):
|
||||||
if not os.path.exists(cache_dir(path, file)):
|
if not os.path.exists(cache_dir(path, file)):
|
||||||
os.makedirs(cache_dir(path, file))
|
os.makedirs(cache_dir(path, file))
|
||||||
dump_object(preloaded[file][key], cache_path(path, file, key))
|
dump_object(preloaded[file][key], str(cache_path(path, file, key)))
|
||||||
return returned_data
|
return returned_data
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -195,7 +195,7 @@ def cache_dir(path: Path, file: str) -> Path:
|
||||||
The path holding the cached data for the given file.
|
The path holding the cached data for the given file.
|
||||||
"""
|
"""
|
||||||
cache_path_list = file.split("/")[1:]
|
cache_path_list = file.split("/")[1:]
|
||||||
cache_path = path / CACHE_DIR
|
cache_path = Path(path) / CACHE_DIR
|
||||||
for directory in cache_path_list:
|
for directory in cache_path_list:
|
||||||
cache_path /= directory
|
cache_path /= directory
|
||||||
return cache_path
|
return cache_path
|
||||||
|
|
@ -238,7 +238,7 @@ def preload(path: Path, file: Path) -> dict[str, Any]:
|
||||||
The data read from the file.
|
The data read from the file.
|
||||||
"""
|
"""
|
||||||
get(path, file)
|
get(path, file)
|
||||||
filedict: dict[str, Any] = pj.load_json_dict(path / file)
|
filedict: dict[str, Any] = pj.load_json_dict(str(path / file))
|
||||||
print("> read file")
|
print("> read file")
|
||||||
return filedict
|
return filedict
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue