Installation¶
Requirements¶
nsb2 requires Python 3.11 or later.
Basic Installation¶
Install directly from the git repository:
pip install git+https://github.com/GerritRo/nsb2.git
Using nsb2 with ctapipe¶
nsb2’s dependency bounds are chosen to overlap those of ctapipe, so the two install into a single environment without a resolver conflict:
pip install ctapipe git+https://github.com/GerritRo/nsb2.git
Development Installation¶
For development or to access example notebooks, clone the repository:
git clone https://github.com/GerritRo/nsb2.git
cd nsb2
pip install -e ".[dev]"
pre-commit install
This installs additional development dependencies:
pytestfor running testsmypyfor type checkingrufffor code linting and formattingpre-commitfor running both automatically before each commitcommitizenfor conventional commits
Running the Tests¶
pytest
Tests live next to the code they cover, in nsb2/<subpackage>/tests/.
Tests that download reference data from STScI, Zenodo or the SVO Filter
Profile Service are marked remote_data and are skipped by default; run
them explicitly with:
pytest -m remote_data
Building Documentation¶
To build this documentation locally:
pip install -e ".[docs]"
cd docs
make html
The built documentation will be in docs/_build/html/.
Dependencies¶
nsb2 depends on:
Package |
Purpose |
|---|---|
Array operations |
|
Interpolation and integration |
|
Coordinates, units, and time |
|
HEALPix sky pixelization |
|
BallTree spatial queries |
|
Dust extinction models |