Thank you for your interest in contributing to Erasus! This guide will help you get started.
git clone https://github.com/OnePunchMonk/erasus.git
cd erasus
pip install -e ".[dev]"
python -m pytest tests/ -vOpen an issue with:
- Steps to reproduce
- Expected vs actual behavior
- Python/PyTorch version
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Follow the coding conventions (PEP 8, type hints, docstrings)
- Write tests for your changes
- Ensure all tests pass:
python -m pytest tests/ -v - Submit a pull request
See the developer guide in docs/developer_guide/ for patterns.
- PEP 8 with 88-character lines (Black format)
- Type hints for all public functions
- Google-style docstrings
- Tests for all new functionality
Releases are published to PyPI as the erasus package via GitHub Actions. The version is taken from the Git tag (e.g. tag v0.1.2 → PyPI version 0.1.2), so you don’t bump version in the repo for releases and you never publish the same version twice.
- PyPI trusted publishing (recommended): On PyPI, add your GitHub repo and configure the
pypienvironment with trusted publisher. No API token is needed in CI. - Or API token: Create a PyPI token and add it as repository secret
PYPI_API_TOKEN(used by older workflows).
- Commit and push to
main(no need to editversion.pyorpyproject.tomlfor the release). - On GitHub: Releases → Create a new release:
- Create a new tag (e.g.
v0.1.2). The tag name must be a valid version:v0.1.2or0.1.2. - Title e.g.
v0.1.2. - Publish the release.
- Create a new tag (e.g.
- The workflow
.github/workflows/publish.ymlruns onrelease: published, sets the package version from the tag, builds once, and uploads to PyPI. - Users can install with:
pip install erasus==0.1.2orpip install erasus,pip install erasus[full],pip install erasus[hub].
- Version is defined by the tag. The workflow overwrites
pyproject.tomlanderasus/version.pywith the tag-derived version at build time. If you expected 0.1.2 but the release tag is stillv0.1.1, the published package will be 0.1.1. - PyPI rejects re-uploading the same version. If you see
400 Bad Request, that version already exists on PyPI. Create a new tag (e.g.v0.1.3) and publish a new release; do not re-publish the same tag. - Stale
dist/: The workflow runsrm -rf dist/before building so only the current tag’s artifacts are uploaded.
pip install build
python -m build
# Artifacts in dist/: erasus-<version>.tar.gz, erasus-<version>-*.whl
# Version comes from pyproject.toml (for local dev).- Code follows project style guidelines
- Tests added for new functionality
- All tests pass (
python -m pytest tests/ -v) - Documentation updated (if applicable)
- Commit messages are clear and descriptive