Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It is a package-wide public API/import reorganization stacked on two still-unmerged PRs against a feature branch, which warrants final human confirmation even though the mechanical moves verify as consistent.
No open issues 🎉
What changed in this PR
This PR reorganizes the mxalign package so that the configuration-driven verification pipeline lives under a single pipeline/ submodule. It is the final step in a stacked refactor series (#39, #40) that reshapes the top level into accessor, alignment, and pipeline (plus the shared utils). The cli, runner, verification, and transformations modules—together with the pipeline-only helpers config, dates, and save—move into pipeline/, while utils/ retains only projections and traits used by accessor and alignment.
Changes:
- Move
cli.py,runner.py,verification.py,transformations/, andutils/{config,dates,save}.pyintopipeline/, updating relative imports (e.g. runner now imports..alignment.time/..alignment.nansand.config/.save/.verification). - Update the public surface:
mxalign/__init__.pyre-exports the same functions and listsaccessor/alignment/pipelinein__all__; console script becomesmxalign.pipeline.cli:main. - Update tests,
README.md, andexamples/advanced.ipynbto the new import paths.
| File | Description |
|---|---|
| src/mxalign/__init__.py | Re-exports public API from new paths; __all__ → accessor/alignment/pipeline |
| src/mxalign/pipeline/__init__.py | New package init importing transformations so they register on import |
| src/mxalign/pipeline/cli.py | Moved CLI; lazily imports .runner |
| src/mxalign/pipeline/runner.py | Moved runner; imports updated to .config/.save/.verification and ..alignment.* |
| src/mxalign/pipeline/verification.py | Moved Metric/verify; imports .transformations.external |
| src/mxalign/pipeline/config.py | Moved config loader; imports .dates |
| src/mxalign/pipeline/dates.py | Moved date-range helper |
| src/mxalign/pipeline/save.py | Moved dataset/metrics save helpers |
| src/mxalign/pipeline/transformations/*.py | Moved transformation registry/base/external/transform modules |
| src/mxalign/alignment/*.py, alignment/interpolations/*.py | Alignment/interpolation modules (from stacked #39/#40) with corrected relative imports |
| src/mxalign/accessor/*.py | Accessor package importing ..alignment ops (from stacked #40) |
| src/mxalign/accessors/*.py, align/space.py | Old modules removed as part of the move |
| pyproject.toml | Console script → mxalign.pipeline.cli:main |
| README.md, examples/advanced.ipynb | Updated Runner import to mxalign.pipeline.runner |
| tests/test_*.py | Updated imports and logger name to new module paths |
Review effort: Balanced
e3e1602 to
d26eae1
Compare
|
@leifdenby this also needs a rebase I guess |
The YAML-driven pipeline (cli, runner, verification, transformations and the config/dates/save helpers it alone uses) now lives in mxalign.pipeline. The console script points at mxalign.pipeline.cli:main. Public re-exports from mxalign/__init__.py are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d26eae1 to
6d5aca5
Compare
Addresses bullet 5 of my notes on #30: "current
cli,runnerandverificationto the.pipelinesubmodule".Changes
cli.py,runner.pyandverification.pymove topipeline/.transformations/moves topipeline/transformations/, because only the runner uses it.utils/config.py,utils/dates.pyandutils/save.pymove topipeline/config.py,pipeline/dates.pyandpipeline/save.py. These are pipeline-only helpers.utils/keepsprojectionsandtraits, whichaccessorandalignmentuse.mxalign = "mxalign.pipeline.cli:main".mxalign/__init__.pystill re-exportstransform,available_transformationsandregister_transformation.__all__now listsaccessor/alignment/pipeline.README.mdandexamples/advanced.ipynbupdated tofrom mxalign.pipeline.runner import Runner; tests updated to the new paths.Top level is now
accessor,alignmentandpipeline, plusutils. The orphanedloaders/ifs_forecast.py, which imports modules that no longer exist, is left alone here.All 93 tests pass, and
mxalign --helpworks.🤖 Generated with Claude Code