Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ benchmark/data
.pixi
*.egg-info

# uv (lockfile intentionally not committed; pixi.lock is the reproducible env)
uv.lock

# ProperDocs build output
site/
# Temporary files
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,22 @@ pip install crazyflow # CPU
pip install "crazyflow[gpu]" # GPU (Linux x86-64, CUDA 12)
```

Developer install with editable submodules ([pixi](https://pixi.sh/) required):
Developer install with editable install ([pixi](https://pixi.sh/) recommended):

```bash
git clone --recurse-submodules https://github.com/learnsyslab/crazyflow.git
git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
pixi shell
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
uv sync # core + dev tooling (tests, docs, ruff)
```

## Performance

First-principles dynamics, one drone. CPU: AMD Ryzen 9 7950X. GPU: NVIDIA RTX 4090.
Expand Down
36 changes: 31 additions & 5 deletions docs/get-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ Select your installation method from the tabs below, then read the notes under e
pixi shell -e tests
```

=== "uv"

```bash
git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
uv sync # core + dev tooling (tests, docs, ruff)
uv run python -c "from crazyflow.sim import Sim; Sim().reset()"
```

---

## GPU support
Expand All @@ -41,16 +50,33 @@ JAX defaults to CPU-only execution. The `gpu` extra swaps in `jax[cuda12]`, enab

## Developer install

[Pixi](https://pixi.sh/) creates a fully reproducible environment. This variant installs `crazyflow` in editable mode. Any source change takes effect immediately without reinstalling. Recommended for contributors and researchers who modify the simulator.
[Pixi](https://pixi.sh/) creates a fully reproducible environment (locked via `pixi.lock`). This variant installs `crazyflow` in editable mode. Any source change takes effect immediately without reinstalling. Recommended for contributors and researchers who modify the simulator.

[uv](https://docs.astral.sh/uv/) is supported as an alternative. `uv sync` creates a `.venv` with `crazyflow` installed editable plus the `dev` dependency group (tests, docs, ruff). The dependency groups (`tests`, `docs`, `dist`, `dev`) mirror the pixi features and are defined under `[dependency-groups]` in `pyproject.toml`. The uv lockfile is not committed — `pixi.lock` remains the canonical reproducible environment.

```bash
uv sync # core + dev group (default)
uv sync --group docs # only the docs group + core
uv sync --no-default-groups --extra gpu # core + GPU extra, no dev tooling
```

## Testing

Adds `pytest` and `pytest-markdown-docs` for running the test suite and doc snippet tests.

```bash
pixi run tests # unit and integration tests
pixi run test-docs # doc code snippet tests
```
=== "pixi"

```bash
pixi run tests # unit and integration tests
pixi run test-docs # doc code snippet tests
```

=== "uv"

```bash
uv run pytest -v tests # unit and integration tests
uv run pytest -v --markdown-docs --markdown-docs-syntax=superfences crazyflow/ docs/ --ignore=docs/gen_ref_pages.py
```

## Verify the installation

Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,33 @@ benchmark = ["fire", "matplotlib", "pandas", "pyinstrument"]
Homepage = "https://github.com/learnsyslab/crazyflow"
Repository = "https://github.com/learnsyslab/crazyflow"

# Dependency groups for uv-based developer workflows. These mirror the pixi features below
# ([tool.pixi.feature.*]). `uv sync` installs the `dev` group by default. pixi ignores this table.
[dependency-groups]
tests = [
"pytest>=8.4.1",
"pytest-timeout>=2.1.0",
"array-api-strict>=2.4.1",
"matplotlib",
"pytest-markdown-docs",
]
docs = [
"properdocs>=1.5.0",
"mkdocs-material>=9.0.0",
"mkdocs-autorefs>=1.2.0",
"mkdocstrings[python]>=0.26.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.0",
"mkdocs-section-index>=0.3.0",
"mkdocs-charts-plugin>=0.0.10",
]
dist = ["build>=1.3", "twine>=6.0"]
dev = [
"ruff",
{ include-group = "tests" },
{ include-group = "docs" },
]

[tool.setuptools.packages]
find = {include = ["crazyflow*"]}

Expand Down
Loading