Warning
Until this package reaches version 0.1.x
, breaking changes
should be expected. Checkout the ROADMAP for
future features.
If you have any suggestion regarding the development of this package, please open an issue.
The easiest way to install DiffeRT is through pip:
pip install differt
We provide pre-built binaries for most platforms. If you want (or need) to build the package from the source distribution, check out the requirements below.
Important
The current documentation is very light and a more complete guide for new contributors will be written in the near future.
Until then, do not hesitate to reach me for help with GitHub issues!
This project is built using both Python and Rust code, to provide an easy-to-use but performant program. It also heavily uses the capabilities brought by JAX for numerical arrays.
To run build this package locally, you need:
- Python 3.10 or above;
- Rust stable toolchain;
- any modern C compiler;
- just to easily run commands listed in
justfile
s; - Maturin for building Python bindings from Rust code;
- and uv to manage this project.
This project contains justfile
s with recipes1 for most common
use cases, so feel free to use them instead of the commands listed below/
The following commands assume that you installed the project locally with:
uv sync
and that you activated the corresponding Python virtual environment:
. .venv/bin/activate # or .venv\Scripts\activate on Windows
To generate the documentation, please run the following:
just docs/build
Finally, you can open docs/build/html/index.html
to see the generated docs.
Other recipes are available, and you can list them with just docs/
.
Both Rust and Python codebases have their own tests and benchmarks.
You can test Rust code using Cargo:
cargo test
or benchmark it:
cargo bench
Similarly, you can test Python code with Pytest:
pytest
or benchmark it:
pytest --benchmark-enable differt/tests/benchmarks
If you use this software, please cite it as detailed here.
Footnotes
-
just
is as alternative tool to Make, that provides more modern user experience. Enterjust
to list all available recipes. ↩