IAMconsortium / pyam

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

Ops nan hotfix #709

Closed gidden closed 1 year ago

gidden commented 1 year ago

Overview

As currently implemented, fillna=0 is not caught by the line if fillna:, and is subsequently ignored. This fixes that to allow NaNs to be filled with 0s. Without this fix, scenario data is silently thrown away when doing computations.

I have confirmed that the newly added test fails on current main.

Please confirm that this PR has done the following:

codecov[bot] commented 1 year ago

Codecov Report

Merging #709 (e3187a4) into main (947d8c4) will decrease coverage by 0.0%. The diff coverage is 90.0%.

@@           Coverage Diff           @@
##            main    #709     +/-   ##
=======================================
- Coverage   94.8%   94.8%   -0.1%     
=======================================
  Files         58      58             
  Lines       5899    5911     +12     
=======================================
+ Hits        5598    5608     +10     
- Misses       301     303      +2     
Impacted Files Coverage Δ
pyam/iiasa.py 86.7% <ø> (ø)
tests/test_iiasa.py 97.8% <ø> (-0.1%) :arrow_down:
tests/test_io.py 98.4% <85.7%> (-1.6%) :arrow_down:
pyam/core.py 94.5% <87.5%> (ø)
pyam/_ops.py 94.0% <100.0%> (ø)
pyam/utils.py 91.6% <100.0%> (-0.1%) :arrow_down:
tests/test_ops.py 100.0% <100.0%> (ø)

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