This project is set up to use uv to manage Python and dependencies. First, be sure you have uv installed.
Then fork the det-lab/reaction-kinematics repo (having your own fork will make it easier to contribute) and clone it.
git clone https://github.com/your-username/reaction-kinematics.git
cd reaction-kinematics
uv syncThe Makefile simply offers shortcuts to uv commands for developer convenience.
(For clarity, GitHub Actions don't use the Makefile and just call uv directly.)
# First, install all dependencies and set up your virtual environment.
# This simply runs `uv sync --all-extras` to install all packages,
# including dev dependencies and optional dependencies.
make install
# Run uv sync, lint, and test (and also generate agent rules):
make
# Build wheel:
make build
# Linting:
make lint
# Run tests:
make test
# Delete all the build artifacts:
make clean
# Upgrade dependencies to compatible versions:
make upgrade
# To run tests by hand:
uv run pytest # all tests
uv run pytest -s src/module/some_file.py # one test, showing outputs
# Build and install current dev executables, to let you use your dev copies
# as local tools:
uv tool install --editable .
# Dependency management directly with uv:
# Add a new dependency:
uv add package_name
# Add a development dependency:
uv add --dev package_name
# Update to latest compatible versions (including dependencies on git repos):
uv sync --upgrade
# Update a specific package:
uv lock --upgrade-package package_name
# Update dependencies on a package:
uv add package_name@latest
# Run a shell within the Python environment:
uv venv
source .venv/bin/activateSee uv docs for details.
See .cursor/rules for agent rules.
These are written for Cursor but are also used by other
agents because the Makefile will generate CLAUDE.md and AGENTS.md from the same
rules.
make agent-rulesIf you use VSCode or a fork like Cursor or Windsurf, you can install the following extensions:
-
Based Pyright for type checking. Note that this extension works with non-Microsoft VSCode forks like Cursor.
To preview the docs site locally:
uv run mkdocs serveThis file was built with simple-modern-uv.
Kinematics calculator for nuclear reactions
👉[[[This is the initial readme for your simple-modern-uv template. Fill it in and delete this message! Below are general setup instructions that you may remove or keep and adapt for your project.]]]
For how to install uv and Python, see installation.md.
For development workflows, see development.md.
For instructions on publishing to PyPI, see publishing.md.
This project was built from simple-modern-uv.