ESS Data Reduction Monorepo
Monorepo for ESS neutron scattering data reduction packages, managed with pixi.
| Package | Description |
|---|---|
| essreduce | Common data reduction tools (core) |
| essdiffraction | Diffraction data reduction for the European Spallation Source |
| essimaging | Neutron imaging (ODIN, TBL, YMIR) |
| essnmx | Data reduction for NMX at the European Spallation Source. |
| essreflectometry | Reflectometry data reduction for the European Spallation Source |
| esssans | Data reduction for SANS at the European Spallation Source. |
| essspectroscopy | Data reduction for spectroscopy at the European Spallation Source. |
Dependency graph
essreduce
├── essdiffraction
├── essimaging
├── essnmx
├── essreflectometry
└── esssans
└── essspectroscopy
Developer Guide
Prerequisites
Install pixi:
curl -fsSL https://pixi.sh/install.sh | bashSetup
git clone git@github.com:scipp/ess.git cd ess # Install all packages (editable, with test deps): pixi install # Or just one package: pixi install -e essreduce
The pixi.lock file pins all dependencies reproducibly. No tox, no pip-compile, no manual virtualenv.
Running tests
# Test a package: pixi run test essreduce pixi run test essimaging pixi run test essreflectometry pixi run test essdiffraction pixi run test essnmx pixi run test esssans pixi run test essspectroscopy # Test a single file: pixi run -e essreduce pytest packages/essreduce/tests/normalization_test.py
Linting and formatting
pixi run -e lint lint # all pre-commit hooks pixi run -e lint check # ruff check pixi run -e lint format # ruff format
Building docs
pixi run docs-essreduce pixi run docs-essimaging pixi run docs-essreflectometry pixi run docs-essdiffraction pixi run docs-essnmx pixi run docs-esssans pixi run docs-essspectroscopy
Adding or changing dependencies
Edit the package's pyproject.toml, then re-lock:
pixi install
Commit the updated pixi.lock.
Releasing a package
Push a tag with the package prefix:
git tag essreduce/26.3.0 git push origin main --tags
The release.yml workflow builds, publishes to PyPI, and deploys docs.
How CI works
- On PRs: Only changed packages are tested (changing
essreducealso testsessimaging) - Nightly: All packages tested against latest deps + lower-bound deps
- Weekly: All packages tested on macOS and Windows
Repo structure
pixi.toml ← workspace root (features, tasks, environments)
pixi.lock ← single lockfile for all packages
.pre-commit-config.yaml ← shared linting hooks
packages/
essdiffraction/
pyproject.toml
src/ess/
diffraction/ ← source code (ess.diffraction namespace)
dream/ ← source code (ess.dream namespace)
...
tests/
docs/
essimaging/
pyproject.toml
src/ess/
imaging/ ← source code (ess.imaging namespace)
odin/ ← source code (ess.odin namespace)
...
...
essnmx/
pyproject.toml
src/ess/nmx/ ← source code (ess.nmx namespace)
...
essreduce/
pyproject.toml ← package deps, version, pytest config
src/ess/reduce/ ← source code (ess.reduce namespace)
...
essreflectometry/
pyproject.toml
src/ess/
reflectometry/ ← source code (ess.reflectometry namespace)
...
...
esssans/
pyproject.toml
src/ess/
sans/ ← source code (ess.sans namespace)
...
...
essspectroscopy/
pyproject.toml
src/ess/
spectroscopy ← source code (ess.spectroscopy namespace)
...