Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resolver to new iamc sub-package #60

Merged
merged 8 commits into from
Oct 24, 2024
Merged

Add Resolver to new iamc sub-package #60

merged 8 commits into from
Oct 24, 2024

Conversation

coroa
Copy link
Owner

@coroa coroa commented Oct 15, 2024

Resolver allows to consolidate variables by composing variants.

Example

co2emissions = ar6.loc[isin(gas="CO2")]
r = Resolver.from_data(co2emissions, "sector", ["AFOLU", "Energy"])
r["Energy"] |= r["Energy|Demand"] + r["Energy|Supply"]
r["AFOLU"] |= r["AFOLU|Land"] + r["AFOLU|Agriculture"]
r.as_df()

TODO

  • Add documentation
  • Add simple tests

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 292 lines in your changes missing coverage. Please review.

Project coverage is 60.64%. Comparing base (6fbaa99) to head (d6a5cd2).

Files with missing lines Patch % Lines
src/pandas_indexing/iamc/resolver.py 0.00% 291 Missing ⚠️
src/pandas_indexing/iamc/__init__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #60       +/-   ##
===========================================
- Coverage   81.38%   60.64%   -20.74%     
===========================================
  Files           9       11        +2     
  Lines         854     1146      +292     
  Branches      150      183       +33     
===========================================
  Hits          695      695               
- Misses        130      422      +292     
  Partials       29       29               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coroa coroa merged commit df9f347 into main Oct 24, 2024
6 checks passed
@coroa coroa deleted the add-resolver branch October 24, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants