home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where user = 198999 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

state 2

  • closed 1
  • open 1

type 1

  • issue 2

repo 1

  • xarray 2
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
902031342 MDU6SXNzdWU5MDIwMzEzNDI= 5377 xr.tutorial.open_dataset should work even with locally preloaded cache. mcepl 198999 open 0     3 2021-05-26T08:51:02Z 2021-05-26T16:04:04Z   NONE      

What happened: When packaging for a Linux distribution (openSUSE in my case) there is no network access to the build machines for obvious reasons. Therefore we are very happy to preloaded cache and xr.tutorial.open_dataset() function. Unfortunately, with 0.18.2 (not sure about the previous versions) it doesn’t work, because pooch.retrieve() without fname parameter (even when known_hash is None) generates unique name for the data file, which is not available, therefore it fails.

With the data directory expanded to ~/.cache/xarray_tutorial_data call of xr.tutorial.open_dataset('air_temperature') should return the appropriate data even without the network access.

This patch fixes that. When the datafile could be found in the local cache, pooch.retrieve is called with fname parameter.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5377/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 issue
901856178 MDU6SXNzdWU5MDE4NTYxNzg= 5375 Tests TestDataset.test_resample_loffset and test_interpolate_1d[1-x-linear] fail on i586 mcepl 198999 closed 0     5 2021-05-26T06:56:09Z 2021-05-26T13:46:34Z 2021-05-26T07:03:23Z NONE      

What happened: When running the test suite while packaging the package for openSUSE I’ve got these failed tests on i586: [ 107s] ______________________ TestDataset.test_resample_loffset _______________________ [ 107s] [gw4] linux -- Python 3.9.5 /usr/bin/python3.9 [ 107s] [ 107s] self = <xarray.tests.test_dataset.TestDataset object at 0xf01f3ec8> [ 107s] [ 107s] def test_resample_loffset(self): [ 107s] times = pd.date_range("2000-01-01", freq="6H", periods=10) [ 107s] ds = Dataset( [ 107s] { [ 107s] "foo": (["time", "x", "y"], np.random.randn(10, 5, 3)), [ 107s] "bar": ("time", np.random.randn(10), {"meta": "data"}), [ 107s] "time": times, [ 107s] } [ 107s] ) [ 107s] ds.attrs["dsmeta"] = "dsdata" [ 107s] [ 107s] # Our use of `loffset` may change if we align our API with pandas' changes. [ 107s] # ref https://github.com/pydata/xarray/pull/4537 [ 107s] actual = ds.resample(time="24H", loffset="-12H").mean().bar [ 107s] expected_ = ds.bar.to_series().resample("24H").mean() [ 107s] expected_.index += to_offset("-12H") [ 107s] expected = DataArray.from_series(expected_) [ 107s] > assert_identical(actual, expected) [ 107s] E AssertionError: Left and right DataArray objects are not identical [ 107s] E [ 107s] E Differing values: [ 107s] E L [ 107s] E array([ 0.018477, -0.178807, -0.792644]) [ 107s] E R [ 107s] E array([ 0.018477, -0.178807, -0.792644]) [ 107s] [ 107s] /home/abuild/rpmbuild/BUILD/xarray-0.18.2/xarray/tests/test_dataset.py:3991: AssertionError [ 107s] _______________________ test_interpolate_1d[1-x-linear] ________________________ [ 107s] [gw2] linux -- Python 3.9.5 /usr/bin/python3.9 [ 107s] [ 107s] method = 'linear', dim = 'x', case = 1 [ 107s] [ 107s] @pytest.mark.parametrize("method", ["linear", "cubic"]) [ 107s] @pytest.mark.parametrize("dim", ["x", "y"]) [ 107s] @pytest.mark.parametrize("case", [0, 1]) [ 107s] def test_interpolate_1d(method, dim, case): [ 107s] if not has_scipy: [ 107s] pytest.skip("scipy is not installed.") [ 107s] [ 107s] if not has_dask and case in [1]: [ 107s] pytest.skip("dask is not installed in the environment.") [ 107s] [ 107s] da = get_example_data(case) [ 107s] xdest = np.linspace(0.0, 0.9, 80) [ 107s] actual = da.interp(method=method, **{dim: xdest}) [ 107s] [ 107s] # scipy interpolation for the reference [ 107s] def func(obj, new_x): [ 107s] return scipy.interpolate.interp1d( [ 107s] da[dim], [ 107s] obj.data, [ 107s] axis=obj.get_axis_num(dim), [ 107s] bounds_error=False, [ 107s] fill_value=np.nan, [ 107s] kind=method, [ 107s] )(new_x) [ 107s] [ 107s] if dim == "x": [ 107s] > coords = {"x": xdest, "y": da["y"], "x2": ("x", func(da["x2"], xdest))} [ 107s] [ 107s] /home/abuild/rpmbuild/BUILD/xarray-0.18.2/xarray/tests/test_interp.py:89: [ 107s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 107s] [ 107s] obj = <xarray.DataArray 'x2' (x: 100)> [ 107s] dask.array<xarray-x2, shape=(100,), dtype=float64, chunksize=(100,), chunktype=numpy.....0101 0.0202 0.0303 ... 0.9697 0.9798 0.9899 1.0 [ 107s] x2 (x) float64 dask.array<chunksize=(100,), meta=np.ndarray> [ 107s] new_x = array([0. , 0.01139241, 0.02278481, 0.03417722, 0.04556962, [ 107s] 0.05696203, 0.06835443, 0.07974684, 0.091139...35, 0.80886076, 0.82025316, 0.83164557, 0.84303797, [ 107s] 0.85443038, 0.86582278, 0.87721519, 0.88860759, 0.9 ]) [ 107s] [ 107s] def func(obj, new_x): [ 107s] > return scipy.interpolate.interp1d( [ 107s] da[dim], [ 107s] obj.data, [ 107s] axis=obj.get_axis_num(dim), [ 107s] bounds_error=False, [ 107s] fill_value=np.nan, [ 107s] kind=method, [ 107s] )(new_x) [ 107s] E AttributeError: module 'scipy' has no attribute 'interpolate' [ 107s] [ 107s] /home/abuild/rpmbuild/BUILD/xarray-0.18.2/xarray/tests/test_interp.py:79: AttributeError This is the build log showing all used packages and steps leading to the failures.

Anything else we need to know?: The first failure is easily fixed by scipy-interpolate.patch

Environment: see the above linked log

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5375/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 156.531ms · About: xarray-datasette