Skip to content

Contributing

Welcome! We're happy to have you here. Thank you in advance for your contribution to Beavers.

Development environment set up

python3 -m venv --clear venv
source venv/bin/activate
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
pre-commit install

Testing

To run tests fast:

pytest -n auto tests

To Get coverage:

coverage run --branch --rcfile=./pyproject.toml --include "./beavers/*" -m pytest tests
coverage report --show-missing

Generating the change log

We use git-change-log to generate our CHANGELOG.md

Please follow the basic convention for commit message.

To update the change log, run:

git-changelog -io CHANGELOG.md

New Release

For new release, first prepare the change log, push and merge it.

git-changelog --bump=auto -io CHANGELOG.md

Then tag and push:

git tag vX.X.X
git push origin vX.X.X

Lastly on github, go to tags and create a release. The CI will deploy to pypi automatically from then.

Testing the documentation

mkdocs serve --livereload --watch=./

Updating dependencies

  • For the repo poetry lock
  • For the doc: (cd docs/; pip-compile ./requirements.in > ./requirements.txt)

Resources

The repo set up is inspired by this guide