Skip to content

sinzlab/neuralpredictors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2b42005 Â· Feb 27, 2025
Mar 28, 2023
Nov 27, 2019
Feb 27, 2025
Mar 12, 2024
Feb 21, 2022
Dec 8, 2021
Jan 26, 2022
Feb 21, 2022
Jun 17, 2022
Jan 9, 2019
Nov 26, 2021
Mar 6, 2023
Dec 8, 2022
Dec 8, 2022
Feb 21, 2022
Jun 17, 2022

Repository files navigation

Neuralpredictors

Test codecov Black Mypy Isort PyPI version DOI

Sinz Lab Neural System Identification Utilities for PyTorch.

How to run the tests 🧪

Clone this repository and run the following command from within the cloned repository to run all tests:

docker-compose run pytest

How to contribute 🔥

Pull requests (and issues) are always welcome. This section describes some preconditions that pull requests need to fulfill.

Tests

Please make sure your changes pass the tests. Take a look at the test running section for instructions on how to run them. Adding tests for new code is not mandatory but encouraged.

Code Style

black

This project uses the black code formatter. You can check whether your changes comply with its style by running the following command:

docker-compose run black

Furthermore you can pass a path to the service to have black fix any errors in the Python modules it finds in the given path.

isort

isort is used to sort Python imports. You can check the order of imports by running the following command:

docker-compose run isort

The imports can be sorted by passing a path to the service.

Type Hints

We use mypy as a static type checker. Running the following command will check the code for any type errors:

docker-compose run mypy

It is not necessary (but encouraged) to add type hints to new code but please make sure your changes do not produce any mypy errors.

Note that only modules specified in the mypy-files.txt file are checked by mypy. This is done to be able to add type hints gradually without drowning in errors. If you want to add type annotations to a previously unchecked module you have to add its path to mypy-files.txt.