Skip to content

Conversation

@ptsavol
Copy link
Member

@ptsavol ptsavol commented Jun 27, 2025

This PR updates settings widget in order to remember more than one python interpreter, julia project, and julia executables. In addition, projects will be updated to version 14, which is compatible with a related spine-items branch (toolbox_issue_3029_phase_1) and the related PR spine-tools/spine-items#269. The project upgrader moves tool execution settings from the local Tool Specifation settings file into local Project settings file.

Re #3029

To test:

  • Check out branch issue_3029_phase_1 from Spine Toolbox
  • Check out branch toolbox_issue_3029_phase_1 from spine-items
  • Backup projects you are going to test with these branches
  • Open Toolbox and project and accept the project upgrade
  • Execute project and see what happens
  • Open File-Settings->Tools and add some Python, Julias, and Julia projects to the combobox lists
  • Check that the added Pythons and Julias are remembered after closing the settings widget, and toolbox
  • Change execution settings of individual Tools and check that they work like they should

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

ptsavol added 17 commits March 13, 2025 15:21
# Conflicts resolved in:
#	spinetoolbox/resources_icons_rc.py
#	spinetoolbox/ui/mainwindow.py
#	spinetoolbox/ui/settings.py
- Load all pythons, julias, and kernels into memory at startup
- Fix bugs in kernel models
When execution settings in local project data are missing:
- Tool Pythons default to the Python that was used in launching the app
- Tool Julias default to the Julia found in PATH.
- Tool Julia Projects default to the Julia 'home' project/environment
# Conflicts resolved in:
#	spinetoolbox/spine_db_editor/ui/spine_db_editor_window.py
#	spinetoolbox/ui_main.py
@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

❌ Patch coverage is 50.21802% with 685 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.90%. Comparing base (50fa5a5) to head (400b0c2).
⚠️ Report is 100 commits behind head on master.

Files with missing lines Patch % Lines
spinetoolbox/widgets/kernel_editor.py 18.91% 281 Missing and 2 partials ⚠️
spinetoolbox/widgets/settings_widget.py 40.55% 159 Missing and 11 partials ⚠️
spinetoolbox/kernel_models.py 59.84% 82 Missing and 20 partials ⚠️
spinetoolbox/helpers.py 28.26% 61 Missing and 5 partials ⚠️
spinetoolbox/widgets/custom_menus.py 41.89% 43 Missing ⚠️
spinetoolbox/project_upgrader.py 84.61% 3 Missing and 7 partials ⚠️
spinetoolbox/ui_main.py 81.48% 2 Missing and 3 partials ⚠️
spinetoolbox/widgets/notification.py 69.23% 2 Missing and 2 partials ⚠️
spinetoolbox/kernel_fetcher.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3140      +/-   ##
==========================================
- Coverage   68.60%   67.90%   -0.71%     
==========================================
  Files         195      196       +1     
  Lines       37855    38520     +665     
  Branches     4539     4654     +115     
==========================================
+ Hits        25972    26156     +184     
- Misses      10578    11042     +464     
- Partials     1305     1322      +17     

☔ 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.

@ptsavol
Copy link
Member Author

ptsavol commented Jun 27, 2025

@soininen, @jkiviluo I think these PR's related to #3029 (phase 1) are ready for testing. This is quite a big change so I'm sure there are some quirks here and there but I'm hoping you could narrow them down for me.

@soininen
Copy link
Contributor

This is starting to look good! A few notes:

  • I installed a new Julia using the Install Julia button. I would have expected the Julia executable to appear in the Use Julia executable combo box automatically but it did not.
  • After adding the new Julia to the list of Julia executables manually, I added a new Julia Tool to my project. However, the newly added Julia was not available in the Tool properties.
  • Same thing with Julia project, I used the Install SpineOpt wizard to create a new project and added it to the Settings dialog but it does not appear in Tool properties.
  • Is there a way to remove executables/Julia projects?

@soininen
Copy link
Contributor

soininen commented Jul 3, 2025

With this PR, Jump arrows that use Tool specifications would always use the "default" environment (and Julia project) selected from Settings, right? Being able to specify the interpreter for Jumps feels like such a niche use case that I think we can do that later if someone requires it.

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.

3 participants