home / github / pull_requests

Menu
  • Search all tables
  • GraphQL API

pull_requests: 1067602992

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
1067602992 PR_kwDOAMm_X84_olQw 7085 closed 0 solve a bug when the units attribute is not a string 10563614 <!-- Feel free to remove check-list items aren't relevant to your change --> - [ ] Closes #xxxx - [x] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` We faced a sort of bug with a colleague of mine. It seems to be legal to set a numeric value to the units attributes in an xarray or a netcdf file. xarray accepts to save such an array to netcdf: xr.DataArray([1, 2, 3], attrs={'units': 1}, name='x').to_csv('tmp.nc'). Reading this netcdf file with xarray.open_dataset raises an error. It is unlikely to have a scalar for the units, but at least it happened to us (the value was NaN) and this raised an exception very difficult to understand. This raises an exception because ```"since" in attrs["units"]``` was called twice in xarray codebase (in coding_times.py and in conventions.py) without checking for the type of the attribute. This PR solves this improbable bug 2022-09-26T19:27:08Z 2022-09-28T19:13:11Z 2022-09-28T19:13:11Z 2022-09-28T19:13:11Z 2c43663aae1292b88b1abb399eff8484a9f562a0     0 d14fda131fd56fad1bb803cc2882c4b7ab5746f4 5ba830d02099659a81afe08c4bfc03b4bed62ff2 CONTRIBUTOR
{
    "enabled_by": {
        "login": "TomNicholas",
        "id": 35968931,
        "node_id": "MDQ6VXNlcjM1OTY4OTMx",
        "avatar_url": "https://avatars.githubusercontent.com/u/35968931?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/TomNicholas",
        "html_url": "https://github.com/TomNicholas",
        "followers_url": "https://api.github.com/users/TomNicholas/followers",
        "following_url": "https://api.github.com/users/TomNicholas/following{/other_user}",
        "gists_url": "https://api.github.com/users/TomNicholas/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/TomNicholas/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/TomNicholas/subscriptions",
        "organizations_url": "https://api.github.com/users/TomNicholas/orgs",
        "repos_url": "https://api.github.com/users/TomNicholas/repos",
        "events_url": "https://api.github.com/users/TomNicholas/events{/privacy}",
        "received_events_url": "https://api.github.com/users/TomNicholas/received_events",
        "type": "User",
        "site_admin": false
    },
    "merge_method": "squash",
    "commit_title": "Fix bug with netcdf when units attribute is not a string  (#7085)",
    "commit_message": "* solve a bug when the units attribute is not a string (it happens that it is np.nan)\r\n\r\n* [pre-commit.ci] auto fixes from pre-commit.com hooks\r\n\r\nfor more information, see https://pre-commit.ci\r\n\r\n* update the bug fixes section\r\n\r\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>\r\nCo-authored-by: Anderson Banihirwe <axbanihirwe@ualr.edu>\r\nCo-authored-by: Tom Nicholas <thomas.nicholas@columbia.edu>"
}
13221727 https://github.com/pydata/xarray/pull/7085  

Links from other tables

  • 3 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 1.212ms