Thank you for considering contributing to Athreading! We appreciate your efforts to help improve the project. Please follow these guidelines to ensure a smooth and productive contribution process.
Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved. It also communicates that you agree to respect the time of the developers managing and developing these open source projects. In return, we will reciprocate that respect by addressing your issue, assessing changes, and helping you finalize your pull requests.
Contributions are made to this repo via Issues and Pull Requests (PRs). A few general guidelines that cover both:
- Search for existing Issues and PRs before creating your own.
- Read this repository package license and licenses of any proposed dependencies to ensure compatibility.
- We work hard to makes sure issues are handled in a timely manner but, depending on the impact, it could take a while to investigate the root cause. A friendly ping in the comment thread to the submitter or a contributor can help draw attention if your issue is blocking.
- If you've never contributed to FOSS projects before, see this the first timer's guide for resources and tips on how to get started.
Issues should be used to report problems with the library, request a new feature, or to discuss potential changes before a PR is created. When you create a new Issue, a template will be loaded that will guide you through collecting and providing the information we need to investigate.
If you find an Issue that addresses the problem you're having, please add your own reproduction information to the existing issue rather than creating a new one. Adding a reaction can also help by indicating to our maintainers that a particular problem is affecting more than just the reporter.
PRs to our libraries are always welcome and can be a quick way to get your fix or improvement slated for the next release. In general, PRs should:
- Only fix/add the functionality in question OR address wide-spread whitespace/style issues, not both.
- Add unit or integration tests for fixed or changed functionality (if a test suite already exists).
- Address a single concern in the least number of changed lines as possible.
- Include documentation in the repo (TODO sphinx documentation).
- Be accompanied by a complete Pull Request template (loaded automatically when a PR is created).
For changes that address core functionality or would require breaking changes (e.g. a major release), it's best to open an Issue to discuss your proposal first. This is not required but can save time creating and reviewing changes.
In general, we follow the "fork-and-pull" Git workflow
- Fork the repository to your own Github account
- Clone the project to your machine
- Create a branch locally with a succinct but descriptive name
- Commit changes to the branch
- Following any formatting and testing guidelines specific to this repo
- Push changes to your fork
- Open a PR in our repository and follow the PR template so that we can efficiently review the changes.
This is a minimal Python library that uses poetry for packaging and dependency management. To assist automating the maintence process, this repository provides pre-commit hooks (for isort, Black, Flake8 and mypy) and automated tests using pytest and GitHub Actions. Pre-commit hooks are automatically kept updated with a dedicated GitHub Action, this can be removed and replace with pre-commit.ci. It was developed by the Imperial College Research Computing Service.
To modify, test and request changes to this repository:
-
Download and install Poetry following the instructions for the target OS.
-
Clone
[email protected]:calgray/athreading.git
and change working directory -
Set up the virtual environment:
poetry install
-
Activate the virtual environment (alternatively, ensure any python-related command is preceded by
poetry run
):poetry shell
-
Install the git hooks:
pre-commit install
-
Run all checks and tests:
pre-commit run --all-files pytest --benchmark-enable
The GitHub workflow includes an action to publish on release.
When preparing for a release, ensure:
- A suitable version increment complient with Semantic Versioning 2.0.0 is made to
pyproject.toml
and__init__.py
- The Changelog is updated with the new version and contains a short developer facing summary of introduced changes
- A git tag is created in the same format as the pyproject.toml version (e.g.
0.1.0
) - A Github release is created using the tag and with user facing release notes summary