IAMconsortium / pyam

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

Add a proper length attribute #643

Closed danielhuppmann closed 2 years ago

danielhuppmann commented 2 years ago

Description of PR

This PR fixes the __len__ attribute, which should only count the timeseries data points actually included in the slice.

codecov[bot] commented 2 years ago

Codecov Report

Merging #643 (5326d92) into add-iamslice (8fe4376) will increase coverage by 0.0%. The diff coverage is 100.0%.

Impacted file tree graph

@@             Coverage Diff              @@
##           add-iamslice    #643   +/-   ##
============================================
  Coverage          94.4%   94.4%           
============================================
  Files                57      58    +1     
  Lines              5698    5702    +4     
============================================
+ Hits               5380    5384    +4     
  Misses              318     318           
Impacted Files Coverage Δ
pyam/core.py 93.5% <100.0%> (+<0.1%) :arrow_up:
tests/test_slice.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 8fe4376...5326d92. Read the comment docs.