Skip to content

Commit

Permalink
feat: add local codespell usage to dev install
Browse files Browse the repository at this point in the history
  • Loading branch information
asoplata committed Jan 24, 2025
1 parent 3443b13 commit a532219
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ clean :
check-manifest:
check-manifest

test: lint
pytest ./hnn_core/tests/ -m "not uses_mpi" -n auto
pytest ./hnn_core/tests/ -m "uses_mpi"

lint:
@if command -v ruff > /dev/null; then \
echo "Running ruff check"; \
Expand All @@ -29,3 +25,16 @@ lint:
echo "ruff not found, please install it!"; \
exit 1; \
fi;

spell:
@if command -v codespell > /dev/null; then \
echo "Running codespell"; \
codespell; \
else \
echo "codespell not found, please install it!"; \
exit 1; \
fi;

test: lint spell
pytest ./hnn_core/tests/ -m "not uses_mpi" -n auto
pytest ./hnn_core/tests/ -m "uses_mpi"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = ["setuptools>=40.8.0", "NEURON >=7.7; platform_system != 'Windows'"]
build-backend = "setuptools.build_meta:__legacy__"
[tool.codespell]
skip = '.git,*.pdf,*.svg'
skip = '.git,*.pdf,*.svg,./hnn_core/mod,./doc/_build,./build'
check-hidden = true
# in jupyter notebooks - images and also some embedded outputs
ignore-regex = '^\s*"image/\S+": ".*|.*%22%3A%20.*'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def run(self):
extras = {
'opt': ['scikit-learn'],
'parallel': ['joblib', 'psutil'],
'test': ['pytest', 'pytest-cov', 'pytest-xdist', 'ruff'],
'test': ['codespell', 'pytest', 'pytest-cov', 'pytest-xdist', 'ruff'],
'docs': ['mne', 'nibabel', 'pooch', 'tdqm',
'sphinx', 'sphinx-gallery',
'sphinx_bootstrap_theme', 'sphinx-copybutton',
Expand Down

0 comments on commit a532219

Please sign in to comment.