uv is the recommended way to install PyReduce:
uv add pyreduce-astroOr to install globally:
uv tool install pyreduce-astropip install pyreduce-astroClone the repository and use uv:
git clone https://github.com/ivh/PyReduce
cd PyReduce/
uv syncThis will automatically:
- Create a virtual environment
- Install all dependencies
- Build the CFFI C extensions
- Install PyReduce in editable mode
To run commands:
uv run reduce --help # CLI
uv run pytest -m unit # Tests
uv run python examples/uves_example.pyThe C extensions are built automatically during uv sync. To manually rebuild them:
uv run reduce-build # Build C extensions
uv run reduce-clean # Remove compiled extensionsThis is useful after modifying the C source files in pyreduce/clib/.
PyReduce uses CFFI to link to C code. On non-Linux platforms you may need to install libffi. See https://cffi.readthedocs.io/en/latest/installation.html#platform-specific-instructions for details.