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

Treat pivoted leaf import mapping correctly even when its position is set to header #257

Closed soininen closed 12 months ago

soininen commented 12 months ago

This PR fixes two bugs in import_mappings:

Fixes spine-tools/Spine-Toolbox#2224

@manuelma FYI: this touches some stuff that may conflict with the entity branch.

Checklist before merging

codecov-commenter commented 12 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.06% :tada:

Comparison is base (4168c30) 75.33% compared to head (f4272dd) 75.39%.

: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 #257 +/- ## ========================================== + Coverage 75.33% 75.39% +0.06% ========================================== Files 76 76 Lines 10921 10921 Branches 2378 2378 ========================================== + Hits 8227 8234 +7 + Misses 2253 2246 -7 Partials 441 441 ``` | [Files Changed](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools) | Coverage Δ | | |---|---|---| | [spinedb\_api/import\_mapping/generator.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvaW1wb3J0X21hcHBpbmcvZ2VuZXJhdG9yLnB5) | `90.80% <100.00%> (ø)` | | | [spinedb\_api/import\_mapping/import\_mapping.py](https://app.codecov.io/gh/spine-tools/Spine-Database-API/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvaW1wb3J0X21hcHBpbmcvaW1wb3J0X21hcHBpbmcucHk=) | `88.25% <100.00%> (+1.11%)` | :arrow_up: |

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