spine-tools / Spine-Toolbox

Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
73 stars 18 forks source link

Refactor database names/DB editor window and tab management #2997

Closed soininen closed 2 weeks ago

soininen commented 3 weeks ago

This PR centralizes the management of database codenames (dropping the term 'codename') and moves the management of DB editor windows/tabs from DB manager to a dedicated machinery. This does not yet make the system perfect, but paves way for more sane DB editor tab naming and behavior. It fixes some current issues and problems, though.

No associated issue.

Checklist before merging

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 75.08772% with 71 lines in your changes missing coverage. Please review.

Project coverage is 67.12%. Comparing base (18814fa) to head (26ab292).

Files with missing lines Patch % Lines
...x/spine_db_editor/widgets/multi_spine_db_editor.py 65.71% 3 Missing and 9 partials :warning:
...toolbox/spine_db_editor/widgets/spine_db_editor.py 71.79% 10 Missing and 1 partial :warning:
...ox/spine_db_editor/mvcmodels/pivot_table_models.py 50.00% 7 Missing and 1 partial :warning:
...olbox/spine_db_editor/widgets/add_items_dialogs.py 55.55% 8 Missing :warning:
...oolbox/spine_db_editor/widgets/custom_delegates.py 0.00% 6 Missing :warning:
...toolbox/spine_db_editor/widgets/custom_qwidgets.py 40.00% 3 Missing :warning:
..._db_editor/widgets/edit_or_remove_items_dialogs.py 72.72% 3 Missing :warning:
...ox/spine_db_editor/widgets/manage_items_dialogs.py 0.00% 3 Missing :warning:
spinetoolbox/database_display_names.py 95.83% 1 Missing and 1 partial :warning:
spinetoolbox/plotting.py 33.33% 2 Missing :warning:
... and 8 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2997 +/- ## ========================================== + Coverage 66.99% 67.12% +0.13% ========================================== Files 190 193 +3 Lines 37084 37102 +18 Branches 4447 4445 -2 ========================================== + Hits 24845 24906 +61 + Misses 10978 10931 -47 - Partials 1261 1265 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.