Skip to content

chore/prek and ty enforcement - #39

Merged
JavierGOrdonnez merged 4 commits into
developfrom
chore/prek-and-ty-enforcement
Aug 19, 2026
Merged

JavierGOrdonnez merged 4 commits into
developfrom
chore/prek-and-ty-enforcement

Conversation

@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLI • Give Feedback 💬

Base automatically changed from feat/consumer-api to develop August 19, 2026 16:36
@JavierGOrdonnez
JavierGOrdonnez marked this pull request as ready for review August 19, 2026 16:36
Javier Garcia Ordonez added 4 commits August 19, 2026 18:37
…cs cleanup

V40gz/V41hp + T41hp/T42jn + B13qf (backprop for the 3 Python-3.10 compat
bugs found earlier in this stack).
…x_vite

- .pre-commit-config.yaml: ruff/ruff-format via astral-sh/ruff-pre-commit,
  local ty check hook, pre-commit-hooks file hygiene
- Makefile: prek/pre-commit targets (uvx prek run --all-files)
- README: Development > Code quality section documenting the hook
- Incidental: --all-files run auto-fixed pre-existing trailing-whitespace/
  missing-EOF-newline violations in a few files outside this stack's scope
  (docs-deploy.yml, version-check.yml, .gitignore, DAKOTA-STUBS.md)
- data/funs_data_processing.py: widen distributions dict value type to
  float | str (the 'distribution' key is always a string alongside
  numeric params) and propagate through funs_evaluate.py call sites;
  widen is_dominated's other_points to accept both a 2D ndarray and a
  plain sequence of 1D arrays (both are real call patterns)
- api/_session.py: assert self._preprocessor is not None before
  get_inverse_mapping() (mirrors the existing _mapped_name pattern); use
  typing.cast instead of a mismatched mypy-style '# type: ignore[arg-type]'
  (ty doesn't recognize that code name)
- sampling/lhs.py: np.identity(..., dtype=bool) for the MaskedArray mask
  (was float64, only one overload accepts a bool mask)
- scripts/dev_version.py: narrow regex .fullmatch() results before
  .group(); '# ty: ignore[unresolved-import]' on the tomllib import
  (only resolvable per requires-python's 3.10 floor, not the analysis
  venv's own interpreter -- inherent to cross-version fallback code);
  make tomli an unconditional dev dependency so the ignore comment's
  "used" status doesn't flip depending on which Python version's venv
  ty happens to run under
- examples/generate_docs_figures.py: pd.Index(...) instead of a bare
  list for DataFrame columns (pandas stub protocol variance quirk);
  excluded examples/ from ty's default scope (needs the docs dependency
  group, which isn't part of --all-extras --dev)
- tests/*: narrow Path | None / regex-match-or-None locals with asserts;
  '# ty: ignore[...]' only on the handful of call sites that deliberately
  pass a wrong type/value to assert a runtime error path (adversarial
  input tests, not real signatures); removed stale unused
  '# type: ignore' comments
Repo is now diagnostic-clean (T42jn); ty stays version-aware against
requires-python's floor so it keeps catching the Python-3.10 compat
bug class (V41hp) that the test matrix would otherwise be the only
thing to surface.
@JavierGOrdonnez
JavierGOrdonnez force-pushed the chore/prek-and-ty-enforcement branch from c3ce162 to 4ea89f3 Compare August 19, 2026 16:37
@JavierGOrdonnez
JavierGOrdonnez merged commit b63b64b into develop Aug 19, 2026
8 checks passed
@JavierGOrdonnez
JavierGOrdonnez deleted the chore/prek-and-ty-enforcement branch August 19, 2026 16:55
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