Thanks for your interest in improving CPSE! This guide covers both community processes and the practical developer workflow.
- Code of Conduct
- Asking questions
- Reporting bugs
- Suggesting enhancements
- Contribution workflow
- Contributor License Agreement (CLA)
- Developer guide: Setup · Common tasks · Test suite · Development wheels
- For maintainers: Cutting a release · Dependencies
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold it. Report unacceptable behaviour to pso-tools@fbk.eu; reports are handled confidentially.
For usage questions, in order:
- Check the README.
- Search the open and closed issues.
- If nothing matches, open an issue with the
questionlabel, including your CPSE version, Python version, and OS.
Before filing, confirm you are on the latest version and search for duplicates. A useful bug report includes:
- a minimal reproducible example: the scheduling problem as a Unified Planning Python snippet, the solver parameters, expected vs. actual output;
- the full stack trace, if any.
- version information:
pip show cpse unified-planning ortools,python --version, and your OS.
Reports without a reproduction get labelled needs-repro and won't be
actively worked on until reproducible.
For new features, search the issues for prior discussion and then open one yourself, before writing code. Describe:
- The use case and why it benefits the broader project, not only your immediate need.
- A sketch of the proposed API or behaviour.
- Any alternatives you considered.
This lets us catch scope / design issues early and saves you from writing a PR that needs to be redone.
For non-trivial changes:
- Open an issue first (or comment on an existing one) to align on scope and approach.
- Fork the repo and create a feature branch off
main:git checkout -b feat/short-description. - Make focused, well-described commits. Behaviour changes should come with new or updated tests.
- Run
just precommitlocally — it must pass (this is exactly what CI's lint job runs). - Run
just testand fix any failures locally first. - Push to your fork and open a pull request against
main. Give the PR a clear, user-facing title: release notes are auto-generated from PR titles, so your title becomes a release-note line verbatim. - On your first PR the CLA assistant bot will ask you to sign the CLA — see the next section.
- Address review comments.
Typo fixes and minor documentation changes can skip the first step.
Before your first contribution can be merged, you must sign the FBK PSO Unit Individual Contributor License Agreement.
CPSE is released under GPL-3.0; the CLA
defines the licence terms under which you grant FBK the right to use
your contributions across all fbk-pso open-source projects.
On your first PR, the cla-assistant bot
posts a comment with a sign-in link; you authenticate with GitHub
OAuth and click "I agree". The signature applies to every subsequent
contribution you make to any project under the
fbk-pso organisation.
Exemptions: FBK PSO Unit staff (whose contributions are governed by their employment contracts) and automated accounts (bots) are whitelisted in the cla-assistant configuration and skip the prompt.
Prerequisites:
- Python 3.10+
- uv — Python project / environment manager
- just — command runner (install with
uv tool install rust-justor your package manager)
Clone and bootstrap:
git clone https://github.com/fbk-pso/cpse.git
cd cpse
uv sync --all-extras # creates .venv and installs dev deps
uv run pre-commit install # run the checks automatically on each commitThe repo uses uv for environment/lock management, ruff for linting and
formatting, mypy for type checking, pre-commit hooks, and just as the task
runner.
| Command | What it does |
|---|---|
just install |
uv sync — create .venv from uv.lock |
just test |
run the pytest suite |
just lint |
ruff lint + format checks |
just format |
auto-fix lint issues and reformat via ruff |
just typecheck |
mypy |
just precommit |
all pre-commit hooks — matches CI's lint job exactly |
just build |
build sdist + wheel into ./dist/ |
just clean |
remove build/dist/cache directories |
Run just --list to see them all.
just test runs the local pytest suite, which is self-contained.
To reproduce the full Unified Planning engine report that CI runs, clone the
UP repository for its up_test_cases/ package (not shipped on PyPI), register
both engines, and run report.py:
sha=$(python3 -c "import tomllib; d = tomllib.load(open('uv.lock', 'rb')); print(next(p['source']['git'].rsplit('#', 1)[1] for p in d['package'] if p['name'] == 'unified-planning'))")
git clone --filter=blob:none https://github.com/aiplan4eu/unified-planning.git up-checkout
git -C up-checkout checkout "$sha"
printf '[engine cpse]\nmodule_name: cpse\nclass_name: CPSE\n\n[engine cpse-timepoints]\nmodule_name: cpse\nclass_name: CPSETimepoints\n' > .up.ini
uv run python up-checkout/up_test_cases/report.py cpse
uv run python up-checkout/up_test_cases/report.py cpse-timepointsSee .github/workflows/test.yml for the exact steps.
CI builds a wheel on every push to main and publishes it as a rolling
pre-release tagged dev under Releases. These use PEP 440 dev versions like
0.1.0.dev42+g<sha>. Install one locally:
pip install --pre <url-of-wheel-on-dev-release>The rest of this file covers operations that need push or merge rights on the repo.
Run just bump 0.2.0, then run the git commands it prints. This automates the
manual steps below:
- Bump
versionin pyproject.toml. - Refresh the lock file:
uv lock
- Commit, tag, and push:
git commit -am "release: v0.2.0" git tag v0.2.0 && git push --follow-tags
Pushing a v* tag triggers build-and-release.yml, which publishes the sdist +
wheel to PyPI via Trusted Publishing (OIDC) and creates a GitHub Release with
auto-generated notes and the built artifacts. The dev-release and
github-release jobs authenticate with the built-in GITHUB_TOKEN
(contents: write) — no extra secrets required.
Dependabot opens weekly pull requests for Python
dependencies (uv) and pinned GitHub Actions versions. Review the diff, let CI
run, and merge if green.
CLAUDE.md documents the architecture, tooling conventions, and design rationale. It is written primarily for Claude Code agents but is useful for any contributor.