Skip to content

main train 2026-11-14: guard test, every proteus.mprans module imports alone - #1363

Merged
cekees merged 2 commits into
proteustoolkit:mainfrom
cekees:train/main-2026-11-14
Nov 15, 2026
Merged

cekees merged 2 commits into
proteustoolkit:mainfrom
cekees:train/main-2026-11-14

Conversation

@cekees

@cekees cekees commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

This pull request was reviewed, and passed CI, as its own pull request on cekees/proteus. This branch merges it onto main at 33659c3 with one merge commit.

Merge with "Create a merge commit", not squash or rebase, so the commit keeps its hash and the fork's pull request closes itself.

pull request title commits
cekees#285 test: every proteus.mprans module imports alone (guard) 1

Adds test/test_mprans_import_isolation.py, which imports each proteus.mprans module in its own interpreter and fails if any needs another module imported first. On main every module passes already (the missing imports were fixed in cfe3611); the test keeps it that way. The same test, together with the five imports and the MCorr import-order fix it found missing, is in #1362 for the 1.9.x line.

Diff against main: 1 file changed, 44 insertions(+).

🤖 Generated with Claude Code

cekees and others added 2 commits November 13, 2026 23:46
Guard against `import proteus` + attribute use (proteus.StepControl,
proteus.SubgridError, ...) that only works when something else imported the
submodule first: one pytest process per file (LSU QB 1.9.1 module tests)
exposed it as "module 'proteus' has no attribute 'StepControl'" in MCorr.
Each module gets its own subprocess; a missing third-party dependency skips.

Before: no test; 1.9.x had 6 of 30 modules failing alone (Dissipation, Kappa,
NCLS, RDLS, SW2D, MCorr), fixed in #284.
After: on main (c9cc8f6) all 32 modules pass alone (macOS arm64, env
proteus-hotstart-261025, extensions rebuilt in the worktree); main already
carries cfe3611 and MCorr's imports, so this commit is the test only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
From cekees/mprans-imports-main at cd811da (#285).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cekees
cekees merged commit d00467d into proteustoolkit:main Nov 15, 2026
9 checks passed
@cekees
cekees deleted the train/main-2026-11-14 branch November 15, 2026 09:41
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