VForWaTer / metacatalog

Modular metadata management platform for environmental data.
https://vforwater.github.io/metacatalog
GNU General Public License v3.0
4 stars 1 forks source link

ResultList support calculation #175

Open AlexDo1 opened 2 years ago

AlexDo1 commented 2 years ago

We need to discuss the common support calculation for a ResultList again.

_Originally posted by @AlexDo1 in https://github.com/VForWaTer/metacatalog/pull/159#discussion_r915903121_

Support calculation, can result in negative numbers! https://github.com/VForWaTer/metacatalog/blob/5dd8b9bb8c9897581d5940a0a95f477debc1fcdd/metacatalog/util/results.py#L607-L608

Test for support calculation: https://github.com/VForWaTer/metacatalog/blob/5dd8b9bb8c9897581d5940a0a95f477debc1fcdd/metacatalog/test/test_result_set.py#L101 This is not a good assert condition, as negative values also evaluate to True (which is currently the case!). Something like pytest.approx(0.5, 0.001) == 0.5 would be better.

TODO: