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

core: Add filtering by index #674

Merged
merged 7 commits into from
Jun 30, 2022
Merged

core: Add filtering by index #674

merged 7 commits into from
Jun 30, 2022

Conversation

coroa
Copy link
Collaborator

@coroa coroa commented Jun 27, 2022

Fixes #673 .

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added
  • Name of contributors Added to AUTHORS.rst
  • Description in RELEASE_NOTES.md Added

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

Tentative implementation for a filter kwarg supporting to select a list of pathways.

@coroa
Copy link
Collaborator Author

coroa commented Jun 27, 2022

Needs documentation and a test. Extend when you have the time. I'll try to do something about it tmw.

@coroa
Copy link
Collaborator Author

coroa commented Jun 27, 2022

Failing tests are iiasa and unfcc connectors. Pbb unrelated to this PR.

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #674 (56a9bc0) into main (52b4d03) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #674   +/-   ##
=====================================
  Coverage   94.7%   94.7%           
=====================================
  Files         59      59           
  Lines       5768    5800   +32     
=====================================
+ Hits        5463    5495   +32     
  Misses       305     305           
Impacted Files Coverage Δ
pyam/core.py 94.6% <100.0%> (+<0.1%) ⬆️
tests/test_filter.py 100.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 52b4d03...56a9bc0. Read the comment docs.

@coroa
Copy link
Collaborator Author

coroa commented Jun 28, 2022

Failing tests are iiasa and unfcc connectors. Pbb unrelated to this PR.

Thanks for fixing, @danielhuppmann . Incorporated.

@gidden
Copy link
Member

gidden commented Jun 30, 2022

I've added minimal docstrings and to the release notes. @coroa this looks good to go from my side - good for you?

@gidden
Copy link
Member

gidden commented Jun 30, 2022

And any final thoughts from @danielhuppmann also welcome. Unless there's more to add, will merge when tests pass.

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor suggestion to add the pandas.MultiIndex explicitly to the docs, otherwise - awesome!

pyam/core.py Outdated Show resolved Hide resolved
Co-authored-by: Daniel Huppmann <dh@dergelbesalon.at>
@gidden gidden merged commit 74979e7 into main Jun 30, 2022
@gidden
Copy link
Member

gidden commented Jun 30, 2022

Thank you @coroa !

@gidden gidden deleted the filter-index branch June 30, 2022 12:45
@coroa
Copy link
Collaborator Author

coroa commented Jun 30, 2022

Good to go from my side :)

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.

Proposal: filter by model-scenario combinations
3 participants