diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 139517a..89c53a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,11 +11,11 @@ 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 @@ -23,7 +23,7 @@ repos: 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 diff --git a/docs/conf.py b/docs/conf.py index ecc4551..7a7d41c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -142,6 +142,7 @@ def run_apidoc(_): # -- Final Setup ------------------------------------------------------------- + # https://github.com/rtfd/sphinx_rtd_theme/issues/117 # launch setup def setup(app): # noqa diff --git a/nigsp/tests/test_blocks.py b/nigsp/tests/test_blocks.py index 4c3b8c2..79b40dc 100644 --- a/nigsp/tests/test_blocks.py +++ b/nigsp/tests/test_blocks.py @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/nigsp/tests/test_laplacian.py b/nigsp/tests/test_laplacian.py index 57dc40e..c6eba20 100644 --- a/nigsp/tests/test_laplacian.py +++ b/nigsp/tests/test_laplacian.py @@ -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) @@ -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) @@ -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) diff --git a/nigsp/tests/test_metrics.py b/nigsp/tests/test_metrics.py index b12d03a..55d4b30 100644 --- a/nigsp/tests/test_metrics.py +++ b/nigsp/tests/test_metrics.py @@ -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] diff --git a/nigsp/tests/test_objects.py b/nigsp/tests/test_objects.py index ad784eb..2c22fc8 100644 --- a/nigsp/tests/test_objects.py +++ b/nigsp/tests/test_objects.py @@ -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: