Thanks for taking the time to contribute to apiron
!
Before you submit your work, take some time to read through these guidelines.
You should also read and follow the code of conduct.
All apiron
changes and releases are done with the dev
branch.
As such, when developing, please cut a branch from dev
and open your pull request against dev
.
We squash commits when merging to dev
, so it's okay if you have several commits within your pull request.
That being said, please make sure your commit messages are clear so we can tell what's happening!
This project uses pre-commit to run checks on the code prior to a successful commit. Installing pre-commit and using its hooks can ease your development by uncovering issues earlier in the development life cycle.
We don't currently have a strict commit message convention, but here are a few guidelines:
- Use the imperative, present tense:
Add cat pictures
rather thanAdded cat pictures
orI added some cat pictures
- No punctuation at the end of the message -- if you need to describe something at length, do it in the body of the commit message
- If addressing a specific, open issue in full, prefix the commit message with the issue number and a colon [e.g.
#12: Add even more cats
]
apiron
is thoroughly tested.
Its current scope has let us reach 100% code coverage with fairly low effort, which may not always be possible.
Nonetheless, when fixing a bug it is helpful to us that you add a failing test that your fix makes pass.
If adding a new feature, it should also be thoroughly tested.
This allows for easier refactoring to prove that nothing broke in transit!
To test apiron
, check out the repository and ensure the Python versions you would like to test are available on your $PATH
as versioned executables like python3.10
.
Then, use tox
to run the tests.
This project uses black
for consistent code formatting.
Before opening a pull request, try to remember to run black
on your code; the build will fail otherwise.
Note that black
requires Python 3.6+ to run, although it supports formatting compatible with earlier versions of Python.
To participate in the release process, you'll need the following:
- Accounts registered on Test PyPI and PyPI and added as maintainers of the apiron project
- An account registered on Read the Docs and added as a maintainer of the apiron project
- A virtual environment with
tox
installed, and any Python versions you want to test against available on your$PATH
- Once all changes for a release are approved and incorporated into
dev
, update thepyproject.toml
file to a new semantic version. UpdateCHANGELOG.md
to reflect the new version and make sure all changes are reflected (see link inCHANGELOG.md
for formatting). - Open a pull request titled something like "v3.X.X release prep" and merge to
dev
- Tag the head of
dev
as a new GitHub release matching the version inpyproject.toml
, using the body of the version's changes fromCHANGELOG.md
as the release description - Monitor the resulting actions to make sure the build artifacts are uploaded to PyPI and the GitHub release
- Smoke check the documentation build on Read the Docs