[ ] This PR addresses an already opened issue (for bug fixes / features)
This PR fixes #xyz
[ ] (If applicable) Documentation has been added / updated (for bug fixes / features).
[ ] (If applicable) Tests have been added.
[x] This PR does not seem to break the templates.
[ ] HISTORY.rst has been updated (with summary of main changes).
[ ] Link to issue (:issue:number) and pull request (:pull:number) has been added.
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.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.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 catchValueError
whenpd.Timestamp
fails. I didn't know the object would raise that.Does this PR introduce a breaking change?
No.
Other information: