Defer ODE input validation until ProtWise runtime#70
Merged
bibymaths merged 2 commits intoJun 18, 2026
Conversation
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.
Motivation
[ode.inputs]so generic imports, logging, networkmodel imports, and pytest collection don't require ProtWise ODE inputs to be present.Description
config/constants.pywith import-safe defaults by returning an empty string when an ODE input is absent and addedvalidate_ode_inputs()to perform strict checks on demand._validate_path_value()helper inconfig/constants.pyto centralize required-key and optional-existence checks and exposedvalidate_ode_inputs(config, require_existing)for runtime validation.INPUT_EXCEL_*constants default-safe ("") for generic imports inconfig/constants.pyand updatedconfig/config.pyso defaults do not fabricate placeholder input paths when[ode.inputs]is absent.protwise/runner/main.pyby callingvalidate_ode_inputs(config)before the pipeline reads input files, so missing inputs produce errors only when running ProtWise.Testing
pixi install -e devandpixi run -e dev coverage-allbutpixiis not available in this environment so those could not be executed.python -m pytest -q, which progressed past the previous import-timeKeyErrorfor[ode.inputs]and instead failed during collection due to missing external test dependencies (ModuleNotFoundError: No module named 'numpy',jax,nbformat, etc.), indicating import-time ODE input validation no longer blocks collection.ast.parseto ensure syntax correctness after edits.Files changed and rationale:
config/constants.py: make ODE input constants import-safe, addvalidate_ode_inputs()and path validation helper so required checks are deferred to runtime.config/config.py: stop fabricating default ODE input paths when inputs are absent so CLI/runtime reflects missing inputs rather than invented paths.protwise/runner/main.py: callvalidate_ode_inputs(config)prior to reading input files so ProtWise execution still enforces required inputs.Codex Task