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

Raise ValueError upon construction of invalid datetime object #12

Merged
merged 2 commits into from
Feb 13, 2018

Conversation

spencerkclark
Copy link
Collaborator

Addresses #8 and #9

This PR switches netcdftime.datetime from pointing to DatetimeProlepticGregorian to the generic netcdftime._netcdftime.datetime object and adds logic to raise a ValueError if a constructed date is out of bounds for a given calendar.

Locally all the tests pass when I make these changes, but I'm not sure if they have unintended consequences for netcdftime or netcdf4-python. Please let me know if you have any comments or suggestions on my implementation. In particular, this is my first time working with cython; hopefully what I have here is a decent start. Many thanks.

@spencerkclark spencerkclark mentioned this pull request Apr 16, 2017
4 tasks
@jhamman
Copy link
Collaborator

jhamman commented Feb 13, 2018

@spencerkclark - can you resolve the conflicts here?

Conflicts:
	netcdftime/_netcdftime.c
@CLAassistant
Copy link

CLAassistant commented Feb 13, 2018

CLA assistant check
All committers have signed the CLA.

@spencerkclark
Copy link
Collaborator Author

@jhamman yes, I think things should be up to date now.

@jhamman
Copy link
Collaborator

jhamman commented Feb 13, 2018

@jswhit - do you have any thoughts based on @spencerkclark's comments above?

@jswhit
Copy link
Collaborator

jswhit commented Feb 13, 2018

Can't think of any reason this would cause problems.

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.

4 participants