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

Show head of duplicate rows in error message #373

Merged
merged 6 commits into from May 11, 2020

Conversation

danielhuppmann
Copy link
Member

@danielhuppmann danielhuppmann commented May 10, 2020

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added
  • Description in RELEASE_NOTES.md Added

Description of PR

Initializing an IamDataFrame with duplicate rows already raised an error. This PR extends the error message to include the head of the duplicate rows.

This came up as part of @zikolach and @vruijven working on the ixmp-server-integration pipeline and will hopefully simplify identifying the source of problematic data uploads.

@coveralls
Copy link

coveralls commented May 10, 2020

Coverage Status

Coverage decreased (-0.2%) to 86.052% when pulling 0992a48 on danielhuppmann:io/duplicate-row-listing into 3c4c9b0 on IAMconsortium:master.

Copy link
Contributor

@zikolach zikolach 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. Thanks.

Do you know why Travis build failed?


if df.empty:
logger.warning('Formatted data is empty!')

return sort_data(df, idx_cols), time_col, extra_cols

def _raise_data_error(msg, data):

Choose a reason for hiding this comment

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

E302 expected 2 blank lines, found 1

@danielhuppmann
Copy link
Member Author

re @zikolach

Do you know why Travis build failed?

I think that this is due to a timeout for the IIASA server - the pyam tests are always a bit fickle since we have tests against the rest-api. Usually restarting the build on travis is enough. But that is one more reason why I wanted to run the tests against an integration-test instance rather than the iamc15 instance, hoping this would give faster response time.

@gidden
Copy link
Member

gidden commented May 11, 2020

Thanks @danielhuppmann !

@gidden gidden merged commit 62a8ca4 into IAMconsortium:master May 11, 2020
@danielhuppmann danielhuppmann deleted the io/duplicate-row-listing branch May 20, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants