Skip to content

Lint/type-check coverage gaps: ruff skips docs/large/notebooks scripts; mypy only checks metpo/ #501

Description

@turbomam

Problem (measured this session). Code QC does not reach all Python:

  • ruff check . excludes docs/, large/, notebooks/ (see ruff.toml), but real .py scripts live under docs/ and escape linting entirely:
    • docs/metpo/scripts/definition_work/fetch_source_metadata.py
    • docs/metpo/scripts/definition_work/merge_sparql_with_metadata.py
    • docs/n4l/transformation_code/regex_parse_n4l_temperatures.py
  • mypy runs on metpo/ only (not tests/ or docs/), and is continue-on-error: true (non-blocking).

Why it slips: the docs exclude was meant for documentation, but scripts were dropped into it; nothing type-checks tests.

Proposed fix. Don't let code live in doc/data dirs: move those scripts into metpo/ (so ruff sees them), or narrow the exclude to docs/**/*.md instead of all of docs/. Extend mypy to tests/. (Making mypy blocking is tracked in #454.)

Note: the n4l script leaves with the N4L cleanup and the definition_work ones are tied to the chromadb definition tooling being removed in #498, so some self-resolve with the slimming. Related: #309, #454.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions