We welcome all kinds of contributions to keep PyHealth growing and thriving: bug reports, feature proposals, new datasets, tasks, and models, bug fixes, and documentation improvements.
The full contributor guide lives in our documentation:
How to Contribute
(source: docs/how_to_contribute.rst).
Please read it before opening a pull request. It covers:
- Examples of great contributions and the review criteria we use
- Setting up your development environment
- Getting data access (MIMIC credentialing and open demo datasets)
- Implementation requirements: file headers, code style, and docstrings
- File checklists for contributing a dataset, task, or model
- Test case requirements, including how to write fast tests with synthetic data
- How to format your pull request description
-
Clone your fork and install it in editable mode:
git clone https://github.com/your_username/PyHealth.git cd PyHealth pip install -e .
-
Implement your change with tests and documentation
-
Push to your fork and open a pull request against the
masterbranch, with "Allow edits by maintainers" enabled
For trivial changes you can open a pull request directly. For non-trivial changes, please discuss them in an issue first.
Submit an issue on GitHub to report a bug or propose a new feature. For bug reports, please include:
- A quick summary
- Steps to reproduce (with sample code if possible)
- What you expected to happen
- What actually happens
- Why you think this might be happening, and anything you tried that did not work
Any pull request that modifies a file under pyhealth/ must:
- Keep newly added/modified lines free of ruff
lint violations (
ruff check, 88-char line length). Pre-existing lint issues elsewhere in a touched file are not blocked. - Give every new or modified top-level public class/function a
>>>usage example in its docstring, so it renders as example code in the API docs.
These rules are checked by .github/workflows/pr_contribution_rules.yml,
which runs tools/check_pr_rules.py. You can run the same check locally:
python tools/check_pr_rules.py --base <base_sha> --head HEADJoin our Slack workspace to ask questions, discuss ideas, and share your work.