Skip to content

Make mypy clean without --ignore-missing-imports (green CI on main) #37

Description

@dantzert

CI runs mypy . --ignore-missing-imports (.github/workflows/ci.yml:35). On committed main this is red: mypy 1.19 reports import-untyped for requests in testing_data/pull_usgs_delaware.py, and --ignore-missing-imports does not suppress import-untyped (verified: mypy . --ignore-missing-importsFound 1 error in 1 file).

Per the maintainer's stated direction, the goal is to drop the --ignore-missing-imports flag and keep the whole tree clean.

Proposal:

  • Make testing_data/pull_usgs_delaware.py clean on its own (add types-requests to dev/optional deps, or a [[tool.mypy.overrides]] with module = "requests" / scope it), then drop --ignore-missing-imports from the CI command.
  • Narrow the lint step to the package + tests if testing_data/ is meant to be an optional standalone fetcher script (it currently isn't installed/tracked by packaging).
  • Add a regression assertion that mypy modpods is clean.

Also a heads-up for the pending subsample work: while verifying, the in-flight changes currently on the working tree add 2 new mypy errors in modpods/model.py (the transform_dependent constraint block does initial_guess[idx, idx] / constraint_lhs[idx, …] where idx is an ndarray from the subsampler) plus a duplicate test_delay_io_train_camels_returns_model definition (no-redef). These should be resolved before that PR lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions