Reference

Contributing

Development setup, formatting and the release-please release pipeline.

For local development or running benchmarks directly from the source repository:

git clone https://github.com/davidgraymi/neural-cost.git
cd neural-cost
pip install -e '.[dev,torch,jax,tensorflow]'

Development

Format and lint the codebase with a single command:

# Auto-format and fix linting in place:
python scripts/format.py
# Or using the shell wrapper:
./scripts/format.sh
# Or via Make:
make format

# Check formatting and linting without modifying files:
python scripts/format.py --check
# Or:
make check

Versioning & Releases

Releases are automated with release-please (.github/workflows/publish.yml) and published to PyPI with trusted publishing. The version lives in pyproject.toml. Never edit it, CHANGELOG.md or the tags by hand.

  1. PRs are squash-merged and the PR title becomes the commit message, so it must follow Conventional Commits. The Conventional PR title CI check enforces this.
  2. On every push to main, release-please opens or updates a chore: release X.Y.Z PR. That PR bumps the version in pyproject.toml, uv.lock and .release-please-manifest.json, and adds the release notes to CHANGELOG.md.
  3. Merging the release PR tags vX.Y.Z and creates the GitHub release. The release is then built once and the test suite runs against the built wheel, not the source tree, on Python 3.11 and 3.14. Only if it passes are the sdist and wheel published to PyPI. Then the website is deployed from the release tag, and the benchmark lower-bound validation runs against the published wheel as a report. Merge the release PR when you want to ship. Until then, further changes just accumulate in it.

The website only changes with a release, so it always matches the version on PyPI. To fix the docs between releases, merge the fix and run the Pages workflow by hand from main (Actions > Pages > Run workflow).

Commit type Version bump In the changelog?
feat!:, fix!: or a BREAKING CHANGE: footer Major (X.0.0) Yes
feat: Minor (0.X.0) Yes, under Features
fix:, perf:, revert: Patch (0.0.X) Yes
docs: Patch, when it is the only change type Yes, under Documentation
refactor:, style:, test:, build:, ci:, chore: None by themselves No

Commits that only touch .github/, benchmarks/, docs/, examples/ or tests/ are left out of releases entirely, because they don’t change the published package.

Edit this page on GitHub