Skip to content

Qartod manual suites - #321

Closed
abkfenris wants to merge 12 commits into
ioos:mainfrom
abkfenris:claude/qartod-manual-suites
Closed

abkfenris wants to merge 12 commits into
ioos:mainfrom
abkfenris:claude/qartod-manual-suites

Conversation

@abkfenris

Copy link
Copy Markdown
Collaborator

Stacks on top of #320 with test suite configs pulled from the QARTOD manuals.

claude and others added 12 commits October 10, 2026 09:47
ioos_qc's config_creator writes QC thresholds as expressions of dataset
statistics ("mean + 3 * std"), evaluated by fx_parser.py. This adds a
Rust parser and evaluator in core (standard_knowledge::fx) that follows
it exactly, exposes it to Python as standard_knowledge.eval_fx, and
documents the grammar in core/src/fx/GRAMMAR.md.

Python tests compare it with ioos_qc's fx_parser on named cases and on
Hypothesis-generated expressions and raw text. ioos_qc is installed in a
separate dependency group so wheel tests on other platforms don't need it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuWEgV29DBhxXmYcc8jnmJ
Knowledge YAML test suites can now take arguments and `let` constants,
and any number in their tests can be an fx expression such as
`{expr: "mhhw + 6.0 * ft"}`. The Gulf of Maine and Long Island Sound
water level suites move from Rust into
sea_surface_height_above_geopotential_datum.yaml, with the same
scaffolded values as before.

The config structs are now generic over their number types, so the
same shapes describe both ioos_qc configs and templates with
expressions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuWEgV29DBhxXmYcc8jnmJ
Adds ioos_qc's attenuated_signal_test to the config schema, and a
qartod_manual suite for the standards covered by the Temperature and
Salinity, Water Level, Dissolved Oxygen, pH and Winds manuals. Each
derives its thresholds with fx expressions from statistics of a
historical record that the caller passes as arguments, following the
manuals' recipes (for example N_DEV x SD over TIM_DEV for rate of
change, converted to units per second).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuWEgV29DBhxXmYcc8jnmJ
The hand-written decimal expansion only saved a little WASM size and
isn't worth the extra code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuWEgV29DBhxXmYcc8jnmJ
Python evaluates int ** int exactly, so a generated expression like
trunc(9)^trunc(9)^trunc(9) could run for minutes. The reference now
raises OverflowError for results far past the float range, which is
what the comparison saw for them anyway.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuWEgV29DBhxXmYcc8jnmJ
Hypothesis found (-1e98)^PI: Python raises OverflowError there instead
of returning a complex number, so the Rust side now does the same
rather than reporting a non-real result.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuWEgV29DBhxXmYcc8jnmJ
@github-actions

Copy link
Copy Markdown

Javascript size report

Size
Base (main) 1120.4 KB
PR 1196.9 KB
Delta +76.5 KB (+6.8%)

❌ Size increased +6.8% — exceeds the 5% threshold.

@abkfenris abkfenris mentioned this pull request Oct 14, 2026
@abkfenris

Copy link
Copy Markdown
Collaborator Author

Superseded by #325 (same-repo stacked PR).

@abkfenris abkfenris closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants