Contributing#

Contributions to flatspin are very welcome!

There are many ways to contribute to the project, for example:

Bugs and feature requests#

Please use the issue tracker to file bug reports, feature requests or any other issues.

Code contributions#

Both code and documentation live in the flatspin repository.

To get started, check out the repository with:

git clone https://gitlab.com/flatspin/flatspin

Next, install flatspin in development mode:

cd flatspin
pip install --user -e -U .[dev]

This will install all dependencies needed for development. In addition, any changes to the code in your local checkout will be immediately available from Python without having to reinstall the flatspin package.

Tests#

flatspin comes with a suite of unit tests that verifies various parts of the simulator. Any new features should come with a unit test that verifies correctness.

You may run the full suite of tests with:

pytest tests

Or alternatively, skipping the time-consuming benchmarks:

pytest --benchmark-skip tests

Documentation#

The flatspin documentation is created using the excellent Jupyter Book.

To build the documentation locally, use:

jupyter-book build doc

Please note that some of the examples in the documentation will fail to build, since they depend on some flatspin datasets which are not included in the repository.

Merge requests#

Once you are ready to contribute your changes, either to the code or documentation, please open a merge request.