Skip to content

feat(api): add the itis_sumo.api consumer contract (cross-validate, grid/axes evaluation, Sobol, correlation, uncertainty propagation, MOGA, sampling) - #36

Merged
JavierGOrdonnez merged 5 commits into
developfrom
feat/consumer-api
Aug 19, 2026
Merged

JavierGOrdonnez merged 5 commits into
developfrom
feat/consumer-api

Conversation

@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLI • Give Feedback 💬

@JavierGOrdonnez
JavierGOrdonnez force-pushed the feat/consumer-api branch 2 times, most recently from c29aa8e to 8d07b79 Compare August 19, 2026 14:20
@JavierGOrdonnez
JavierGOrdonnez force-pushed the feat/consumer-api branch 2 times, most recently from 081a582 to 8b60e32 Compare August 19, 2026 14:33
Base automatically changed from fix/preprocess-cleanup to develop August 19, 2026 15:54
@JavierGOrdonnez
JavierGOrdonnez marked this pull request as ready for review August 19, 2026 15:54
@JavierGOrdonnez
JavierGOrdonnez requested a lite review from Copilot August 19, 2026 15:54
@JavierGOrdonnez JavierGOrdonnez self-assigned this Aug 19, 2026
Javier Garcia Ordonez 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 JavierGOrdonnez added the enhancement New feature or request label Aug 19, 2026
@JavierGOrdonnez JavierGOrdonnez added this to the Kula Ring milestone Aug 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.api surface: typed dataclasses, stable error taxonomy, and workflow entrypoints backed by an internal SumoSession.
  • 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.

Comment thread src/itis_sumo/api/workflows.py Outdated
@JavierGOrdonnez
JavierGOrdonnez merged commit b3e076d into develop Aug 19, 2026
7 of 8 checks passed
@JavierGOrdonnez
JavierGOrdonnez deleted the feat/consumer-api branch August 19, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants