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

Update error message for empty dataframe #107

Merged
merged 5 commits into from
Mar 17, 2022

Conversation

phackstock
Copy link
Contributor

I took a look at #103 and realized its pretty much taken care of with the merging of #99 as data frames are only added to processed_dfs if they are not empty.
I only found a slight inconsistency in the error message. In case processed_dfs is empty it would only report: "The region aggregation for model {model} resulted in an empty dataset" which can be misleading in case of multiple models.
I adjusted the error message and modified a unit test to test for that.

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.

A few suggestions for improving consistency...

tests/test_core.py Outdated Show resolved Hide resolved
nomenclature/processor/region.py Outdated Show resolved Hide resolved
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.

Looks good, thank you @phackstock

@phackstock phackstock merged commit a9f64c4 into IAMconsortium:main Mar 17, 2022
@phackstock phackstock deleted the feature/check-df-empty branch March 17, 2022 08:33
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