Developer Guide¶
Warning
To create new processes, refer to the examples found in Emu.
Building the docs¶
First install an environment with conda/mamba and finch within it.
$ mamba env create -f environment.yml
$ mamba activate finch
$ pip install -e .
Run the Sphinx docs generator:
$ make docs
Running tests¶
Run tests using pytest.
First install an environment with conda/mamba and finch within it.
$ mamba env create -f environment.yml
$ mamba activate finch
$ pip install -e .
Run quick tests (skip slow and online):
$ pytest -m 'not slow and not online'"
Run all tests:
$ pytest
Check code formatting compliance:
$ pre-commit run --all-files
Run tests the lazy way¶
Do the same as above using the Makefile.
$ make test
$ make test-all
$ make lint
Updating the Conda environment¶
To update the conda specification file for building identical environments on a specific operating system:
Note
You should perform this regularly within your Pull Requests on your target OS and architecture (64-bit Linux).
$ mamba env create -f environment.yml
$ mamba activate finch
$ make clean
$ pip install -e .
$ mamba list -n finch --explicit > spec-file.txt
Preparing Finch releases¶
In order to prepare a new release version of finch, perform the following steps in a new branch:
Update
CHANGES.rstwith the release notes for the next version.Run $ bump-my-version bump { patch | minor | major } to update the version numbers.
Run $ bump-my-version bump release to create a new release commit.
Push your changes to GitHub.
Open a Pull Request with an appropriate title and description (e.g. “Prepare release v1.2.3”).
Wait for the CI workflows to complete.
Merge the Pull Request into the
mainbranch.- Tag the commit with the new version number:
Run $ git tag -a v1.2.3 -m “Release v1.2.3”.
Push the tag to GitHub with $ git push origin v1.2.3.
- Create a new release on GitHub using the newly tagged commit with the same version number as the tag:
The release title should be the same as the tag name.
The release description should be the same as the release notes in
CHANGES.rst.