Development
All requirements for bootstrapping, docs and development can be installed from the single requirements.txt
file. All assisting infrastructure is Python-based. Install with
pip install -r requirements.txt
Pre-commit
As a precaution against accidental secret leaks, a gitleaks pre-commit hook is provided. Pre-commit will be installed when you install from requirements.txt
.
Continue the first-time setup for the hooks with the following:
pre-commit autoupdate # update the pre-commit hook versions
pre-commit install # install the hooks
The gitleaks hook will scan staged, but not yet committed, files for secrets. The commit will fail if it finds a leaked secret that you are inadvertently trying to commit.
To modify either the pre-commit hook or gitleaks, see their respective documentation.
Publishing the docs
The documents are built using Material for Mkdocs.
To preview the docs as you edit:
mkdocs serve
To check the build:
mkdocs build --strict
The docs are published to GitHub pages with GitHub Actions.
Updating the changelog
The Changelog is maintained with scriv.
Add a changelog fragment with every fix, change, feature addition etc:
scriv create
The fragment will go to the changelog.d
directory and you can edit it there.
Upon release, set the desired version number in changelog.d/scriv.ini
and compile the fragments into the next version:
scriv collect
The fragments will be added to the CHANGELOG.md
file in the root directory. It can then be cleaned up manually before committing.
Github Actions
Two actions are pre-configured:
- Auto-update pre-commit hook versions
- Build the docs and publish to GitHub Pages
For the pre-commit action to work, you must give GitHub Actions permission to create pull requests to your repo. You can find this setting in your repository settings under Actions - General - Workflow permissions.
Created: June 13, 2024 16:06:52