Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Samuel-Boehm/moabb into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Boehm committed Dec 22, 2024
2 parents 705ebef + 18ea5d7 commit 3dd4f22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions moabb/datasets/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,24 +220,24 @@ def fs_get_file_list(article_id, version=None):
fsurl = "https://api.figshare.com/v2"
all_files = []
page = 1

while True:
if version is None:
url = f"{fsurl}/articles/{article_id}/files?page={page}&page_size=100"
headers = {"Content-Type": "application/json"}
response = fs_issue_request("GET", url, headers=headers)

if not response: # If response is empty, we've got all files
break

all_files.extend(response)
page += 1
else:
url = f"{fsurl}/articles/{article_id}/versions/{version}"
headers = {"Content-Type": "application/json"}
request = fs_issue_request("GET", url, headers=headers)
return request["files"]

return all_files


Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ scipy = "^1.9.3"
mne = "^1.7.0"
pandas = ">=1.5.2"
h5py = "^3.10.0"
scikit-learn = ">=1.4.2"
# TODO: remove this once skorch release
scikit-learn = "<1.6"
matplotlib = "^3.6.2"
seaborn = "^0.12.1"
pyriemann = "^0.7"
Expand Down

0 comments on commit 3dd4f22

Please sign in to comment.