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

Fix importing values to existing value list #189

Closed soininen closed 1 year ago

soininen commented 1 year ago

Fixed an algorithm in import_functions that was used to find the next usable index in value lists. The algorithm was broken if there were more than 10 values in the list.

Fixes #188

Checklist before merging

codecov-commenter commented 1 year ago

Codecov Report

Base: 74.40% // Head: 74.32% // Decreases project coverage by -0.08% :warning:

Coverage data is based on head (08125bb) compared to base (d3f497b). Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #189 +/- ## ========================================== - Coverage 74.40% 74.32% -0.09% ========================================== Files 71 71 Lines 11691 11691 Branches 2145 2145 ========================================== - Hits 8699 8689 -10 - Misses 2538 2545 +7 - Partials 454 457 +3 ``` | [Impacted Files](https://codecov.io/gh/Spine-project/Spine-Database-API/pull/189?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project) | Coverage Δ | | |---|---|---| | [spinedb\_api/spine\_db\_server.py](https://codecov.io/gh/Spine-project/Spine-Database-API/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project#diff-c3BpbmVkYl9hcGkvc3BpbmVfZGJfc2VydmVyLnB5) | `37.63% <0.00%> (-0.53%)` | :arrow_down: | | [spinedb\_api/import\_functions.py](https://codecov.io/gh/Spine-project/Spine-Database-API/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project#diff-c3BpbmVkYl9hcGkvaW1wb3J0X2Z1bmN0aW9ucy5weQ==) | `87.82% <100.00%> (+0.44%)` | :arrow_up: | | [spinedb\_api/spine\_io/gdx\_utils.py](https://codecov.io/gh/Spine-project/Spine-Database-API/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project#diff-c3BpbmVkYl9hcGkvc3BpbmVfaW8vZ2R4X3V0aWxzLnB5) | `33.33% <0.00%> (-25.93%)` | :arrow_down: | | [spinedb\_api/spine\_io/exporters/gdx.py](https://codecov.io/gh/Spine-project/Spine-Database-API/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project#diff-c3BpbmVkYl9hcGkvc3BpbmVfaW8vZXhwb3J0ZXJzL2dkeC5weQ==) | `63.96% <0.00%> (-0.61%)` | :arrow_down: | | [spinedb\_api/check\_functions.py](https://codecov.io/gh/Spine-project/Spine-Database-API/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project#diff-c3BpbmVkYl9hcGkvY2hlY2tfZnVuY3Rpb25zLnB5) | `61.60% <0.00%> (+0.57%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Spine-project)

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