home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

7 rows where user = 4414299 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

  • pull 4
  • issue 3

state 1

  • closed 7

repo 1

  • xarray 7
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
271045071 MDExOlB1bGxSZXF1ZXN0MTUwNTc3MTU1 1690 Add names for test failures maaleske 4414299 closed 0     3 2017-11-03T16:48:16Z 2020-06-13T17:53:03Z 2020-06-13T17:53:03Z CONTRIBUTOR   0 pydata/xarray/pulls/1690

This PR adds the coordinate name to the test failure printout in assert_allclose() when cycling through the coordinates . Specifying the coordinate makes test failures much easier to diagnose just based on the message.

  • [ ] Closes #xxxx
  • [x] Tests added / passed
  • [x] Passes git diff upstream/master **/*py | flake8 --diff
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1690/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
359449421 MDExOlB1bGxSZXF1ZXN0MjE0OTM2NzI3 2413 Allow passing of positional arguments in `apply` for Groupby objects maaleske 4414299 closed 0     8 2018-09-12T12:06:13Z 2018-12-24T17:50:29Z 2018-12-24T17:50:20Z CONTRIBUTOR   0 pydata/xarray/pulls/2413
  • [x] Closes #2412
  • [x] Tests added (for all bug fixes or enhancements)
  • [x] Tests passed (for all non-documentation changes)
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2413/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
359446339 MDU6SXNzdWUzNTk0NDYzMzk= 2412 Inconsistent signature of `apply` maaleske 4414299 closed 0     0 2018-09-12T11:57:06Z 2018-12-24T17:50:20Z 2018-12-24T17:50:20Z CONTRIBUTOR      

Dataset.apply allows passing positional arguments to func as args=(), whereas DataArrayGroupBy.apply and DatasetGroupBy.apply do not. The documentation also incorrectly suggests that the reverse is true:

Dataset.apply: https://github.com/pydata/xarray/blob/4de8dbc3b1de461c0c9d3b002e55d60b46d2e6d2/xarray/core/dataset.py#L2832-L2840

DataArrayGroupBy.apply: https://github.com/pydata/xarray/blob/4de8dbc3b1de461c0c9d3b002e55d60b46d2e6d2/xarray/core/groupby.py#L473-L478

DatasetGroupBy.apply: https://github.com/pydata/xarray/blob/4de8dbc3b1de461c0c9d3b002e55d60b46d2e6d2/xarray/core/groupby.py#L580-L585

I feel that funcs passed to GroupBy objects are generally equally deserving of positional arguments, and I don't see a reason why this isn't the case.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2412/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
259057144 MDU6SXNzdWUyNTkwNTcxNDQ= 1582 Rasterio tags are not accessible through open_rasterio maaleske 4414299 closed 0     5 2017-09-20T06:48:18Z 2018-03-16T18:48:46Z 2017-12-12T14:38:53Z CONTRIBUTOR      

The problem

When opening an ENVI file directly using rasterio, (some) metadata from the header file is available through tags(): python import rasterio src = rasterio.open(file) src.tags() # dict of metadata for the whole array src.tags(1) # same for band 1 Opening the same file through open_rasterio, the metadata is not carried through to the returned DataArray, neither as attributes nor as coordinates (which is the use case I'm interested in, since the metadata usually contains corresponding wavelengths for the bands).

Solutions?

I don't know what kind of data tags() might contain in general. For my use case, parsing the tags for each band as coordinates is necessary at some point. It might be better generally if the tags are stored as an attribute and munged afterwards, but this is complicated by the fact that there's tags for the whole file as well as for separate bands.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1582/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
271000579 MDU6SXNzdWUyNzEwMDA1Nzk= 1686 Incorrect y-coordinates for non-georeferenced data from open_rasterio maaleske 4414299 closed 0     8 2017-11-03T14:39:21Z 2018-01-26T13:50:54Z 2018-01-26T13:50:54Z CONTRIBUTOR      

For a non-georeferenced dataset, open_rasterio() results in y-coordinates from the raster height to two times the height, instead of the expected 0 .. height range:

```python import numpy as np import rasterio from xarray import open_rasterio

tmp_file = 'no_transform.tif' nx, ny, nz = 4, 3, 3 data = np.arange(nxnynz, dtype=rasterio.float32).reshape(nz, ny, nx) with rasterio.open( tmp_file, 'w', driver='GTiff', height=ny, width=nx, count=nz, dtype=rasterio.float32) as s: s.write(data)

open_rasterio(tmp_file) ```

<xarray.DataArray (band: 3, y: 3, x: 4)>
array( ... )
Coordinates:
  * band     (band) int64 1 2 3
  * y        (y) float64 3.5 4.5 5.5
  * x        (x) float64 0.5 1.5 2.5 3.5
Attributes:
     res:        (1.0, -1.0)
     is_tiled:   0
     transform:  (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)

Passing transform=from_origin(0,3,1,1) (from rasterio.transforms) to rasterio.open() in the above code seems to give the expected result with y running down from 2.5:

<xarray.DataArray (band: 3, y: 3, x: 4)>
array( ... )
Coordinates:
  * band     (band) int64 1 2 3
  * y        (y) float64 2.5 1.5 0.5
  * x        (x) float64 0.5 1.5 2.5 3.5
Attributes:
    res:        (1.0, 1.0)
    is_tiled:   0
    transform:  (0.0, 1.0, 0.0, 3.0, 0.0, -1.0)

I'm not sure whether there's something amiss in the xarray coordinate calculations or the rasterio default transform logic. Looking at the code, I feel like there's some mismatch between the rasterio res property logic and the xarray coordinate generation (namely, the sign of res[1]):

https://github.com/mapbox/rasterio/blob/fcd361c49cca9c4ad32a2ac1f5d66b967f4b6cd4/rasterio/_base.pyx#L611-L619

https://github.com/pydata/xarray/blob/f83361c76b6aa8cdba8923080bb6b98560cf3a96/xarray/backends/rasterio_.py#L131-L139

I'm not quite sure if the xarray code is quite correct for georefenced data, since it doesn't utilize the given coordinate transform. I don't' have files to test it with though.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1686/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
259058863 MDExOlB1bGxSZXF1ZXN0MTQyMDIzMjIx 1583 Parsing wavelength info from rasterio tags maaleske 4414299 closed 0     4 2017-09-20T06:57:16Z 2017-12-12T14:38:59Z 2017-12-12T14:38:53Z CONTRIBUTOR   0 pydata/xarray/pulls/1583

Proof of concept for reading info from rasterio tags() in open_rasterio. Not quite a solution to #1582, but possibly workable to a more general solution.

Currently implements the following: - Reads tags(band_idx) for each band and extracts the wavelength values from the result dictionaries as a coordinate for the returned DataArray. - Reads the wavelength_units from tags(1) and sets it as an attribute (assumes it's the same for each band, which it is for ENVI format files)

  • [x] Closes #1582 (Maybe?)
  • [x] Tests added / passed
  • [x] Passes git diff upstream/master | flake8 --diff
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1583/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
271017521 MDExOlB1bGxSZXF1ZXN0MTUwNTU2NjI4 1687 Remove netCDF dependency from rasterio backend tests maaleske 4414299 closed 0     7 2017-11-03T15:26:44Z 2017-11-05T22:09:02Z 2017-11-05T19:42:33Z CONTRIBUTOR   0 pydata/xarray/pulls/1687

The rasterio backend tests each currently have a netcdf roundtrip test without the appropriate requires_scipy_or_netCDF4 decorator, which causes them to always fail when ran without either. They also do not seem to be necessary for testing the rasterio backend functionality, and just add an extra dependency to the tests. The netCDF roundtrip also seems to be already better tested by the other tests in the same file.

  • [x] Tests added / passed
  • [x] Passes git diff upstream/master **/*py | flake8 --diff
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1687/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

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 87.297ms · About: xarray-datasette