unzhakov
9c3dd80b5c
refactor(cli): delegate paceENSDF config building to library
...
Remove the duplicated inline paceENSDF config builder in the CLI.
It renormalized branch intensities before filtering, diverging from
the library decay_info_to_config path that library callers use
(audit finding D5). CLI paceENSDF configs now come from
create_config_from_source exactly once per run.
Regression test spies on create_config_from_source during a CLI run.
2026-10-02 07:13:14 +03:00
unzhakov
18a46ad02f
feat(cli): propagate export options through JSON/paceENSDF flows
...
- main(argv) signature enables in-process CLI invocation and testing
- parser defaults for --e-step/--neutrino-mass/--intensity-cutoff/
--csv-separator/--normalize-to-one now None = 'not provided'
- JSON flow applies file values by default and CLI flags as overrides
(previously these five options were silently discarded)
- paceENSDF flow resolves None flags to literal defaults
- new tests/integration/test_cli_flows.py: JSON propagation,
degenerate-mode non-zero exit with no file (JSON + paceENSDF)
- adapted two neutrino-mass default tests to None-parsing semantics
2026-10-02 05:46:08 +03:00
unzhakov
8172ba2541
test: adapt existing suites to unconditional core, drop dead detector tests
2026-09-30 03:08:13 +03:00
unzhakov
687e05cbe2
style: reformat assertion blocks in test files
2026-09-29 13:06:22 +03:00
unzhakov
be3e288e0d
docs: update documentation files and fix linting issues
2026-07-07 13:32:48 +03:00
unzhakov
5c2b12c0e6
feat: experimental data calibration pipeline with ROOT I/O
...
- Fix chi2 calculation bug in calibration.py (remove incorrect
coeffs[::-1] reversal in np.polyval)
- Fix broken beta_spectrum/cli.py (remove orphaned detector response
add_argument calls and unused imports)
- Add ExpSpectrum.apply_calibration() and EnergyCalibrator.from_am241_spectrum()
- Add LivetimeDetermination class for pulser-based livetime
- Add SpectrumPipeline orchestration (read→subtract→calibrate→livetime→validate)
- Add ROOT I/O with PyROOT primary + uproot fallback
- Add bs_exp CLI with process, livetime, export subcommands
- Add exp_calibration notebook with pre-calibration visualization
- Add comprehensive tests (73 passing)
- Add bs_exp console script and [root] extra to pyproject.toml
- Remove obsolete detector_response module and unused notebooks
2026-05-21 16:01:25 +03:00
unzhakov
c96fb6175a
test: add .gitkeep files and update TODO with phase 1-4 complete
...
- Add .gitkeep to tests/common/ and tests/integration/ directories
- Mark phases 1-4 as complete in test-migration-todo.md
- All migration work done: 251 tests passing
- Final structure:
- tests/common/ — 3 files (shared helpers)
- tests/physics/ — 10 files (physics behavior)
- tests/quality/ — 8 files (API contracts)
- tests/integration/ — 2 files (end-to-end)
2026-05-15 15:56:28 +03:00
unzhakov
c78d0655a0
test: complete migration to structured test suite
...
Phase 1: Removed 6 duplicate old test files (fermi, finite_size, screening,
exchange, radiative, phase_space) — their tests are now in physics/ and quality/
using shared helpers from common/.
Phase 2: Migrated remaining 7 old test files:
- test_spectrum.py → integration/test_spectrum_pipeline.py (integration tests)
- test_fitter.py → physics/test_fitter.py (fit quality tests)
- test_cw_extractor.py → physics/test_cw_extractor.py (extraction accuracy)
- test_multi_branch.py → physics/test_multi_branch.py (branching physics)
- test_detector_response.py → physics/ + quality/ (split into physics + API)
- test_nuclear_data.py → quality/test_nuclear_data.py (parsing/API)
- test_logging_utils.py → quality/test_logging_utils.py (API tests)
Removed 12 old flat files, created 4 new files.
Total: 251 tests passing (6 skipped), down from 230 → 251 (net +21
from better coverage, not duplicates).
Test structure:
- tests/common/ — shared property/API helpers (eliminates ~18 duplicates)
- tests/physics/ — 10 files, unique physics behavior tests
- tests/quality/ — 8 files, API contract + parsing tests
- tests/integration/ — 1 file, end-to-end pipeline tests
2026-05-15 15:52:50 +03:00