Repository navigation
[REFACTOR] Report inventory tables (coordinates + attribute disclosure), canonical-unit fixture, demo-notebook cleanup - #103
Merged
Conversation
… notebook cleanup
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical notebook and documentation workflow failures, plus unresolved datetime and scalar-coordinate handling issues, remain.
3 open findings
What changed in this PR
Refactors NetCDF inventory reporting, canonicalizes dune2 fixture units, and reorganizes demo notebooks.
Changes:
- Adds shared coordinate, variable, scalar, and attribute-rendering templates.
- Updates report goldens and fixture unit labels.
- Moves obsolete notebooks to
legacyand refreshes documentation links.
| File | Summary |
|---|---|
tests/unit/test_report.py |
Updates typed global-attribute expectations. |
tests/fixtures/golden/dune2/instrument/dune2_1_2026_2941_report.html |
Rebaselines instrument report output. |
tests/fixtures/golden/dune2/dune2_1_2026_stack_report.html |
Rebaselines stack report output. |
tests/fixtures/golden/dune2/dune2_1_2026_report.html |
Rebaselines report output. |
tests/fixtures/golden/dune2/dune2_1_2026_grid_report.html |
Rebaselines grid report output. |
oceanarray/reports/templates/base.html |
Adds shared disclosure styling. |
oceanarray/reports/templates/_stack_nc_dims.html |
Removes obsolete dimensions template. |
oceanarray/reports/templates/_nc_variables.html |
Defines shared variable inventory markup. |
oceanarray/reports/templates/_nc_var_macros.html |
Provides shared variable rendering macros. |
oceanarray/reports/templates/_nc_scalars.html |
Defines shared scalar inventory markup. |
oceanarray/reports/templates/_nc_globals.html |
Defines shared global-attribute markup. |
oceanarray/reports/templates/_nc_coords.html |
Defines shared coordinate inventory markup. |
oceanarray/reports/templates/_instrument_nc_variables.html |
Removes instrument-specific variable template. |
oceanarray/reports/templates/_instrument_nc_scalars.html |
Removes instrument-specific scalar template. |
oceanarray/reports/templates/_instrument_nc_globals.html |
Removes instrument-specific global template. |
oceanarray/reports/templates/_grid_nc_variables.html |
Removes grid-specific variable template. |
oceanarray/reports/templates/_grid_nc_scalars.html |
Removes grid-specific scalar template. |
oceanarray/reports/templates/_grid_nc_globals.html |
Removes grid-specific global template. |
oceanarray/reports/_stack.py |
Replaces dimension inventory with coordinates. |
oceanarray/reports/_nc_tables.py |
Groups variables and global attributes. |
oceanarray/reports/_instrument.py |
Uses shared inventory panels. |
oceanarray/reports/_html_helpers.py |
Builds coordinate and typed metadata rows. |
oceanarray/reports/_grid.py |
Adds coordinate inventory support. |
oceanarray/reports/_env.py |
Centralizes inventory rendering. |
notebooks/legacy/README.md |
Documents legacy notebooks. |
notebooks/legacy/demo_stage2.ipynb |
Relocates obsolete demo. |
notebooks/legacy/demo_stage1.ipynb |
Relocates obsolete demo. |
notebooks/legacy/demo_instrument.ipynb |
Relocates obsolete demo. |
notebooks/legacy/demo_clock_offset.ipynb |
Relocates obsolete demo. |
notebooks/legacy/demo_check_clock.ipynb |
Relocates obsolete demo. |
notebooks/demo_step1.ipynb |
Removes superseded demo. |
docs/source/clock_offset.rst |
Repoints the legacy notebook link. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…mestamp policy, analog dtype guard, notebook/workflow paths
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Reworks the NetCDF-inventory appendix in the mooring reports to match the glidertest form, canonicalises the units stored in the dune2 test fixture, refreshes the hosted dune2 demo suite, and moves the broken old-API demo notebooks to legacy so 0.5.0 ships only working demos.
What's changed
Report inventory tables, shared across the instrument, grid and stack pages:
N attrs) listing the variable's remaining attributes; attributes already shown in a column (units, long_name, standard_name) are excluded.(_QC)on the variable name instead of a separate flag column._nc_variables,_nc_coords,_nc_scalars,_nc_globals,_nc_var_macros);_html_helpers._read_nc_metadatanow returns coordinate rows and per-variable attribute dicts via a shared_variable_rowhelper.Fixture:
degC/°Ctodegree_Celsius,mS/cmtomS cm-1,meterstom) in place — 14 attribute edits across 8 files, data byte-identical (factor-1 renames only; verified against HEAD).Docs / notebooks:
demo_mooring.ipynbported tooceanarray.processors.process;demo_step1.ipynbremoved (folded into demo_mooring).notebooks/legacy/:demo_instrument,demo_stage1,demo_stage2(removed staged API, superseded by demo_mooring) anddemo_check_clock,demo_clock_offset(moved-module imports). Legacy README rewritten;clock_offset.rstlink repointed.Breaking changes
None. Report HTML layout changes and fixture unit-label changes only; no public API, CLI, or output-schema change.
Tests
pytestgreen after the report-golden rebaseline (REBASELINE_GOLDEN=1 pytest tests/unit/test_report_golden.py);test_report.py::test_read_nc_metadata_global_attrsupdated for the new{value, type}global-attr shape.