Skip to content

[LINT/REFACTOR] Ruff compliance pass — annotations, docstrings, noqa, test fixes#30

Merged
eleanorfrajka merged 2 commits into
mainfrom
fixes-report
Jul 18, 2026
Merged

[LINT/REFACTOR] Ruff compliance pass — annotations, docstrings, noqa, test fixes#30
eleanorfrajka merged 2 commits into
mainfrom
fixes-report

Conversation

@eleanorfrajka

Copy link
Copy Markdown
Collaborator

Summary:

  • Ran ruff check . --fix across the whole package and resolved substantive issues (BLE001, TRY300, E731, F841, F821, E741, ARG001, B008, B026) with inline # noqa comments or code fixes
  • Added type annotations and -> None return types to stage1–3, stage2, mooring_level, time_gridding, cli, logger, utilities
  • Fixed latent bug in utilities.get_dims: depth key was not returned when no pressure key found (was None; now returns dpth_key as pres_key)
  • Removed deprecated sbe-asc from test (superseded by sbe-ascii)
  • Added pyproject.toml per-file ignores for ANN/D in files moving in the post-OdB refactor; excluded notebooks/ and docs/ from ruff globally

…_VARS, _STACK_RAW, and _vel_vars (3 small hunks).

  report/_html_helpers.py — One-line fix: v.shape[0] → np.prod(v.shape) so 2D stack/grid variables count total elements correctly, not just the first dimension.

  report/_stack.py and report/_grid.py — Both have the same pattern of changes:
  - Import _read_nc_metadata from _html_helpers
  - Replace the old inline var_table loop (simple 4-column table) with _read_nc_metadata(path) called after ds.close()
  - Pass nc_meta + nc_file to Jinja2 instead of var_table
  - Replace the old simple HTML table in the template with the full three-table layout (variables + scalar metadata + global attrs) matching the instrument report
  style
@eleanorfrajka
eleanorfrajka merged commit e368fdc into main Jul 18, 2026
4 checks passed
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