Skip to content

Add scenario_recipes module to help building scenarios#612

Merged
soininen merged 2 commits intomasterfrom
toolbox_1480_scenario_set_operations
Feb 19, 2026
Merged

Add scenario_recipes module to help building scenarios#612
soininen merged 2 commits intomasterfrom
toolbox_1480_scenario_set_operations

Conversation

@soininen
Copy link
Copy Markdown
Contributor

@soininen soininen commented Feb 19, 2026

This adds an experimental scenario_recipes module that contains some utility functions that may be useful for scenario generation in scripts. The module is the result of my exploration on what kind of functionality might be needed to implement more useful scenario recipes for Spine Toolbox.

Re spine-tools/Spine-Toolbox#1480

Checklist before merging

  • Documentation (also in Toolbox repo) is up-to-date
  • Release notes have been updated
  • Unit tests have been added/updated accordingly
  • Code has been formatted by black & isort
  • Unit tests pass

The module provides a few functions that make it easier to create
new scenarios with scenario alternatives or modify existing ones.

Re spine-tools/Spine-Toolbox#1480
These lists were a workaround to prevent API documentation of
functions that perhaps are not that useful for users.
It is better to add ':meta private:' to docstrings to achieve
the same effect as __all__ actually affects how imports are
treated. For example, my IDE was complaining that code outside of
spinedb_api was importing stuff that was not listed in __all__
although those functions are part of spinedb_api's public API.
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.03%. Comparing base (be9ab97) to head (ff2421c).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #612      +/-   ##
==========================================
+ Coverage   85.98%   86.03%   +0.05%     
==========================================
  Files          82       83       +1     
  Lines       11171    11204      +33     
  Branches     1621     1627       +6     
==========================================
+ Hits         9605     9639      +34     
+ Misses       1211     1210       -1     
  Partials      355      355              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@soininen soininen merged commit e78a77e into master Feb 19, 2026
17 checks passed
@soininen soininen deleted the toolbox_1480_scenario_set_operations branch February 19, 2026 14:12
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