Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
Nothing easier!
Fork and clone the repository:
git clone https://github.com/frostming/unearth
cd unearth
We use pdm to manage the project and dependencies, install PDM if it isn't done yet, then:
pdm install
You now have the dependencies installed.
You can run the tests with pdm run test [ARGS...]
.
This project uses nox as the test runner. See what sessions are list:
nox --list
And run the test suite on specified Python versions:
nox -s tests-3.8
!!! important "TIPS"
nox
and pre-commit
in the following section are not list in the dev-dependencies
of the project,
because they can be installed separately to the system and used via the external executable. If you are willing to
reproduce the development environment without external dependencies. Run pdm add -d nox pre-commit
and the
corresponding commands should be prefixed with pdm run
as well.
As usual:
- create a new branch:
git checkout -b feature-or-bugfix-name
- edit the code and/or the documentation
If you updated the documentation or the project dependencies:
- run
pdm run doc
- go to http://localhost:8000 and check that everything looks good
Before committing:
-
Make sure you submit a news entry under
news/
directory with the name pattern<issue_or_pr_num>.<type>.md
where<type>
should be one of:bugfix
for bug fixesfeature
for features and improvementsdoc
for documentation improvementsremove
for deprecations and removalsdep
for dependencies updatesmisc
for miscellany tasks
-
Install pre-commit and hooks:
pre-commit install
-
Then linter task will be run each time when you commit something. Or you can run it manually:
pdm run lint
If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.
Don't bother updating the changelog, we will take care of this.
Link to any related issue in the Pull Request message.
During review, we recommend using fixups:
# SHA is the SHA of the commit you want to fix
git commit --fixup=SHA
Once all the changes are approved, you can squash your commits:
git rebase -i --autosquash master
And force-push:
git push -f
If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.