Repository navigation
feat(api): add the itis_sumo.api consumer contract (cross-validate, grid/axes evaluation, Sobol, correlation, uncertainty propagation, MOGA, sampling) - #36
Merged
Conversation
Closed
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
from
August 19, 2026 14:03
3f4a6c9 to
29a2212
Compare
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
from
August 19, 2026 14:08
02ba97f to
fbfea82
Compare
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
2 times, most recently
from
August 19, 2026 14:20
c29aa8e to
8d07b79
Compare
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
2 times, most recently
from
August 19, 2026 14:33
081a582 to
8b60e32
Compare
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
from
August 19, 2026 14:47
7b45ae7 to
33f5c20
Compare
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
from
August 19, 2026 14:54
33f5c20 to
4f8d332
Compare
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
from
August 19, 2026 15:17
4f8d332 to
1b97ee6
Compare
JavierGOrdonnez
marked this pull request as ready for review
August 19, 2026 15:54
added 2 commits
August 19, 2026 17:55
…rid/axes evaluation, Sobol, correlation, uncertainty propagation, MOGA, sampling)
…is 3.11+ only) typing.Self (PEP 673) was only added in Python 3.11; pyproject.toml declares support down to 3.10, where importing it broke test collection for the api package's test suite once the CI matrix actually exercises 3.10.
JavierGOrdonnez
force-pushed
the
feat/consumer-api
branch
from
August 19, 2026 15:55
1b97ee6 to
fee807f
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new consumer-facing API layer (itis_sumo.api) that exposes “tabular-in / typed-results-out” workflows (cross-validation, axes/grid evaluation, Sobol, correlations, uncertainty propagation, MOGA, and sampling), backed by a fit-then-query session engine and enforced by contract + integration tests. This aligns the codebase with the SPEC’s “consumer contract” boundary (no Dakota plumbing, no job vocabulary, stable error taxonomy, and controlled run-dir lifetimes).
Changes:
- Introduces
itis_sumo.apisurface: typed dataclasses, stable error taxonomy, and workflow entrypoints backed by an internalSumoSession. - Extends evaluation internals to support manual uncertainty propagation with predictive uncertainty and adds uncertainty-summary statistics.
- Adds extensive contract/integration tests and updates docs/spec/navigation to reflect the new consumer API and vocabulary.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Locks typing-extensions for Python < 3.11. |
| pyproject.toml | Adds typing-extensions dependency marker for Python < 3.11. |
| src/itis_sumo/evaluate/funs_evaluate.py | Adds manual UQ propagation with predictive uncertainty + uncertainty summarization; threads seed / has_eval_id_column through CV; adjusts Sobol handling of unsanitized names. |
| src/itis_sumo/evaluate/init.py | Re-exports export_sumo_model / import_sumo_model. |
| src/itis_sumo/core/init.py | Re-exports model-store APIs alongside Dakota primitives. |
| src/itis_sumo/api/init.py | Defines the public consumer API surface and __all__. |
| src/itis_sumo/api/errors.py | Introduces stable public error taxonomy (SumoError and subclasses). |
| src/itis_sumo/api/types.py | Adds frozen dataclass types for configs and workflow results. |
| src/itis_sumo/api/_session.py | Implements internal fit-then-query session with validation, run-dir lifetime rules, and engine error translation. |
| src/itis_sumo/api/workflows.py | Adds consumer workflow functions (CV, axes/grid, Sobol, correlations, uncertainty, optimize, sampling helpers). |
| tests/test_dakota_funs_evaluate.py | Extends tests for uncertainty summarization and reformats existing tests. |
| tests/test_api_workflows.py | Adds end-to-end integration tests for the consumer API workflows. |
| tests/test_api_contract.py | Adds contract tests enforcing public surface, vocabulary, error taxonomy, result shape, and run-dir lifecycle. |
| SPEC.md | Documents VOCAB and the consumer contract; updates roadmap entries reflecting the API spine. |
| mkdocs.yml | Adds Glossary and Consumer API pages to navigation. |
| docs/reference/glossary.md | Documents canonical vocabulary and domain vs distribution split. |
| docs/reference/api.md | Documents consumer API usage, workflows, config, and error taxonomy. |
| examples/headless_smoke.py | Formatting updates for readability. |
| docs/tutorials/getting-started.md | Updates install note + formatting adjustments in examples. |
| docs/tutorials/examples.md | Formatting adjustments in examples. |
| docs/how-to/sensitivity-analysis.md | Formatting adjustments in examples. |
| docs/how-to/moga.md | Formatting adjustments in examples. |
| docs/how-to/cross-validate.md | Formatting adjustments in examples. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬