Contributing to Hiraku¶
Feature requests and bug reports¶
Submit issues and feature requests through the GitHub issue tracker. Bug reports should include the command, a minimal reproduction, Python version, and operating system.
Development setup¶
Hiraku uses Python 3.11+.
git clone https://github.com/SwissDataScienceCenter/hiraku.git
cd hiraku
uv sync --all-extras
uv run hiraku --help
Install the pre-commit hooks:
Run the hooks manually across the repository with:
Install optional tracking integrations when needed:
Development workflow¶
Run these checks before opening a pull request:
Pytest uses parallel workers, capped at four to limit memory use. Write tests as pytest functions; do not use unittest.TestCase. Tests should not require network access or W&B/MLflow credentials.
Remove Python cache debris with uvx pyclean . --debris.
Keep public models and CLI behavior explicit. Add tests for new behavior and update the relevant documentation when a public interface changes.
Documentation and examples¶
Preview the documentation locally:
Keep onboarding instructions short. Examples should have simple commands and an end-to-end test under tests/examples/.
Commits and pull requests¶
Use a feature branch and focused commits. Conventional Commit prefixes such as feat:, fix:, docs:, test:, and refactor: are preferred. Pull requests should describe the user-visible change, tests run, and compatibility or configuration changes.
Release a new version¶
Release permissions are restricted to maintainers and administrators.
- Make sure
## [Unreleased]inCHANGELOG.mdhas at least one entry. In GitHub Actions, run Prepare release frommainand selectpatch,minor, ormajor. The workflow bumps the version, updates the lockfile and changelog, and opens a PR. Prepare release - Select Approve workflows to run on the PR to start CI. Review and merge the PR once the checks pass.
- Tag the merged commit using the version and commit SHA shown by GitHub.
git fetch origin main
git tag vX.Y.Z <merge-commit-sha>
git push origin vX.Y.Z
gh workflow run release.yml --ref vX.Y.Z
The Release workflow checks the tag against the project version and confirms the tagged commit is on main. It builds the distributions, publishes them to PyPI, and attaches the same files to the GitHub release.