python-math #13: refactor(math): move impl-flag resolver to polismath/utils/env_flags.py - #2641
Draft
jucor wants to merge 1 commit into
Draft
python-math #13: refactor(math): move impl-flag resolver to polismath/utils/env_flags.py#2641jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 22, 2026
Draft
Draft
Draft
jucor
marked this pull request as draft
July 22, 2026 00:51
This was referenced Jul 25, 2026
Draft
Draft
Draft
python-math #43: docs(delphi): s7 goal state + journal — mode collapse executed, battery 20/20
#2672
Draft
Draft
Draft
5 tasks
3 tasks
…/utils/env_flags.py Moves the generic legacy-vs-improved env-switch resolver out of `pca.py` into `polismath/utils/env_flags.py` (public name `resolve_impl_flag`). `pca.py` and `utils/engine_mode.py` both import it from there, so reading `POLISMATH_ENGINE_MODE` no longer drags in the numpy/pandas `pca` import chain, and resolution warnings log under `polismath.utils.env_flags` instead of the pca logger. Resolution rules are unchanged: strip + lowercase, unknown value -> default with a warning, read at call time. `tests/test_env_flags.py` pins the rules, the shared-resolver identity, and the light `engine_mode` import (RED observed via ModuleNotFoundError before the move; the light-import test fails on the old code by construction). commit-id:bc0518d7
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.
Moves the generic legacy-vs-improved env-switch resolver out of
pca.pyintopolismath/utils/env_flags.py(public nameresolve_impl_flag).pca.pyandutils/engine_mode.pyboth import it from there, so readingPOLISMATH_ENGINE_MODEno longer drags in the numpy/pandaspcaimport chain, and resolution warnings log underpolismath.utils.env_flagsinstead of the pca logger. Resolution rules are unchanged: strip + lowercase, unknown value -> default with a warning, read at call time.tests/test_env_flags.pypins the rules, the shared-resolver identity, and the lightengine_modeimport (RED observed via ModuleNotFoundError before the move; the light-import test fails on the old code by construction).commit-id:bc0518d7
Stack: