IAMconsortium / pyam

Analysis & visualization of energy & climate scenarios
https://pyam-iamc.readthedocs.io/
Apache License 2.0
221 stars 115 forks source link

Show all missing rows for `require_data()` #772

Closed danielhuppmann closed 10 months ago

danielhuppmann commented 10 months ago

Please confirm that this PR has done the following:

Description of PR

This PR changes the returned dataframe of the require_data() method to not only show the failing scenarios (dataframe of model-scenario combinations), but a dataframe that has all missing combinations of elements.

So if model_a - scen_a does not have the variableEmissions|CO2 at the global level, the method will return the following:

model scenario region variable
model_a scen_a World Emissions|CO2

closes #768

codecov[bot] commented 10 months ago

Codecov Report

Merging #772 (6755989) into main (9c947a8) will decrease coverage by 0.1%. The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main    #772     +/-   ##
=======================================
- Coverage   94.4%   94.4%   -0.1%     
=======================================
  Files         62      62             
  Lines       6130    6132      +2     
=======================================
  Hits        5789    5789             
- Misses       341     343      +2     
Files Changed Coverage Δ
pyam/core.py 95.1% <100.0%> (-0.1%) :arrow_down:
tests/test_feature_validation.py 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes