unzhakov
9050019ddd
feat: add structured logging, CSV metadata headers, and CLI improvements
...
- New module: beta_spectrum/logging_utils.py
- LoggingConfig dataclass with level, log_file, format options
- setup_logging() one-shot configuration (opt-in for library use)
- get_logger() for named child loggers
- get_git_short_hash() for commit identification
- _find_git_root() for repo detection
- CLI enhancements (beta_spectrum/cli.py):
- --verbose/-v (repeatable): -v=INFO, -vv=DEBUG
- --quiet/-q: suppress all terminal output
- --log-file PATH: append log to file
- --dry-run: validate input, display resolved config, exit
- --version: show package version
- Replace print() with structured logging throughout
- Handle KeyboardInterrupt gracefully
- CSV metadata headers (BetaSpectrumAnalyzer.export_to_csv):
- YAML-style # comments with version, timestamp, source, nuclide info
- Corrections enabled, e_step, detector settings, git commit hash
- Base class integration (SpectrumComponent):
- Optional logger parameter for debug/info output (opt-in)
- BetaSpectrum integration:
- Optional logger parameter passed through from_config()
- Detector logging in create_detector_from_config()
- Convolution logging in convolve_with_detector()
- Tests: tests/test_logging_utils.py (28 tests)
- LoggingConfig, setup_logging, get_logger, git hash, CSV headers, CLI flags
- Update TODO.md: mark B8 as complete, update Current Status
2026-05-04 15:11:01 +03:00
unzhakov
1a0754be5f
docs: remove empty recoil.py stub, update README and TODO to reflect actual state
...
- Remove empty beta_spectrum/components/recoil.py (0-line stub)
- Remove recoil.py from README.md project tree and components table
- Update TODO.md: replace specific recoil section with generic 'Additional
Corrections' deferred item, update Current Status to 0.3.0 with actual
implementation list, mark A4 as complete, set A3 as next step
2026-05-04 11:56:41 +03:00