message_ix icon indicating copy to clipboard operation
message_ix copied to clipboard

Test & improve perfomance in .tools.add_year

Open khaeru opened this issue 4 years ago • 2 comments

Most (137 of 187) untested lines in message_ix are in .tools.add_year: https://codecov.io/gh/iiasa/message_ix/tree/master/message_ix/tools/add_year

This PR adds tests for this code, but also reimplements some internal methods for better performance.

Partially addresses #433.

How to review

To be added.

PR checklist

  • [ ] Complete code
    • [x] Remove usage of pandas.DataFrame.append(), which was removed in pandas 2.0.0.
  • [ ] Continuous integration checks all ✅
  • [ ] Add or expand tests; coverage checks both ✅
  • [ ] Add, expand, or update documentation.
  • [ ] Update release notes.

khaeru avatar Jul 18 '21 22:07 khaeru

Codecov Report

Merging #494 (7a3d2ba) into main (a824be9) will increase coverage by 0.6%. The diff coverage is 92.0%.

@@           Coverage Diff           @@
##            main    #494     +/-   ##
=======================================
+ Coverage   94.4%   95.0%   +0.6%     
=======================================
  Files         43      43             
  Lines       3432    3482     +50     
=======================================
+ Hits        3241    3310     +69     
+ Misses       191     172     -19     
Impacted Files Coverage Δ
message_ix/tools/add_year/__init__.py 72.8% <88.8%> (+6.6%) :arrow_up:
message_ix/tests/tools/test_add_year.py 96.9% <100.0%> (+1.1%) :arrow_up:

codecov[bot] avatar Jul 18 '21 22:07 codecov[bot]

Filtering out commits that were included in #703 already.

glatterf42 avatar Apr 18 '23 06:04 glatterf42