neuropose/tests/unit
Levi Neuwirth 979beb1078 add AnalysisConfig and AnalysisReport schemas
neuropose.analyzer.pipeline ships two top-level pydantic schemas:

AnalysisConfig — what a user writes in YAML. Inputs (primary plus
optional reference), preprocessing (person_index, room to grow),
optional segmentation as a discriminated union of gait_cycles,
gait_cycles_bilateral, and extractor, and a required analysis stage
as a discriminated union of dtw, stats, none.

AnalysisReport — runtime output with config, Provenance envelope,
per-input summaries, produced segmentations, and a results payload
whose shape mirrors the stage (DtwResults, StatsResults, NoResults).
schema_version defaults to CURRENT_VERSION.

Cross-field invariants enforced at parse time via model_validator:
method='dtw_relation' requires joint_i/joint_j and refuses
representation='angles'; representation='angles' requires non-empty
angle_triplets; analysis.kind='dtw' requires inputs.reference;
analysis.kind='stats' refuses a reference. Typos fail in
milliseconds instead of after a multi-minute predictions load.

neuropose.migrations gains a third registry for AnalysisReport
(_ANALYSIS_REPORT_MIGRATIONS + register_analysis_report_migration +
migrate_analysis_report), ready for future schema changes. No v1→v2
migration is registered because AnalysisReport first shipped at v2.

Execution, CLI wiring, and example configs land in follow-up commits.
2026-04-22 11:13:36 -04:00
..
test_analyzer_dtw.py add joint-angle representation and nan_policy to DTW 2026-04-18 18:02:13 -04:00
test_analyzer_features.py add Procrustes alignment to analyzer 2026-04-18 17:11:53 -04:00
test_analyzer_pipeline.py add AnalysisConfig and AnalysisReport schemas 2026-04-22 11:13:36 -04:00
test_analyzer_segment.py add gait-cycle segmentation to analyzer 2026-04-18 17:50:21 -04:00
test_benchmark.py pin tf to ensure compatability with tensorflow-metal 2026-04-16 15:26:55 -04:00
test_cli.py add Provenance subobject and LoadedModel 2026-04-18 17:10:52 -04:00
test_config.py linting and formatting 2026-04-14 13:50:11 -04:00
test_estimator.py add Provenance subobject and LoadedModel 2026-04-18 17:10:52 -04:00
test_ingest.py tooling 2026-04-15 11:41:27 -04:00
test_interfacer.py tooling 2026-04-15 11:41:27 -04:00
test_io.py add Provenance subobject and LoadedModel 2026-04-18 17:10:52 -04:00
test_migrations.py add AnalysisConfig and AnalysisReport schemas 2026-04-22 11:13:36 -04:00
test_monitor.py tooling 2026-04-15 11:41:27 -04:00
test_reset.py apply ruff format to recent commits 2026-04-18 17:49:44 -04:00
test_visualize.py linting and formatting 2026-04-14 13:50:11 -04:00