Skip to content

fix: green the CI gate — lazy onnx import + mypy version target - #5

Merged
machinavitalis merged 1 commit into
mainfrom
fix/ci-policy-import-and-mypy
Jul 12, 2026
Merged

machinavitalis merged 1 commit into
mainfrom
fix/ci-policy-import-and-mypy

Conversation

@machinavitalis

Copy link
Copy Markdown
Owner

The last two pre-existing 1.0.0 gate failures (both unrelated to any feature):

  • test_package_imports[jaxility.policy] → No module named 'onnx': onnx_export.py imported onnx at module top, so importing the policy subpackage needed the optional [policy] extra. Made it lazy — a _require_onnx() guard raising a structured ToolchainError at call time (matching litert/executorch/quantize). Verified: import succeeds without the extra; export fails loudly.
  • mypy failed on the 3.12 runner: numpy's 3.12 stubs use a PEP 695 type statement mypy rejected under the pinned python_version = 3.10. Dropped the pin so mypy targets each runner's own interpreter; the 3.10 runner still enforces 3.10 compat.

🤖 Generated with Claude Code

Two pre-existing 1.0.0 gate failures unrelated to any feature:

- test_package_imports[jaxility.policy] failed with 'No module named onnx':
  onnx_export.py imported onnx at module top, so importing the policy
  subpackage required the optional [policy] extra. Make it lazy (a
  _require_onnx() guard raising a structured ToolchainError at call time),
  matching litert/executorch/quantize. Import now succeeds without the extra;
  export fails loudly.
- mypy failed on the 3.12 runner: numpy's 3.12 stubs use a PEP 695 'type'
  statement that mypy rejected under the pinned python_version=3.10. Drop the
  pin so mypy targets each matrix runner's own interpreter; the 3.10 runner
  still enforces 3.10 compatibility.
@machinavitalis
machinavitalis merged commit acdb0c3 into main Jul 12, 2026
4 checks passed
@machinavitalis
machinavitalis deleted the fix/ci-policy-import-and-mypy branch July 12, 2026 01:18
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