Add kaya_variables, kaya_factors, and kaya_lmdi methods to the comput…
…e module. Also add the kaya subdirectory that contains the implementation for the kaya methods. (#875)
Please confirm that this PR has done the following:
- [x] Tests Added
- [x] Documentation Added
- [x] Name of contributors Added to AUTHORS.rst
- [x] Description in RELEASE_NOTES.md Added
Description of PR
This PR adds three methods to the public api of the compute module: kaya_variables(), kaya_factors(), and kaya_lmdi(). The implementation for these methods is in the new kaya submodule.
Codecov Report
Attention: Patch coverage is 96.14325% with 14 lines in your changes missing coverage. Please review.
Project coverage is 95.1%. Comparing base (
ddbb88e) to head (b741dbb). Report is 33 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pyam/compute.py | 87.2% | 7 Missing :warning: |
| pyam/kaya/kaya_factors.py | 88.8% | 4 Missing :warning: |
| pyam/kaya/kaya_variables.py | 94.9% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #884 +/- ##
=======================================
+ Coverage 95.0% 95.1% +0.1%
=======================================
Files 64 74 +10
Lines 6134 6579 +445
=======================================
+ Hits 5828 6260 +432
- Misses 306 319 +13
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the PR! Looks like the legacy-test is failing is because the unit's are ordered differently
model scenario region variable unit year
model_a scen_a World GNP/P USD * billion / a / million 2010 NaN 0.006
USD * billion / million / a 2010 0.006 NaN
Will take a look more closely next week, don't worry about the failing test for now, will think about how to avoid that.