home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 885038560

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
885038560 MDExOlB1bGxSZXF1ZXN0NjM4MzgxMzUy 5288 Raise error for invalid reference date for encoding time units 44147817 closed 0     7 2021-05-10T20:25:23Z 2021-05-14T09:43:30Z 2021-05-13T18:27:13Z CONTRIBUTOR   0 pydata/xarray/pulls/5288
  • [x] Closes #5199
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

Although the error raised by this commit does not include the whole units string, I believe it is actually more useful and specific since it focuses on the part (reference date) that's actually causing the problem. Also, the reference date is the only information available in coding.times._ensure_padded_year, so this is the simplest way of raising an error.

I had a look in tests/test_coding_times.py and could not find a test for this related error raising (since I'd put a test for this commit around there) https://github.com/pydata/xarray/blob/234b40a37e484a795e6b12916315c80d70570b27/xarray/coding/times.py#L127-L129

Have I missed it?

EDIT: I've tried to substitute the error raise on line 129 with a pass and all the tests passed anyway.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5288/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 1 row from issues_id in issues_labels
  • 7 rows from issue in issue_comments
Powered by Datasette · Queries took 0.782ms · About: xarray-datasette