Skip to content

Commit

Permalink
Merge pull request #53 from MIPLabCH/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
smoia authored Mar 2, 2023
2 parents 2bbeb54 + d3f25c2 commit fdaa106
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ repos:
- id: check-case-conflict
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 6.2.3
rev: 6.3.0
hooks:
- id: pydocstyle
- repo: https://github.com/pre-commit/pygrep-hooks
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def run_apidoc(_):

# -- Final Setup -------------------------------------------------------------


# https://github.com/rtfd/sphinx_rtd_theme/issues/117
# launch setup
def setup(app): # noqa
Expand Down
4 changes: 0 additions & 4 deletions nigsp/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

# ### Unit tests
def test_nifti_to_timeseries(atlastime, atlas):

img_in = nibabel.load(atlas)
atlas_in = img_in.get_fdata()
ts_out, atlas_out, img_out = blocks.nifti_to_timeseries(atlastime, atlas)
Expand All @@ -35,7 +34,6 @@ def test_nifti_to_timeseries(atlastime, atlas):

@mark.parametrize("ext", [(".nii.gz"), (".csv")])
def test_export_metrics_txt(ext, sc_mtx, atlas, sdi, testdir):

testdir = join(testdir, "testdir")
makedirs(testdir, exist_ok=True)
atlas_in, mask, img = load_nifti_get_mask(atlas, ndim=3)
Expand All @@ -61,7 +59,6 @@ def test_export_metrics_txt(ext, sc_mtx, atlas, sdi, testdir):


def test_export_metrics_nifti(sc_mtx, atlas, sdi, testdir):

testdir = join(testdir, "testdir")
makedirs(testdir, exist_ok=True)
atlas_in, mask, img = load_nifti_get_mask(atlas, ndim=3)
Expand All @@ -88,7 +85,6 @@ def test_export_metrics_nifti(sc_mtx, atlas, sdi, testdir):


def test_plot_metrics(atlas, sc_mtx, sdi, testdir):

testdir = join(testdir, "testdir")
makedirs(testdir, exist_ok=True)
atlas_in, _, img = load_nifti_get_mask(atlas, ndim=3)
Expand Down
3 changes: 0 additions & 3 deletions nigsp/tests/test_laplacian.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def glap(mtx):

@mark.xfail
def test_normalisation():

L = np.random.rand(4, 4)
L = (L + L.T) / 2
d = np.random.rand(4)
Expand Down Expand Up @@ -162,7 +161,6 @@ def test_break_normalisation():


def test_break_symmetric_normalised_laplacian():

mtx = np.random.rand(4, 4)

d = np.diag(np.ones(4), k=1)
Expand All @@ -177,7 +175,6 @@ def test_break_symmetric_normalised_laplacian():


def test_break_recomposition():

eivec = np.random.rand(4, 4, 2)
eival = np.random.rand(4)

Expand Down
1 change: 0 additions & 1 deletion nigsp/tests/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

# ### Unit tests
def test_sdi():

ts1 = np.arange(1, 3)[..., np.newaxis]
ts2 = np.arange(3, 5)[..., np.newaxis]
ts3 = np.arange(5, 7)[..., np.newaxis]
Expand Down
1 change: 1 addition & 0 deletions nigsp/tests/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_SCGraph():
atlas = rand(4, 3)
filename = "Laudna.nii.gz"
ts_split = {"high": rand(4, 6), "low": rand(4, 6)}

# Initialise eigenvec to check zerocross
def _bonnet(d, x):
if d == 0:
Expand Down

0 comments on commit fdaa106

Please sign in to comment.