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

Create new IamcDataFilter class #360

Merged
merged 9 commits into from
Aug 9, 2024
Merged

Conversation

danielhuppmann
Copy link
Member

This PR is a preparation step for a new DataValidator processor, see IAMconsortium/common-definitions#104

Given the overlap with the already-existing RequiredData processor, the first step is to pull out a common underlying class to collect IAMC-format filters.

In the process, I've been debating with myself whether the DataValidator should support the measurand feature...

Any thoughts @phackstock?

@phackstock
Copy link
Contributor

In the process, I've been debating with myself whether the DataValidator should support the measurand feature...

At some point it might be nice/necessary to do that. For a first implementation though I'd go for maximum simplicity. If the unit is not what we expect, the numbers will be wrong and it would be caught by the validator anyway.

@danielhuppmann
Copy link
Member Author

Seems like upgrading to matplotlib 3.9.1.post1 does the trick...

@danielhuppmann danielhuppmann marked this pull request as ready for review August 7, 2024 04:39
Copy link
Contributor

@phackstock phackstock left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, couple of questions/comments below.

nomenclature/iamc/datapoint.py Outdated Show resolved Hide resolved
nomenclature/iamc/datapoint.py Outdated Show resolved Hide resolved
nomenclature/processor/required_data.py Show resolved Hide resolved
nomenclature/iamc/datapoint.py Outdated Show resolved Hide resolved
nomenclature/iamc/datapoint.py Outdated Show resolved Hide resolved
@danielhuppmann
Copy link
Member Author

Thanks @phackstock for the thorough review. I played around a bit, but it always ended up being way more complicated than it should be, so I concluded that a little bit of duplication is better than a very complex piece of code...

Copy link
Contributor

@phackstock phackstock left a comment

Choose a reason for hiding this comment

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

Thanks for the re-write @danielhuppmann, fully agree with "a little bit of duplication is better than a very complex piece of code" 👍
One small in line comment but good to merge from my side.

nomenclature/processor/required_data.py Outdated Show resolved Hide resolved
Co-authored-by: Philip Hackstock <20710924+phackstock@users.noreply.github.com>
@danielhuppmann danielhuppmann merged commit ff55b90 into main Aug 9, 2024
12 checks passed
@danielhuppmann danielhuppmann deleted the feature/validate-data branch August 9, 2024 08:00
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