IAMconsortium / pyam

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

Remove unused meta levels during initialization #695

Closed danielhuppmann closed 1 year ago

danielhuppmann commented 1 year ago

Please confirm that this PR has done the following:

Description of PR

This PR fixes a bug where the IamDataFrame attributes (model, scenario, ...) where not correctly downselected when initializing an IamDataFrame with a meta dataframe that had additional model-scenario combinations.

closes #694

codecov[bot] commented 1 year ago

Codecov Report

Merging #695 (2015bfc) into main (bd3aea4) will increase coverage by 0.0%. The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #695   +/-   ##
=====================================
  Coverage   94.8%   94.8%           
=====================================
  Files         58      58           
  Lines       5819    5823    +4     
=====================================
+ Hits        5521    5525    +4     
  Misses       298     298           
Impacted Files Coverage Δ
pyam/core.py 94.8% <100.0%> (+<0.1%) :arrow_up:
tests/test_core.py 100.0% <100.0%> (ø)
tests/test_iiasa.py 97.2% <100.0%> (+<0.1%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.