fix: align provider mypy/test with op_engine pattern#52
Merged
jc-macdonald merged 1 commit intomainfrom Apr 8, 2026
Merged
Conversation
Remove [tool.mypy] from provider pyproject.toml — it set mypy_path and explicit_package_bases which caused mypy to resolve the namespace package tree as a top-level module, shadowing the installed op_system package. Provider mypy is now driven entirely from the justfile CLI with --namespace-packages --explicit-package-bases flags. Add provider-sync recipe (matching op_engine) to create an isolated venv for provider checks. Closes #51
TimothyWillard
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix provider mypy type-checking failures caused by incorrect mypy configuration in the provider subpackage.
Problem
mypy-providerfails with:Root cause: the provider's
[tool.mypy]inpyproject.tomlsetmypy_path = "$MYPY_CONFIG_FILE_DIR/src"andexplicit_package_bases = true, which caused mypy to resolvesrc/flepimop2/system/op_system/__init__.pyas the top-level moduleop_system— shadowing the installedop_systempackage.Fix
Align the provider build/check pattern with
op_engine's working approach:[tool.mypy]fromflepimop2-op_system/pyproject.toml— provider mypy is driven entirely from the justfile CLI.provider-syncrecipe — creates a clean.venvin the provider directory and installs all deps (includingflepimop2from git andop-systemfrom the parent directory).mypy-provider— usesprovider-syncas a dependency, invokes mypy via.venv/bin/python -m mypy --strict --namespace-packages --explicit-package-bases src/flepimop2so mypy resolves the namespace package tree correctly.test-provider— usesprovider-syncand.venv/bin/python -m pytestfor the same isolation.Validation
just mypy-provider→Success: no issues found in 1 source filejust test→ 62 root tests + 3 provider tests passjust ci-ruff→ all checks passCloses #51