We welcome all kinds of contributions to keep PyHealth growing and thriving.
Everyone can contribute, and we value every contribution, whether it is
- Reporting a bug
- Proposing new features
- Discussing the current state of the code
- Submitting new code
- Becoming a maintainer
In the following cases, you are encouraged to submit an issue on GitHub.
- Reporting a bug
- Proposing a new feature
For bug reports, please be as detailed as possible. It is recommended to include
- A quick summary
- Steps to reproduce (with sample code if possible)
- What you expected would happen
- What actually happens
- Notes
- Why you think this might be happening
- Stuff you have tried that did not work
You can contribute code to the project through pull requests. To submit a pull request, you need to
- Fork the PyHealth repository
- Clone it to your local machine
- Implement your code and test it
- Push it to your GitHub repository
- Create a pull request in PyHelath repository
If your forked repository is behind the latest version, you can create a pull request in your repository to pull the latest version from PyHealth.
You can directly make a pull request for trivial changes. For non-trivial changes, it is better to discuss it in an issue before you implement the code.
We follow the PEP8 style for code. The line length is set to 88 characters. We follow the Google style for docstrings.
We welcome you to join our community via Slack workspace, where you can ask questions, discuss ideas, and share your work.
We use GitHub Flow for development.
We keep the following branches for parallel development and release management.
- Main branches
master
: always reflects the production-ready state.develop
: reflects the latest delivered development state. When the source code in thedevelop
branch reaches a stable point and is ready to be released, all of the changes will be merged back intomaster
.
- Release branches
*-release
: holds the code for a specific release. These branches are created fromdevelop
, and will be merged back intomaster
anddevelop
when the release is deployed. Only minor bug fixes or preparing meta-data for a release (version number, build dates, etc.) are allowed in this branch.archived
: holds the original version of PyHealth developed by Yue Zhao et al. This branch is not maintained anymore.
- Feature branches:
[feature_name]
: feature branches are used to develop new features for the upcoming release. These branches are created fromdevelop
and will be merged back intodevelop
once the feature is completed.
- Hotfix branches:
[hotfix_name]
: hotfix branches are used to quickly patch small bugs in the production version. These branches are created frommaster
and will be merged back intomaster
anddevelop
.
See this blog post for more details on Git Branching Model.
All code changes happen through pull requests.
- Create a new branch from
develop
(for feature) ormaster
(for hotfix) - Make the changes
- Write documentation for the changes
- Write unit tests for the changes
- Create a pull request to
develop
(for feature) ormaster
branch (for hotfix) - Wait for the review and merge
We enforce code reviews for the main branches.
master
: requires two approvals from the core developersdevelop
: requires one approval from the core developers