IAMconsortium / pyam

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

Migrate utility function `raise_data_error` to logging module #584

Closed danielhuppmann closed 2 years ago

danielhuppmann commented 2 years ago

Description of PR

While working on #580 and doing some benchmarking, I got tangled between the actual performance improvements and some refactoring to prevent circular imports. This PR separates out some pure refactoring and clean-up, moving the raise_data_error utility function to the logging module.

codecov[bot] commented 2 years ago

Codecov Report

Merging #584 (41a05c2) into main (151e330) will increase coverage by 0.0%. The diff coverage is 89.4%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #584   +/-   ##
=====================================
  Coverage   93.7%   93.7%           
=====================================
  Files         50      50           
  Lines       5339    5341    +2     
=====================================
+ Hits        5004    5006    +2     
  Misses       335     335           
Impacted Files Coverage Δ
pyam/plotting.py 92.9% <50.0%> (+<0.1%) :arrow_up:
pyam/utils.py 91.6% <80.0%> (-0.1%) :arrow_down:
pyam/core.py 94.3% <100.0%> (ø)
pyam/index.py 98.0% <100.0%> (ø)
pyam/logging.py 64.8% <100.0%> (+5.4%) :arrow_up:
pyam/time.py 96.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 151e330...41a05c2. Read the comment docs.

danielhuppmann commented 2 years ago

Merging as there were no objections and this is a non-functional change.