Contributing to Junix¶
Quick Start¶
Development Environment¶
Junix uses Nix with devshell to provide a reproducible development environment. This gives you Python, uv, and all required tools automatically.
Option 1: With direnv (Recommended)¶
- Install direnv for your shell
- Run
direnv allowin the project root
The shell will automatically activate when you enter the directory.
Option 2: Without direnv¶
This directly enters the development shell without direnv.
Option 3: Without Nix¶
If you prefer not to use Nix, install uv manually and run:
Running Tests¶
All tests must pass when you submit a merge request.
Run a single test file:
Run with coverage:
Type-check only:
Lint and format:
Building Documentation¶
Start a local server with docs:
Build it statically (done automatically by CD):
Commit Messages¶
Commit messages should follow the Conventional Commits specification. This is enforced by Commitizen.
Publishing Releases¶
Junix uses Commitizen for version management and automated changelog generation. Releases are published automatically when a git tag is pushed.
Creating a Release¶
This command will:
- Update
pyproject.tomlwith the new version - Create an annotated git tag
- Push the commit and tags to the remote
- Trigger CD jobs that will publish the packages
CI/CD Variables Required¶
To enable automatic publishing, the following CI/CD variables must be configured in GitLab (Settings > CI/CD > Variables):
| Variable | Description |
|---|---|
PYPI_API_TOKEN_TEST |
API token for test.pypi.org |
PYPI_API_TOKEN |
API token for pypi.org |
The GitLab PyPI registry is published automatically using the CI job token (no additional configuration required).
Publishing Order¶
When a tag is pushed, the wheel is published to: