So you’d like to contribute? Awesome! Here are some things worth knowing.
Go open an issue or start a discussion and I’ll probably reply soon.
Just make a PR with your proposed changes targeting the main branch. The documentation website will update once your PR is merged.
If you’re willing to contribute your ideas and effort to making poethepoet better, then that’s awesome and I’m grateful. I don’t have all the answers so it’s particularly important for this project to benefit from diverse perspectives and technical expertise.
However please be aware that a lot of thought has gone into the architecture of poethepoet, and whilst I know it’s not perfect, and I am very interested in alternative perspectives, I do have strong (and I hope reasonable) opinions about how certain things should work. This particularly applies to naming and internal APIs. There is a lot to consider in terms of making sure the tool stays simple, flexible, and performant. So please don’t be offended if there is some push back.
- If your planned changes entail non-trivial UI or internal API changes then it’s a good idea to bring them up for discussion as a GitHub issue first.
- Fork and clone the repo, and create a feature or bugfix branch off of the development branch.
- Double check that you’re starting from the development branch, and not from the the main branch.
- Run
poetry install
to setup your development environment. (install poetry) - Do your code.
- If you’ve added a feature then before it can be including in a release we will need:
- a feature test along the same lines as the examples in the tests dir,
- to update documentation.
- Run
poe check
to check that you haven’t broken anything that will block the CI pipeline. - Create a commit with a clear commit message that describes the commit contents.
- Open a PR on GitHub.
.. seealso:: You can also open a draft PR proposing incomplete changes to recieve feedback.
There isn’t currently a pull request template, but please try and be descriptive about what problem you’re solving and how, and reference related issues.
In some cases it might be acceptable to merge code to development to make a pre-release from it without including full automated tests and documentation. However this is a special case, because it blocks further releases from the development branch until the tests and docs are there.
This project implements something like git flow.
TL;DR branch off of development for new features, or main for documentation improvements.
We like to keep a clean history, so squash-rebase merges are preferred for the development or main branches.
- main the primary branch containing released code and up to date docs.
- development in progress and pre-released features that are expected to be included in a release when ready.
- hotfix/ branches for minor/urgent bug fixes from main
- feature/ branches for new feature development from development
- bugfix/ for new bug fixes from development
- doc/ branches for documentation changes
- Create your branch from development
git fetch
git checkout origin/development
git checkout -b feature/my_new_feature
- Create a pull request back to development
- Create your branch from main
git fetch
git checkout origin/main
git checkout -b feature/my_new_feature
- Create a pull request back to main, and one to development
- From the head of the development branch, create release commit that bumps the version in
pyproject.toml
and__version__.py
(there’s a test to ensure these are in sync). - Create a release (and tag) on GitHub, following the existing convention for naming and release notes format (use the Generate release notes button as a starting point), and the GitHub CI will do the rest.
- Unless it is a pre-release then the final step is to merge development into main.