IAMconsortium / pyam

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

Df load meta #679

Closed gidden closed 2 years ago

gidden commented 2 years ago

Please confirm that this PR has done the following:

Adding to RELEASE_NOTES.md (remove section after adding to RELEASE_NOTES.md)

Please add a single line in the release notes similar to the following:

- (#XX)[http://link-to-pr.com] Added feature which does something

Description of PR

This PR implements support for setting metadata by dataframes, and implements all metadata setting solely via set_meta()

codecov[bot] commented 2 years ago

Codecov Report

Merging #679 (776494b) into main (74979e7) will decrease coverage by 0.0%. The diff coverage is 85.7%.

@@           Coverage Diff           @@
##            main    #679     +/-   ##
=======================================
- Coverage   94.7%   94.7%   -0.1%     
=======================================
  Files         59      59             
  Lines       5800    5812     +12     
=======================================
+ Hits        5495    5506     +11     
- Misses       305     306      +1     
Impacted Files Coverage Δ
pyam/core.py 94.6% <85.7%> (-0.1%) :arrow_down:
pyam/iiasa.py 85.8% <0.0%> (ø)
pyam/aggregation.py 99.1% <0.0%> (+<0.1%) :arrow_up:
tests/test_feature_aggregate.py 98.9% <0.0%> (+<0.1%) :arrow_up:

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 74979e7...776494b. Read the comment docs.

danielhuppmann commented 2 years ago

Thanks @gidden! One side effect of your clean-up is that the warnings are no longer shown if the (timeseries) data sheet and the meta of a file are inconsistent. Given that we are starting to use the meta-indicators-feature that more in the scenario-submission workflows, I'd be very much in favor of keeping the warnings.

gidden commented 2 years ago

Changes to load_meta() reverted!

gidden commented 2 years ago

@danielhuppmann - only style changes, should be g2g

gidden commented 2 years ago

With lgtm above and passing tests, merging