Developer Install
This page covers setting up a development environment. If you only want to use TABASCAL, follow the installation instructions in the usage guide instead.
pixi (recommended for development)
pixi is the recommended way to develop TABASCAL. It manages
both conda and PyPI dependencies and creates isolated environments
automatically, so it resolves python-casacore for you rather than leaving it
as a manual conda step.
Install pixi
curl -fsSL https://pixi.sh/install.sh | sh
Available environments
Environment |
Platform |
Description |
|---|---|---|
|
linux-, macos- |
CPU-only runtime environment |
|
linux-, macos- |
CPU + testing and documentation tools |
|
linux-* |
NVIDIA GPU (CUDA 12) runtime |
|
linux-* |
NVIDIA GPU + testing and docs |
Install an environment
git clone git@github.com:epfl-radio-astro/tabascal.git
cd tabascal
# CPU (default)
pixi install
# Development (includes pytest, sphinx, etc.)
pixi install -e dev
# NVIDIA GPU
pixi install -e cuda12
Open a shell in the environment
pixi shell # default environment
pixi shell -e dev # dev environment
Editable install without pixi
An editable install into an existing environment also works. Provide
python-casacore first, as described in the usage
guide:
git clone git@github.com:epfl-radio-astro/tabascal.git
pip install -e ./tabascal[dev]
The dev extra pulls in the test and docs extras along with pre-commit
and reframe-hpc.
Running tests
pixi run -e dev test # all tests
pixi run -e dev test-components # component tests only
To run a single file or test, open a dev shell first:
pixi shell -e dev
pytest tests/components/test_gains.py
pytest tests/components/test_gains.py::TestUnitaryGains::test_forward_vis_obs_equals_sum
SGP4 component tests use a bundled TLE cache (tabascal/data/tles/) and run
without Space-Track credentials.
The end-to-end pipeline tests, which compare inference results against recorded reference values, are described in Pipeline tests.
Building the documentation
pixi run -e dev docs-build
After building, open docs/_build/html/index.html in a browser.
Without pixi, run sphinx-build directly from the base directory of the
repository:
sphinx-build -b html docs docs/_build/html
The documentation is also published on Read the Docs, one version per release
tag plus latest from main, selectable from the version flyout on every page.
Read the Docs setup covers the version scheme, how to publish
a release or an extra branch, and the warnings-as-errors build that CI and Read
the Docs both run.