Skip to content

[FIX] Check QC overrides in the mooring description; CLI and docs sweep - #123

Merged
eleanorfrajka merged 2 commits into
ocean-uhh:mainfrom
eleanorfrajka:fix/config-guards
Nov 5, 2026
Merged

eleanorfrajka merged 2 commits into
ocean-uhh:mainfrom
eleanorfrajka:fix/config-guards

Conversation

@eleanorfrajka

@eleanorfrajka eleanorfrajka commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A mistyped QC-override block in the mooring description was silently ignored, so a mooring could run with the default thresholds while the YAML said otherwise. validate (and mooring.load) now check the four QC blocks. Docs also updated to bring the command-line help and the documentation up-to-date with current behaviour.

What's changed

  • qc_ranges, qc_spike, qc_flat_line and tilt_qc are checked at mooring and instrument level: a shape mistake (unknown field, a span that is not two increasing numbers, a negative threshold, a new variable with no fail_span) is an ERROR; an unknown variable is a WARNING.
  • Current direction is written with the CF name sea_water_velocity_to_direction (was the deprecated direction_of_sea_water_velocity).
  • Every subcommand's help says what it reads and writes and ends with Examples:.
  • Renamed flags, old spellings kept until 0.7.0 with one shared deprecation message: stamp --declare N, export --force, process --summary, plot --downsample-seconds.
  • validate takes a path, folder or name like the other commands, and gains --strict.
  • Usage errors exit 2 with ERROR: on stderr; a --proc-dir mooring folder that does not exist is named.
  • python -m oceanarray; -v after the subcommand; export -n.
  • Docs: the YAML reference covers the QC blocks, platform_code, deployment_code and data_mode; the OceanSITES export page moves to the user pages with how to run it; wrong claims fixed (stack dimension order, module paths, tilt defaults, flat-line test, folder/name mismatch is a warning); roadmap, quickstart, README, CONTRIBUTING and style guide updated.

Breaking changes

  • A description with a malformed QC block now fails mooring.load and validate (it was ignored).
  • standard_name of current_direction changes as above.

Tests

  • QC-override checks (documented examples pass, shape errors, unknown variable, instrument level), the renamed flags and their old spellings, export --dry-run, exit code 2 on usage errors. Full suite and docs build green.

@eleanorfrajka
eleanorfrajka marked this pull request as ready for review November 5, 2026 06:20
@eleanorfrajka
eleanorfrajka merged commit 83bd33f into ocean-uhh:main Nov 5, 2026
9 checks passed
@eleanorfrajka
eleanorfrajka deleted the fix/config-guards branch November 5, 2026 06:58
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.

1 participant