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:

  1. Update CHANGES.rst with the release notes for the next version.

  2. Run $ bump-my-version bump { patch | minor | major } to update the version numbers.

  3. Run $ bump-my-version bump release to create a new release commit.

  4. Push your changes to GitHub.

  5. Open a Pull Request with an appropriate title and description (e.g. “Prepare release v1.2.3”).

  6. Wait for the CI workflows to complete.

  7. Merge the Pull Request into the main branch.

  8. 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.

  9. 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.