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

WIP Use entity rather than object and relationship #216

Closed manuelma closed 1 year ago

manuelma commented 1 year ago

Fixes #215

Checklist before merging

jkiviluo commented 1 year ago

Importing entities with an importer overwrites entity_classes in the DB (including entity_class icons, which is why I noticed. The new entity_class icons are the default ones).

jkiviluo commented 1 year ago

I have this: image

And for some reason exporter wants to export the coal entity twice (but not the others): image

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 84.04% and project coverage change: +0.35 :tada:

Comparison is base (bf7b3bf) 75.45% compared to head (36acf4f) 75.81%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #216 +/- ## ========================================== + Coverage 75.45% 75.81% +0.35% ========================================== Files 76 73 -3 Lines 10891 8848 -2043 Branches 2374 1862 -512 ========================================== - Hits 8218 6708 -1510 + Misses 2232 1816 -416 + Partials 441 324 -117 ``` | [Impacted Files](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools) | Coverage Δ | | |---|---|---| | [spinedb\_api/\_\_init\_\_.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [spinedb\_api/db\_mapping.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvZGJfbWFwcGluZy5weQ==) | `92.30% <ø> (-1.45%)` | :arrow_down: | | [spinedb\_api/export\_mapping/\_\_init\_\_.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvZXhwb3J0X21hcHBpbmcvX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [spinedb\_api/filters/renamer.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvZmlsdGVycy9yZW5hbWVyLnB5) | `100.00% <ø> (ø)` | | | [spinedb\_api/graph\_layout\_generator.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvZ3JhcGhfbGF5b3V0X2dlbmVyYXRvci5weQ==) | `0.00% <0.00%> (ø)` | | | [spinedb\_api/perfect\_split.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvcGVyZmVjdF9zcGxpdC5weQ==) | `0.00% <0.00%> (ø)` | | | [spinedb\_api/purge.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvcHVyZ2UucHk=) | `0.00% <0.00%> (ø)` | | | [spinedb\_api/spine\_db\_server.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvc3BpbmVfZGJfc2VydmVyLnB5) | `31.13% <0.00%> (-0.18%)` | :arrow_down: | | [spinedb\_api/filters/execution\_filter.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvZmlsdGVycy9leGVjdXRpb25fZmlsdGVyLnB5) | `33.33% <14.28%> (+0.64%)` | :arrow_up: | | [...ccf80441\_replace\_values\_with\_reference\_to\_list\_.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvYWxlbWJpYy92ZXJzaW9ucy85ODlmY2NmODA0NDFfcmVwbGFjZV92YWx1ZXNfd2l0aF9yZWZlcmVuY2VfdG9fbGlzdF8ucHk=) | `53.75% <32.35%> (-17.09%)` | :arrow_down: | | ... and [24 more](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/216?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.