Skip to content

Conversation

@rcomer
Copy link
Member

@rcomer rcomer commented May 15, 2021

🚀 Pull Request

Description

See #4137

Explicitly make the coord_categorisation functions always use a cftime.datetime instance, so that tests pass with cf_units v2.1.5. I also removed the comment about Unit.num2date being deprecated. That comment dated back to the days when Unit was part of Iris, and I can't see anything in cf_units.__init__.py to suggest Unit.num2date is deprecated.

I also fixed a link to the black docs. This duplicates part of #4132, but it looks like the main tests in that PR can't pass without pulling in this change anyway.

I am on leave for the next week but happy if someone else applies any changes here if they are needed in the meantime.


Consult Iris pull request check list

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Thanks @rcomer!

While there are many other uses of num2date(), they all appear to be happily working with the new default return of cftime.datetime already, so no need to add the same argument to all those calls too.

@trexfeathers trexfeathers merged commit 036fc16 into SciTools:auto-update-lockfiles May 17, 2021
@rcomer rcomer deleted the fix-add_weekday branch May 25, 2021 16:24
@rcomer rcomer restored the fix-add_weekday branch May 26, 2021 20:53
@trexfeathers trexfeathers mentioned this pull request Jun 2, 2021
@rcomer rcomer deleted the fix-add_weekday branch June 2, 2021 17:22
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.

2 participants