How to Contribute#
We always welcome contributions and have tried to simplify the process of adding new features or fixing bugs to pymer4. You can checkout the development roadmap on Github
1. Get the code & setup a development environment#
Install pixi the Python project manager that handles environments and dependencies (won’t conflict with any exist Python tools like conda or pip!)
curl -fsSL https://pixi.sh/install.sh | bash
Fork the main branch on github, clone your fork, and install the development dependencies in an isolated Python environment:
git clone https://github.com/YOURFORK/pymer4.git
cd pymer4
pixi install
pixi run setup-kernel # optional if you want to run notebooks interactively
2. Make code changes and test them#
After editing any files with your changes you can run use a variety of pixi tasks defined in the pyproject.toml file to perform common development tasks:
Run the full test-suite with
pixi run tests
And check code formatting with
pixi run lint
Or try to fix code formatting
pixi run lint-fix
Or build docs
pixi run docs-build
And preview them
pixi run docs-preview
3. Push your changes to Github and open a pull request!#
Opening a PR will setup a fresh pymer4 install and rerun the test-suite with your changes while also ensuring the package can be built and subsequently installed. We’ll review your changes and request any modifications before accepting a merge!
General Recommendations#
Please use google style docstrings for documenting all functions, methods, and classes.
Please make sure to follow proper PEP code-formatting (
pixi run lintchecks this for you using Ruff)When adding new functionality, please be sure to create new tests and verify they pass using
pixi run tests
Updating Documentation#
Documentation is written using jupyterbook with the following sphinx extensions:
New documentation can be created by:
Adding new markdown files to
docs/to create new pagesAdding new jupyter notebooks to
docs/tutorials/to create new tutorialsAdding an
eval-rstblock to auto-generate any new API documentation (see existing)Adding the filename(s) to the
navsection ofdocs/_toc.ymlUsing
pixi run doc-buildandpixi run docs-previewto preview changes