Skip to content

test: consumer-contract gate for bart26k-lecture 14_team_4_submission.qmd#189

Merged
bartzbeielstein merged 1 commit into
developfrom
test/consumer-contract-team4
Jun 6, 2026
Merged

test: consumer-contract gate for bart26k-lecture 14_team_4_submission.qmd#189
bartzbeielstein merged 1 commit into
developfrom
test/consumer-contract-team4

Conversation

@bartzbeielstein
Copy link
Copy Markdown
Collaborator

Summary

Adds tests/test_consumer_contract_team4.py — a consumer-contract gate protecting the lecture document bart26k-lecture/14_team_4_submission.qmd (decider requirement recorded in ADR adr-multitask-configmulti-merge, 2026-06-06, and tbb-skills4agents work item #1).

The test parses the most recent version of the qmd at test time (path via TEAM4_QMD env var, module skipped when absent — CI without the lecture repo stays green) and statically verifies its API surface against the installed packages:

  • every spotforecast2 / spotforecast2_safe import in its {python} cells resolves
  • ConfigEntsoe(...) constructor keywords bind against the current signature
  • every attribute read/written on the config object exists (core protection for the upcoming RunState extraction)
  • MultiTask(...) binds; non-signature keywords are validated as config fields; every pipeline method invoked on the instance exists with a compatible signature

No document render is performed (that would train models and need ENTSO-E credentials).

Lock change

First run caught real drift: the qmd requires spotforecast2-safe ≥ 16.4.0 (target_qc_range_mw, apply_target_corruption_policy — target-corruption feature, #328) while the lock held 16.3.0. uv.lock upgraded accordingly (constraint >=16.3.0,<17 unchanged).

Verification

  • uv run pytest tests/ -q1156 passed (includes the executable docs-example tests)
  • uv run ruff check src/ tests/ → clean
  • Full quarto render --no-cache not re-run (change is a test file + lock bump; docs-example tests cover the executed snippets)

🤖 Generated with Claude Code

….qmd

Statically verifies the protected lecture document's API surface (imports,
ConfigEntsoe kwargs, MultiTask pipeline methods, run_task_spotoptim signature)
against the installed packages, always parsing the most recent qmd version
(TEAM4_QMD env var, skipped when absent). Decider requirement recorded in ADR
adr-multitask-configmulti-merge (2026-06-06). First run caught real drift:
the qmd needs spotforecast2-safe >= 16.4.0 (target-corruption feature, #328)
while the lock held 16.3.0 — lock upgraded to 16.4.0 accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bartzbeielstein bartzbeielstein merged commit 8b6cbd0 into develop Jun 6, 2026
9 checks passed
@bartzbeielstein
Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 5.0.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bartzbeielstein
Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 5.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bartzbeielstein bartzbeielstein deleted the test/consumer-contract-team4 branch June 7, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant