Contributing#
Contributions both big and small to the pengwann codebase and/or its associated documentation are very welcome!
Guidelines#
If you are going to submit a pull request to pengwann, please first check that it meets these general guidelines if possible:
New/modified functionality should be accompanied by new/appropriately modified tests.
New/modified functionality should be accompanied by new/appropriately modified documentation.
In keeping with the current codebase, please use numpy-style docstrings to document all Python source code.
Where possible, write new code in a somewhat functional style[1].
Write new code for Python >= 3.10 only i.e., avoid deprecated code and coding patterns designed for Python <= 3.9.
Recommended developer workflow#
Contributions to pengwann should be made via the fork and pull framework:
Fork the
pengwannrepository on GitHub.Clone a local version of your new fork:
git clone git@github.com:your_username_here/pengWann.git
Set up a development environment with uv:
cd pengWann
uv sync
Note that, as mentioned in the installation guide, building pengwann from source (which will happen automatically when uv syncs the environment) requires the Rust compiler (see rustup for installation).
Create and switch to a new branch:
git switch -c name_of_new_feature
Implement the changes that you would like to contribute.
If you have modified the Python source, run
ruff,basedpyrightandpytestto lint, format, type check and run the test suite:
uv run ruff check
uv run ruff format
uv run basedpyright
uv run pytest
If you have modified the Rust source, run clippy and rustfmt to lint and format:
cargo clippy
cargo fmt
Regardless of whether or not you validate your changes in the manner shown above, they will be checked in CI when you open a pull request.
Commit your changes and push to GitHub:
git add src/pengwann/changed_file.py
git commit -m 'Short description of changes made.'
git push origin name_of_new_feature
Submit a pull request.