spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Add active_by_default flag to entity_class table #336

Closed soininen closed 5 months ago

soininen commented 5 months ago

Added active_by_default flag to entity_class table which specifies the default value for entity alternatives of the entities of the class. By default, zero-dimensional entities have the flag set to False while for multidimensional entities, it is set to True.

Since this change alters the entity_class table, we now have a new migration script as well.

Queries, filters etc. were updated, too.

Implements #316

Checklist before merging

codecov-commenter commented 5 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (44b6883) 77.07% compared to head (ab1b8e2) 77.14%. Report is 1 commits behind head on 0.8-dev.

Files Patch % Lines
spinedb_api/mapped_items.py 66.66% 1 Missing and 1 partial :warning:
...eff478bcb_add_active_by_default_to_entity_class.py 95.45% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 0.8-dev #336 +/- ## =========================================== + Coverage 77.07% 77.14% +0.06% =========================================== Files 74 75 +1 Lines 9205 9239 +34 Branches 1944 1949 +5 =========================================== + Hits 7095 7127 +32 - Misses 1778 1780 +2 Partials 332 332 ```

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