Skip to content

Style and Formatting

Code Style

The following tools are run in both CI and pre-commit checks to ensure codebase hygiene:

Tool Purpose
black Formatting Python code
isort Formatting and sorting import statements
absolufy-imports Automatically convert relative imports to absolute.
flake8 Linting Python code
nix-linter Linting nix files
nixpkgs-fmt Formatting nix files
shellcheck Linting shell scripts
shfmt Formatting shell scripts
pyupgrade Ensuring the latest available Python syntax is used


If you use nix-shell all of these are setup for you and ready to use, you don't need to install any of these tools.

We use numpydoc as our standard format for docstrings.

Commit philosophy

We aim to make our individual commits small and tightly focused on the feature they are implementing or bug being fixed. If you find yourself making functional changes to different areas of the codebase, we prefer you break up your changes into separate Pull Requests. In general, a philosophy of one Github Issue per Pull Request is a good rule of thumb.

Last update: April 9, 2022