Ouranosinc / xscen

A climate change scenario-building analysis framework.
https://xscen.readthedocs.io/
Apache License 2.0
15 stars 2 forks source link

Better DATES #259

Closed aulemahal closed 1 year ago

aulemahal commented 1 year ago

Pull Request Checklist:

What kind of change does this PR introduce?

Minimal pull request that fixes a bug I just had in the data catalogs.

The "DATES" format flag now needs at least 4 digits to match and a maximum of 15. I had removed that condition earlier, but I believe it was out of laziness to actually think about it. I see no way that a date would have fewer than 4 digits. I had some CORDEX files with a trailing ".1.nc" in the filename, and it shouldn't be recognized as date.

In date_parser, also catch ValueError when pd.Timestamp fails. I didn't know the object would raise that.

Does this PR introduce a breaking change?

No.

Other information: