Skip to content

radiocosmology/caput

Repository files navigation

caput

Zenodo Badge CI doc-status Ruff

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.ndarray class
  • In-memory mock-ups of h5py objects, with support for reading from and writing to zarr files
  • 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

Installation

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

Contributing

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]

Pre-commit

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

Ruff

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

Typing

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

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.

About

Cluster Astronomical Python Utilities

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 16