Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.59 KB

development_notes.md

File metadata and controls

32 lines (19 loc) · 1.59 KB

Development notes

Because I forget.

Setup

Install dev dependencies: pip install ".[dev]"

Install pre-commit hooks: pre-commit install

For code formatting, black and isort are used with default settings.

Unit tests

pytest is used to run unit tests.

Generated test figures are checked if they match with a set of reference figures in the tests/reference_figures directory. For some code changes, they may no longer match character-for-character, but still look good. If this is acceptable, you can generate new reference figures.

Generating reference figures

Set the GENERATE variable at the top of tests/test_reference_figures.py to True and run the tests again. You use git status to tell you which reference plots have changed, since they're just text files. Use your own eyes to look at any changes. If they look good, set the GENERATE flag back to False and commit the new refernce figures to git.

Creating a new release

Documentation is built automatically by readthedocs. To build locally, run: cd docs && make html