Compare commits

...

2 commits

Author SHA1 Message Date
314234fed8 Merge pull request 'fix the file finder for sfcf' (#19) from fix/sfcf_file_finder into develop
Some checks failed
Mypy / mypy (push) Failing after 1s
Pytest / pytest (3.12) (push) Failing after 1s
Pytest / pytest (3.13) (push) Failing after 1s
Pytest / pytest (3.14) (push) Failing after 2s
Ruff / ruff (push) Failing after 1s
Reviewed-on: https://www.kuhl-mann.de/git/git/jkuhl/corrlib/pulls/19
2026-02-20 16:55:54 +01:00
60b56dfb25
fix the file finder for sfcf
Some checks failed
Mypy / mypy (push) Failing after 2s
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
Mypy / mypy (pull_request) Failing after 2s
Pytest / pytest (3.12) (pull_request) Failing after 2s
Pytest / pytest (3.13) (pull_request) Failing after 2s
Pytest / pytest (3.14) (pull_request) Failing after 1s
Ruff / ruff (pull_request) Failing after 1s
2026-02-20 16:54:14 +01:00

View file

@ -3,6 +3,7 @@ import datalad.api as dl
import json import json
import os import os
from typing import Any from typing import Any
from fnmatch import fnmatch
bi_corrs: list[str] = ["f_P", "fP", "f_p", bi_corrs: list[str] = ["f_P", "fP", "f_p",
@ -298,9 +299,10 @@ def read_data(path: str, project: str, dir_in_project: str, prefix: str, param:
if not appended: if not appended:
compact = (version[-1] == "c") compact = (version[-1] == "c")
for i, item in enumerate(ls): for i, item in enumerate(ls):
rep_path = directory + '/' + item if fnmatch(item, prefix + "*"):
sub_ls = pe.input.sfcf._find_files(rep_path, prefix, compact, []) rep_path = directory + '/' + item
files_to_get.extend([rep_path + "/" + filename for filename in sub_ls]) sub_ls = pe.input.sfcf._find_files(rep_path, prefix, compact, [])
files_to_get.extend([rep_path + "/" + filename for filename in sub_ls])
print("Getting data, this might take a while...") print("Getting data, this might take a while...")