caput provides a variety of utilities for dealing with large datasets on computer clusters with applications to radio astronomy in mind. For more information, see the docs: https://caput.readthedocs.io/.
Includes:
- An MPI-distributed
np.ndarrayclass - In-memory mock-ups of
h5pyobjects, with support for reading from and writing tozarrfiles - Lightweight infrastructure for running data pipelines, scaling from a laptop to large, distributed clusters
- A collection of fast, optimized algorithms written using
cython - A collection of astronomy-oriented coordinate, ephemeris, and time utilities
caput can be installed with pip in the usual way:
$ pip install git+https://github.com/radiocosmology/caput.git
For complete functionality, it is recommended to do a complete install:
$ pip install caput[complete]@git+https://github.com/radiocosmology/caput.git
Developers are recommended to use an editable dev install, which will install
all of the necessary dependencies to contribute to the project.
$ git clone https://github.com/radiocosmology/caput.git
$ cd caput
$ pip install .[dev]
caput uses pre-commit to run checks on git commits.
pre-commit is included as a dev dependency, but the pre-commit hooks must be
manually installed.
$ pre-commit install
All new code must be formatted and checked using ruff.
ruff checks will run automatically on commits when pre-commit is configured,
but they can also be run manually.
$ ruff format
$ ruff check
At minimum, all new code must include type hints for:
- Public function signatures
- Public class attributes, properties, and methods
- Global variables
Additional type hints are encouraged but not required.
Tests which should only be run with MPI should be marked using pytest.mark.mpi.
Tests that are expected to xfail when run with MPI should be marked with
pytest.mark.mpi_xfail. Finally, tests that should be skipped when running
with MPI should use pytest.mark.mpi_skip. When running test with MPI, the
invocation should include the flag --with-mpi in order for these marks to be
set correctly. See pytest-mpi
for more information.