Skip to content

Pin NeuNorm to pre-2.0 (stopgap) and port iBeatles to NeuNorm 2.0 API #412

Description

@KedoKudo

Problem

conda.recipe/meta.yaml installs NeuNorm unpinned from its default branch:

- {{ PYTHON }} -m pip install git+https://github.com/ornlneutronimaging/NeuNorm.git --no-deps --no-build-isolation -vvv

NeuNorm 2.0 merged into next on 2026-06-04 (NeuNorm PR #124, merge c26cbf0, branch neunorm-2.0-base). Because the install has no @ref, iBeatles now pulls 2.0, which is a problem on two levels:

  1. Build: 2.0 switched to the Hatchling backend (build-backend = "hatchling.build"); with --no-build-isolation and no hatchling in the recipe's build requirements, the conda build fails with Cannot import 'hatchling.build' (symptom tracked in conda build fails: NeuNorm's hatchling backend needs hatchling in recipe build requirements #411).

  2. API (the real blocker): 2.0 is a breaking rewrite. Per NeuNorm's docs/migration.md (1.x → 2.0):

    • package renamed: import NeuNormimport neunorm (lowercase)
    • from NeuNorm.normalization import Normalization → new pipeline/loader API (neunorm.pipelines.*, neunorm.loaders.stack_loader.load_stack, neunorm.processing.normalizer.normalize_transmission)
    • from NeuNorm.roi import ROI; ROI(x0, y0, x1, y1) → plain tuple (x0, y0, x1, y1)
    • results are now scipp.DataArray

    iBeatles is written against the NeuNorm 1.x API, so simply making the package build (e.g. adding hatchling) would produce a package that breaks at import/runtime against 2.0.

Immediate stopgap (unblocks CI now)

Pin the recipe to the last NeuNorm next state before 2.0 merged:

- {{ PYTHON }} -m pip install git+https://github.com/ornlneutronimaging/NeuNorm.git@1d4d1d47598a41c257a2c75356a69d9f7dc22674 --no-deps --no-build-isolation -vvv

1d4d1d4 is the first parent of the 2.0 merge c26cbf0 (git describe = v1.6.12-30-g1d4d1d4). The last release tag v1.6.12 is ~30 trivial pre-commit-autoupdate commits earlier and is an equally safe, more readable pin. Either restores the intended NeuNorm 1.x (setuptools backend) and sidesteps Hatchling entirely. This supersedes the "add hatchling to build requirements" suggestion in #411 — that would build against the incompatible 2.0 API.

Real fix

Port iBeatles to the NeuNorm 2.0 API following docs/migration.md, then track 2.0 (a release tag once 2.0 is cut). Relates to the NeuNorm-replacement epic #349 and #365.

Note

HyperCTui has the same unpinned git+NeuNorm install in its recipe and the same exposure (currently latent — its conda build doesn't run on PRs/push).


Root-caused during the weekly sweep. Assisted-With: Claude Opus 4.8 (1M context).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions