From ef4fae02f045194f7daf907ca54aaf4f5cd2b94b Mon Sep 17 00:00:00 2001 From: Matteo Visconti di Oleggio Castello Date: Mon, 29 Jul 2024 12:53:09 +0200 Subject: [PATCH] MNT,FIX github actions (#33) * MNT remove flake8 * Revert back to linting with flake but ensure that sphinx is installed * FIX use instead of * FIX use sudo * Remove flake for good --- .github/workflows/run_tests.yml | 8 -------- moten/core.py | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 27e7ed8..8409434 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -34,14 +34,6 @@ jobs: pip install -q -r test_requirements.txt pip install -e . - - name: Lint with flake8 - run: | - pip install -q flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --ignore=E402,C901 --max-line-length=127 --statistics - - name: Test with pytest run: | pytest -v --cov=./ diff --git a/moten/core.py b/moten/core.py index b32db55..ffab0e6 100644 --- a/moten/core.py +++ b/moten/core.py @@ -51,7 +51,7 @@ def raw_project_stimulus(stimulus, # checks for 2D stimuli assert stimulus.ndim == 2 # (nimages, pixels) assert isinstance(vhsize, tuple) and len(vhsize) == 2 # (hdim, vdim) - assert np.product(vhsize) == stimulus.shape[1] # hdim*vdim == pixels + assert np.prod(vhsize) == stimulus.shape[1] # hdim*vdim == pixels # Compute responses nfilters = len(filters) @@ -103,7 +103,7 @@ def project_stimulus(stimulus, # checks for 2D stimuli assert stimulus.ndim == 2 # (nimages, pixels) assert isinstance(vhsize, tuple) and len(vhsize) == 2 # (hdim, vdim) - assert np.product(vhsize) == stimulus.shape[1] # hdim*vdim == pixels + assert np.prod(vhsize) == stimulus.shape[1] # hdim*vdim == pixels # Compute responses nfilters = len(filters)