Skip to content

Conversation

@soininen
Copy link
Contributor

@soininen soininen commented Dec 16, 2025

Toolbox now stores the selected filters of link arrows into <project root>/.spinetoolbox/local/project_local_data.json.

Besides that, this PR contains a large refactoring of project loading and upgrading code where the goal has been to share as much code as possible between the headless mode and GUI. Perhaps the most impactful user-facing change is that the headless mode now upgrades the project just like Toolbox would do. Previously, upgrading was disabled in the headless mode since the code depended on instantiating the main window.

Re #2509

Checklist before merging

  • Documentation 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

ProjectUpgrader contained a reference to ToolboxUI instance for
logging purposes which prevented its usage in the headless mode.
Further, the class consitest mostly of static methods which raises
the question why do we need a dedicated class at all.

- ProjectUpgrader class has now been replaced by free functions
  most of which are the static methods from ProjectUpgrader.
- The functions do not depend on ToolboxUI meaning they can
  be used in headless mode, or moved to Spine Engine in the distant
  future.

Re #2509
The goal here was to share a much as possible code between
the headless model, ToolboxUI, Project and plugins.
A secondary goal was to break the functions into more easily
testable pieces.

Re #2509
@soininen soininen force-pushed the 2509_make_filter_settings_local branch from 30393e7 to 8762ae9 Compare December 16, 2025 10:57
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 61.87595% with 252 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.20%. Comparing base (8e8ef98) to head (8762ae9).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
spinetoolbox/project_upgrader.py 59.07% 120 Missing and 40 partials ⚠️
spinetoolbox/headless.py 0.00% 44 Missing ⚠️
spinetoolbox/project.py 54.16% 20 Missing and 2 partials ⚠️
spinetoolbox/plugin_manager.py 25.00% 15 Missing ⚠️
spinetoolbox/ui_main.py 57.14% 9 Missing ⚠️
spinetoolbox/load_project.py 95.74% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3239      +/-   ##
==========================================
+ Coverage   70.01%   70.20%   +0.19%     
==========================================
  Files         202      204       +2     
  Lines       39084    39103      +19     
  Branches     4725     4721       -4     
==========================================
+ Hits        27364    27453      +89     
+ Misses      10416    10354      -62     
+ Partials     1304     1296       -8     

☔ 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 b8188dd into master Dec 16, 2025
18 of 19 checks passed
@soininen soininen deleted the 2509_make_filter_settings_local branch December 16, 2025 11:18
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.

2 participants