-
Fork & clone the repository:
git clone https://github.com/FranekGit/pse-python-sdk.git cd pse-python-sdk -
Install uv and sync the environment (creates
.venvwith the package and dev dependencies, pinned byuv.lock):uv sync
-
Checkout
develop— all feature work starts here:git checkout develop
The two long-lived branches:
| Branch | Purpose |
|---|---|
main |
Stable, production-ready releases |
develop |
Integration branch for the next release |
Short-lived branches for specific work:
| Branch | From | Merges back to | Purpose |
|---|---|---|---|
feature/<name> |
develop |
develop |
New features |
bugfix/<name> |
develop |
develop |
Non-critical bug fixes |
release/<version> |
develop |
main + develop |
Release preparation |
hotfix/<name> |
main |
main + develop |
Critical production fixes |
Run these from the project root:
# Run tests
uv run pytest
# Lint
uv run ruff check src/ scripts/ tests/
# Format
uv run ruff format src/ scripts/ tests/Fix any lint/test failures before opening a PR.
src/pse_sdk/_registry.py is generated from the PSE OpenAPI spec (https://api.raporty.pse.pl/api/openapi) — don't edit it by hand.
# Regenerate from the live spec
uv run scripts/gen_registry.py
# Check that the committed registry is up to date
uv run scripts/gen_registry.py --checkdocs/endpoints.md is generated from the registry — don't edit it by hand. Regenerate it after any registry change.
# Regenerate
uv run scripts/gen_docs.py
# Check that the committed docs are up to date
uv run scripts/gen_docs.py --checkDev dependencies live in the dev dependency group in pyproject.toml; exact versions are pinned in uv.lock.
# Add a dev dependency
uv add --dev <package>
# Upgrade a single locked package
uv lock --upgrade-package <package>Commit uv.lock together with any pyproject.toml dependency change.
Use Conventional Commits:
<type>: <short description>
Supported types:
| Type | Use for |
|---|---|
feat: |
New features |
fix: |
Bug fixes |
refactor: |
Code restructuring (no behavior change) |
test: |
Adding or updating tests |
docs: |
Documentation changes |
chore: |
Maintenance tasks (deps, CI, config) |
- Target
developforfeature/*andbugfix/*branches. - Target
mainonly forhotfix/*andrelease/*branches. - Ensure tests pass and linting is clean before requesting review.