IAMconsortium / pyam

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

Enable renaming of an empty IamDataFrame #668

Closed danielhuppmann closed 2 years ago

danielhuppmann commented 2 years ago

Please confirm that this PR has done the following:

Description of PR

This PR fixes an unexpected error when using rename() on an empty IamDataFrame.

Related to https://github.com/IAMconsortium/nomenclature/pull/123

closes #631

codecov[bot] commented 2 years ago

Codecov Report

Merging #668 (26dc7ae) into main (de6b47b) will increase coverage by 0.0%. The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #668   +/-   ##
=====================================
  Coverage   94.6%   94.6%           
=====================================
  Files         59      59           
  Lines       5770    5776    +6     
=====================================
+ Hits        5459    5465    +6     
  Misses       311     311           
Impacted Files Coverage Δ
pyam/core.py 94.6% <100.0%> (+<0.1%) :arrow_up:
tests/test_feature_rename.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update de6b47b...26dc7ae. Read the comment docs.

phackstock commented 2 years ago

It looks like it failing at the point of using actions/setup-python@v2, I quickly checked and there is a version 3 available of setup-python (https://github.com/marketplace/actions/setup-python). Maybe upgrading to this one would fix the problem?

danielhuppmann commented 2 years ago

Thanks for the assist, @phackstock!

phackstock commented 2 years ago

Fingers crossed that that fixes it.

phackstock commented 2 years ago

It worked :tada: