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

Dummy PR: demonstrate unit test failures #3923

Closed
wants to merge 1 commit into from

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Nov 19, 2020

🚀 Pull Request

Description

As raised on the Google Group, cftime v1.3 was released this week and is unforgiving about what kind of datetimes you can have. Iris tests now produce a raft of errors of the form

ValueError: invalid year provided in cftime.datetime(0, 0, 0, 0, 0, 0, 0, calendar='gregorian')

While demonstrating this locally, I saw a bunch of other failures that aren't obviously about cftime. So I figured the easiest way to raise this was to create a PR and let Travis show them!


Consult Iris pull request check list

@rcomer rcomer marked this pull request as draft November 19, 2020 16:45
@rcomer
Copy link
Member Author

rcomer commented Nov 19, 2020

I tried pinning cftime in my local requirements/ci/py37.yml. The resulting environment ran the tests with no failures or errors, so I guess cftime is the culprit for all the issues.

@rcomer
Copy link
Member Author

rcomer commented Nov 19, 2020

It seems that, at cftime 1.3 you can still specify a zero datetime without a calendar using e.g.

cftime.datetime(0,0,0, calendar=None)

@rcomer
Copy link
Member Author

rcomer commented Nov 19, 2020

Really not obvious how a flipped pressure coordinate would be caused by cftime.... 😕

@ -187,4 +187,4 @@
-        <dimCoord id="6eef7051" long_name="pressure" points="[0.1, 0.2, 0.3, 0.5, 0.7, 1.0, 2.0, 3.0, 5.0,
-		7.0, 10.0, 20.0, 30.0, 50.0, 70.0, 100.0, 150.0,
-		200.0, 250.0, 300.0, 400.0, 500.0, 600.0, 700.0,
-		850.0, 925.0, 950.0, 1000.0]" shape="(28,)" units="Unit('hPa')" value_type="float32"/>
+        <dimCoord id="6eef7051" long_name="pressure" points="[1000.0, 950.0, 925.0, 850.0, 700.0, 600.0,
+		500.0, 400.0, 300.0, 250.0, 200.0, 150.0, 100.0,
+		70.0, 50.0, 30.0, 20.0, 10.0, 7.0, 5.0, 3.0,
+		2.0, 1.0, 0.7, 0.5, 0.3, 0.2, 0.1]" shape="(28,)" units="Unit('hPa')" value_type="float32"/>

https://travis-ci.org/github/SciTools/iris/jobs/744701405#L26923-L26931

@bjlittle
Copy link
Member

@rcomer We've already pin back cftime<1.3.0 and will be investigating this failure.

Do you still need this PR? Or happy to close? 🛩️

@rcomer
Copy link
Member Author

rcomer commented Nov 25, 2020

Happy to close

@rcomer rcomer closed this Nov 25, 2020
@rcomer rcomer deleted the dummy-branch branch November 25, 2020 15:45
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