Viviteca
The living library; SnapGene for the web.
Setup
To contribute to this project you will require:
Git workflow
You should install pre-commit hooks to run tests and lints on your changes. This helps to make sure each of your commits is clean, avoiding a "clean up" commit at the end. A good way to do this is to use [pre-commit
]:
- Install [
pre-commit
] (see their website) - Switch to the viviteca directory (
cd /path/to/viviteca
) pre-commit install -t pre-commit
pre-commit install -t pre-push
pre-commit install -t post-checkout
pre-commit run
To update hooks run pre-commit autoupdate
Squashing
- Branch
- Do work and commit as you go
- Squash your commits into logical, atomic changes (including tests!)
Ideally a commit should be a single unit of work capable of being cherry picked to a different branch (such as addition of a new feature). This makes bisecting, picking, reverting, tracking changes and authoring release notes much easier.
If you use a pre-commit hook to ensure the tests pass with each commit, you're unlikely to produce a squashed commit that would break the build if picked!
CI pipeline
All tests/lints will run when you open a PR, this is done by running all the pre-commit
hooks defined in .pre-commit-config.yaml
using a github action. If you wish to add a step to the pipeline please add it as a commit hook.