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

Try converting Array values to same type in constructor #233

Closed soininen closed 1 year ago

soininen commented 1 year ago

This PR makes Array.__init__() try to convert all values to the same type if the types are not consistent before raising an exception.

Re spine-tools/Spine-Toolbox#2017

Checklist before merging

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.02 :warning:

Comparison is base (993821d) 75.30% compared to head (2217099) 75.29%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #233 +/- ## ========================================== - Coverage 75.30% 75.29% -0.02% ========================================== Files 76 76 Lines 10890 10893 +3 Branches 2365 2366 +1 ========================================== + Hits 8201 8202 +1 - Misses 2253 2255 +2 Partials 436 436 ``` | [Impacted Files](https://codecov.io/gh/spine-tools/Spine-Database-API/pull/233?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools) | Coverage Δ | | |---|---|---| | [spinedb\_api/parameter\_value.py](https://codecov.io/gh/spine-tools/Spine-Database-API/pull/233?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvcGFyYW1ldGVyX3ZhbHVlLnB5) | `79.20% <0.00%> (-0.17%)` | :arrow_down: | | [spinedb\_api/spine\_io/importers/excel\_reader.py](https://codecov.io/gh/spine-tools/Spine-Database-API/pull/233?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvc3BpbmVfaW8vaW1wb3J0ZXJzL2V4Y2VsX3JlYWRlci5weQ==) | `66.46% <ø> (ø)` | | 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-tools). 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-tools)

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