Skip to content

Commit 772bf0b

Browse files
authored
Merge branch 'master' into pre-commit-ci-update-config
2 parents 58ba0ba + 091fada commit 772bf0b

File tree

9 files changed

+41
-43
lines changed

9 files changed

+41
-43
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
phys2bids/_version.py export-subst
1+
nigsp/_version.py export-subst
22

33
*.py eol=lf
44
*.rst eol=lf

.pre-commit-config.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ repos:
1313
- id: check-case-conflict
1414
- id: check-merge-conflict
1515

16-
- repo: https://github.com/pycqa/isort
17-
rev: 6.1.0
18-
hooks:
19-
- id: isort
20-
21-
- repo: https://github.com/pycqa/pydocstyle
22-
rev: 6.3.0
23-
hooks:
24-
- id: pydocstyle
25-
26-
2716
- repo: https://github.com/pre-commit/pygrep-hooks
2817
rev: v1.10.0
2918
hooks:
@@ -38,7 +27,7 @@ repos:
3827

3928

4029
- repo: https://github.com/astral-sh/ruff-pre-commit
41-
rev: v0.13.3
30+
rev: v0.14.2
4231
hooks:
4332
- id: ruff
4433
name: ruff linter

.zenodo.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
"orcid":"0000-0002-2553-3327",
88
"affiliation":"Medical Imaging Processing Lab, Center for Neuroprosthetics, École Polytechnique Fédérale de Lausanne",
99
"name":"Stefano Moia"
10+
},
11+
{
12+
"affiliation":"Medical Imaging Processing Lab, Center for Neuroprosthetics, École Polytechnique Fédérale de Lausanne",
13+
"name": "Nawal Kinani"
14+
},
15+
{
16+
"affiliation":"Medical Imaging Processing Lab, Center for Neuroprosthetics, École Polytechnique Fédérale de Lausanne",
17+
"name": "Mathieu Scheltienne"
18+
},
19+
{
20+
"affiliation":"Medical Imaging Processing Lab, Center for Neuroprosthetics, École Polytechnique Fédérale de Lausanne",
21+
"name": "Maria Giulia Preti"
22+
},
23+
{
24+
"affiliation":"Medical Imaging Processing Lab, Center for Neuroprosthetics, École Polytechnique Fédérale de Lausanne",
25+
"name": "Dimitri Van De Ville"
1026
}
1127
],
1228
"access_right":"open"

nigsp/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import os
44
import ssl
55
from typing import TYPE_CHECKING
6-
from urllib.request import urlretrieve
76

7+
import requests
88
from pytest import fixture
99

1010
if TYPE_CHECKING:
@@ -62,7 +62,11 @@ def fetch_file(osf_id, path, filename):
6262
url = f"https://osf.io/{osf_id}/download"
6363
full_path = os.path.join(path, filename)
6464
if not os.path.isfile(full_path):
65-
urlretrieve(url, full_path)
65+
req = requests.get(url, allow_redirects=True)
66+
req.raise_for_status()
67+
with open(full_path, "wb") as f:
68+
f.write(req.content)
69+
f.close()
6670
return full_path
6771

6872

nigsp/io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def load_txt(fname, shape=None):
250250
mtx : numpy.ndarray
251251
Data matrix.
252252
253-
See also
253+
See Also
254254
--------
255255
check_mtx_dim
256256
"""
@@ -297,7 +297,7 @@ def load_mat(fname, shape=None):
297297
-----
298298
Requires module ``pymatreader`` to work.
299299
300-
See also
300+
See Also
301301
--------
302302
check_mtx_dim
303303
@@ -361,7 +361,7 @@ def load_xls(fname, shape=""):
361361
shape : None | ``'square'`` | ``'rectangle'``
362362
Shape of matrix, if empty, skip check.
363363
364-
See also
364+
See Also
365365
--------
366366
check_mtx_dim
367367

nigsp/operations/timeseries.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ def _trapezoid_compat(*args, **kwargs):
297297

298298
def median_cutoff_frequency_idx(energy):
299299
"""
300-
Find the frequency that splits the energy of a timeseries in two roughly equal
301-
parts.
300+
Estimate frequency splitting the energy of timeseries in two roughly equal parts.
302301
303302
Parameters
304303
----------

nigsp/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def nigsp(
8484
lgr_degree="info",
8585
):
8686
"""
87-
Main workflow for nigsp, following the methods described in [1]_.
87+
Run main workflow for nigsp, following the methods described in [1]_.
8888
8989
Parameters
9090
----------

pyproject.toml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ omit = [
1818
'**/tests/**',
1919
]
2020

21-
[tool.isort]
22-
extend_skip_glob = [
23-
'docs/*',
24-
'setup.py',
25-
'tutorials/*',
26-
]
27-
line_length = 88
28-
multi_line_output = 3
29-
profile = 'black'
30-
py_version = 37
31-
3221
[tool.ruff]
3322
extend-exclude = ['docs', 'versioneer.py', 'setup.py']
3423
line-length = 88
@@ -40,7 +29,10 @@ line-ending = 'lf'
4029

4130
[tool.ruff.lint]
4231
ignore = []
43-
select = ['A', 'B', 'E', 'F', 'UP', 'W']
32+
select = ['A', 'B', 'E', 'D', 'F', 'I', 'UP', 'W']
33+
34+
[tool.ruff.lint.pydocstyle]
35+
convention = 'numpy'
4436

4537
[tool.ruff.lint.per-file-ignores]
4638
'*' = [
@@ -50,3 +42,9 @@ select = ['A', 'B', 'E', 'F', 'UP', 'W']
5042
'*.pyi' = ['E501']
5143
'__init__.py' = ['F401']
5244
'_version.py' = ['UP031']
45+
'nigsp/tests/*' = ['D']
46+
'nigsp/__init__.py' = ['F401', 'D']
47+
'nigsp/*/__init__.py' = ['F401', 'D']
48+
'nigsp/_version.py' = ['UP031', 'D']
49+
'nigsp/conftest.py' = ['D']
50+
'nigsp/due.py' = ['D']

setup.cfg

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ classifiers =
99
Development Status :: 4 - Beta
1010
Intended Audience :: Science/Research
1111
License :: OSI Approved :: Apache Software License
12-
Programming Language :: Python :: 3.7
1312
Programming Language :: Python :: 3.8
1413
Programming Language :: Python :: 3.9
1514
Programming Language :: Python :: 3.10
1615
Programming Language :: Python :: 3.11
1716
Programming Language :: Python :: 3.12
17+
Programming Language :: Python :: 3.13
1818
license = Apache-2.0
1919
description = A python library (and toolbox!) to run Graph Signal Processing on multimodal MRI data.
2020
long_description = file:README.md
@@ -63,10 +63,8 @@ doc =
6363
sphinx-gallery
6464
sphinx-issues
6565
style =
66-
isort
67-
pydocstyle
6866
codespell>=2.2.4
69-
ruff>=0.4.1
67+
ruff>=0.14.2
7068
test =
7169
%(all)s
7270
%(style)s
@@ -84,12 +82,6 @@ dev =
8482
console_scripts =
8583
nigsp=nigsp.workflow:_main
8684

87-
[pydocstyle]
88-
convention = numpy
89-
match =
90-
nigsp/*.py
91-
match_dir = nigsp/[^tests]*
92-
9385
[codespell]
9486
skip = versioneer.py,.git,build,./docs/_build
9587
ignore-words-list = nd,commun

0 commit comments

Comments
 (0)