nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Extend test suite to run more tests also in pre-commit

Open terhorstd opened this issue 1 month ago • 0 comments

The test framework uses some outdated versions that start to become difficult with newer python versions. The main change in this PR is the update of some pyproject.toml sections and the .pre-commit-config.yaml. New checks are added to improve developer-local checks as well as the CI side.

In more detail:

  • The mypy.ini was translated to pyproject.toml to have config in one place
  • More pylint errors are silenced for now to have them being fixed in a separate PR.
  • nest-server code was slightly refactored to meet absolute minimum quality requirements.
  • some files with implicit relative import require explicit from . import connect_test_base to be checked. (which is subsequently resorted by isort)
  • Some test implementation type-checking suffers from untyped pynest API, thus requiring explicit annotations like n_events: int = spike_recorder.get("n_events")
  • mpi-tests can only be checked if directory-names are valid python module names, therefore the rename of mpi/2/*.pympi/nproc2/*.py
  • Some updates caused a re-formatting of cpp file indention levels. (change "files changed" settings to hide white-space changes to de-clutter the review)
  • minor changes to shell-scripts as suggested by shellcheck

terhorstd avatar Dec 05 '25 11:12 terhorstd