Installation#
Python Versions#
vampires_dpp requires Python 3.10 or newer. CI tests run against 3.10 (minimum), 3.14 (latest stable), and 3.15 (pre-release) on Linux, macOS, and Windows.
Managing python versions
Subaru’s archive interface depends on python 2, while this package requires at least python 3.10. You will inevitably need to manage different python versions. We recommend using uv to manage Python installations and virtual environments.
From GitHub#
Install directly from GitHub using uv (recommended) or pip:
uv add git+https://github.com/scexao-org/vampires_dpp
# or
pip install git+https://github.com/scexao-org/vampires_dpp
From Source#
Clone the repository and install in editable mode:
git clone https://github.com/scexao-org/vampires_dpp
cd vampires_dpp
uv sync
# or
pip install -e .
Testing#
You can quickly check if you’ve installed the pipeline correctly by calling the dpp command
dpp --version
To run the unit tests:
uv run --extra test pytest
# or
pip install -e ".[test]" && pytest
This will automatically run the tests with plugins enabled. All of the tests should (of course) pass. If any of the tests don’t pass and if you can’t sort out why, open an issue on GitHub.
Contributing#
If you would like to contribute, first off, thank you! To get started, clone the repo, sync the environment, and install the pre-commit hooks:
git clone https://github.com/scexao-org/vampires_dpp
cd vampires_dpp
uv sync --extra dev
pre-commit install
uv sync --extra dev installs all development tools (ruff, ty) into the project venv. pre-commit install wires up the git hooks, which call those tools via uv run — so there is no separate tool version to manage.
Now whenever you git commit, source files will be linted and formatted using ruff and the uv.lock file will be kept in sync. Any linting errors that cannot be auto-fixed will block git commit unless overridden with git commit -n.
Any contributions should be submitted as pull requests. Feel free to reach out ahead of time about questions or ambitions about contributing.
Documentation#
To build these docs locally, install the documentation dependencies:
uv sync --extra docs
# or
pip install -e ".[docs]"
Then run the sphinx build:
sphinx-build docs docs/_build
Local docs viewer
To quickly serve the generated HTML files you can use
python -m http.server -d docs/_build/html 8000
(or any port you’d like) and view them in an internet browser at the url localhost:8000/index.html