home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

4 rows where repo = 13221727, state = "closed" and user = 15892073 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: comments, closed_at, created_at (date), updated_at (date), closed_at (date)

type 2

  • issue 2
  • pull 2

state 1

  • closed · 4 ✖

repo 1

  • xarray · 4 ✖
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
1394854820 I_kwDOAMm_X85TI8uk 7115 import_metadata==5.0.0 causes error when loading netcdf file EtienneCmb 15892073 closed 0     5 2022-10-03T14:39:57Z 2022-10-03T16:13:20Z 2022-10-03T16:11:53Z CONTRIBUTOR      

What happened?

Loading an .nc file under Python 3.7 and with the latest importlib_metadata==5.0.0 doesn't work.

What did you expect to happen?

File should be loaded.

Minimal Complete Verifiable Example

```Python

Python version 3.7

import_metadata==5.0.0

import xarray as xr import numpy as np

data = xr.DataArray( np.random.rand(10, 20) ) data.to_netcdf('test.nc') xr.load_dataarray('test.nc') ```

MVCE confirmation

  • [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • [X] Complete example — the example is self-contained, including all data and the text of any traceback.
  • [X] Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • [X] New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

Python Traceback (most recent call last): File "xarray_bug.py", line 7, in <module> xr.load_dataarray('test.nc') File "/home/etienne/anaconda3/envs/py37/lib/python3.7/site-packages/xarray/backends/api.py", line 267, in load_dataarray with open_dataarray(filename_or_obj, **kwargs) as da: File "/home/etienne/anaconda3/envs/py37/lib/python3.7/site-packages/xarray/backends/api.py", line 666, in open_dataarray **kwargs, File "/home/etienne/anaconda3/envs/py37/lib/python3.7/site-packages/xarray/backends/api.py", line 479, in open_dataset engine = plugins.guess_engine(filename_or_obj) File "/home/etienne/anaconda3/envs/py37/lib/python3.7/site-packages/xarray/backends/plugins.py", line 110, in guess_engine engines = list_engines() File "/home/etienne/anaconda3/envs/py37/lib/python3.7/site-packages/xarray/backends/plugins.py", line 105, in list_engines entrypoints = entry_points().get("xarray.backends", ()) AttributeError: 'EntryPoints' object has no attribute 'get'

Anything else we need to know?

  • Only with importlib_metadata==5.0.0
  • Doesn't works with Python 3.7 but it works with 3.9
  • Similar problem for flake8 repo.
  • They solved it by imposing a specific version for python versions under 3.8 : https://github.com/PyCQA/flake8/blob/2c1bfa1f3d85e4d94ebc3b6d601d454a09d8043e/setup.cfg#L44

Environment

INSTALLED VERSIONS ------------------ commit: None python: 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) [GCC 9.4.0] python-bits: 64 OS: Linux OS-release: 5.4.210-1-MANJARO machine: x86_64 processor: byteorder: little LC_ALL: None LANG: fr_FR.UTF-8 LOCALE: ('fr_FR', 'UTF-8') libhdf5: 1.12.2 libnetcdf: 4.9.0 xarray: 0.20.2 pandas: 1.3.5 numpy: 1.21.6 scipy: None netCDF4: 1.6.1 pydap: None h5netcdf: 1.0.2 h5py: 3.7.0 Nio: None zarr: None cftime: 1.6.2 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: None cartopy: None seaborn: None numbagg: None fsspec: None cupy: None pint: None sparse: None setuptools: 65.4.1 pip: 22.2.2 conda: None pytest: None IPython: 7.34.0 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7115/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
597940678 MDExOlB1bGxSZXF1ZXN0NDAxOTQ5MDg0 3963 Empty line missing for DataArray.assign_coords doc EtienneCmb 15892073 closed 0     1 2020-04-10T15:15:50Z 2020-04-10T15:20:35Z 2020-04-10T15:20:35Z CONTRIBUTOR   0 pydata/xarray/pulls/3963

Related to #3958 an empty is probably missing for the example section

  • [ ] Passes isort -rc . && black . && mypy . && flake8
  • [ ] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3963/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
597100828 MDExOlB1bGxSZXF1ZXN0NDAxMjc0MDQ4 3958 New coords to existing dim (doc) EtienneCmb 15892073 closed 0     5 2020-04-09T08:07:16Z 2020-04-10T15:01:19Z 2020-04-10T13:17:13Z CONTRIBUTOR   0 pydata/xarray/pulls/3958
  • [x] Closes #3952
  • [x] Passes isort -rc . && black . && mypy . && flake8
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3958/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
596151195 MDU6SXNzdWU1OTYxNTExOTU= 3952 Doc improvement for DataArray.assign_coords EtienneCmb 15892073 closed 0     2 2020-04-07T21:04:29Z 2020-04-10T13:17:13Z 2020-04-10T13:17:13Z CONTRIBUTOR      

Hi, first I wanted to say that xarray is a really fantastic library, it saves so many manipulations in my work.

I was looking for a way to add a coordinate to a DataArray and attribute it to a specific dimension. I found that the following syntax was exactly what I was looking for :

python da.assign_coords(new_coordinate=('dim_to_use', values))

However, the documentation of the method was not referencing this syntax. What do you think?

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

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 3042.117ms · About: xarray-datasette