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

Refactor to allow subclasses to set their own time format #177

Merged
merged 12 commits into from Jan 25, 2019

Conversation

znicholls
Copy link
Collaborator

@znicholls znicholls commented Jan 24, 2019

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added (N/A)
  • 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

This PR moves the formatting of the time column from pyam/utils.py into a method of IamDataFrame. This allows subclasses to avoid converting to pandas datetime if their timespan is greater than the pandas maximum of 584 years (see https://stackoverflow.com/questions/32888124/pandas-out-of-bounds-nanosecond-timestamp-after-offset-rollforward-plus-adding-a).

@coveralls
Copy link

coveralls commented Jan 24, 2019

Coverage Status

Coverage increased (+0.03%) to 83.966% when pulling 01e5c89 on znicholls:allow-custom-time-formatting into 8f1d58e on IAMconsortium:master.

tests/test_core.py Outdated Show resolved Hide resolved
pyam/core.py Outdated Show resolved Hide resolved
pyam/core.py Outdated Show resolved Hide resolved
@gidden gidden mentioned this pull request Jan 25, 2019
@gidden
Copy link
Member

gidden commented Jan 25, 2019

Hey Zeb, looks like a good effort here. I made a PR into your branch with some of the nontrivial things I was thinking of (plus a little cleanup of surrounding code you didn't touch). Let me know if you have any questions there. More comments coming inline.

Copy link
Member

@gidden gidden left a comment

Choose a reason for hiding this comment

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

looks great! just a few thoughts

pyam/core.py Outdated Show resolved Hide resolved
tests/test_core.py Outdated Show resolved Hide resolved
@gidden
Copy link
Member

gidden commented Jan 25, 2019 via email

tests/test_core.py Outdated Show resolved Hide resolved
tests/test_core.py Outdated Show resolved Hide resolved
@gidden
Copy link
Member

gidden commented Jan 25, 2019

looks great! Thanks @znicholls

@gidden gidden merged commit ce914d7 into IAMconsortium:master Jan 25, 2019
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.

None yet

5 participants