home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

3 rows where "created_at" is on date 2024-03-29 and user = 14371165 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • pull 2
  • issue 1

state 2

  • closed 2
  • open 1

repo 1

  • xarray 3
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
2215113392 PR_kwDOAMm_X85rJ3wR 8889 Add typing to test_plot.py Illviljan 14371165 closed 0     0 2024-03-29T10:49:39Z 2024-04-05T16:42:27Z 2024-04-05T16:42:27Z MEMBER   0 pydata/xarray/pulls/8889

Enforce typing on all tests in test_plot.py and add the remaining type hints.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8889/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2215603817 I_kwDOAMm_X86ED25p 8892 ffill's tolerance argument can be strings Illviljan 14371165 open 0     1 2024-03-29T15:49:40Z 2024-04-02T01:50:34Z   MEMBER      

What happened?

ffill, bfill reindex etc. have tolerance arguments that also supports strings. And we test for it here:

https://github.com/pydata/xarray/blob/2120808bbe45f3d4f0b6a01cd43bac4df4039092/xarray/tests/test_groupby.py#L2016-L2025

But our typing assumes it's floats only: https://github.com/pydata/xarray/blob/2120808bbe45f3d4f0b6a01cd43bac4df4039092/xarray/core/resample.py#L69-L94

What did you expect to happen?

Since our pytests pass, mypy should pass as well.

Minimal Complete Verifiable Example

```python import numpy as np import pandas as pd

import xarray as xr

https://github.com/pydata/xarray/blob/2120808bbe45f3d4f0b6a01cd43bac4df4039092/xarray/tests/test_groupby.py#L2016

Test tolerance keyword for upsample methods bfill, pad, nearest

times = pd.date_range("2000-01-01", freq="1D", periods=2) times_upsampled = pd.date_range("2000-01-01", freq="6h", periods=5) array = xr.DataArray(np.arange(2), [("time", times)])

Forward fill

actual = array.resample(time="6h").ffill(tolerance="12h") expected = xr.DataArray([0.0, 0.0, 0.0, np.nan, 1.0], [("time", times_upsampled)]) xr.testing.assert_identical(expected, actual)

```

Environment

master

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8892/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 issue
2215324218 PR_kwDOAMm_X85rKmW7 8890 Add typing to test_groupby.py Illviljan 14371165 closed 0     1 2024-03-29T13:13:59Z 2024-03-29T16:38:17Z 2024-03-29T16:38:16Z MEMBER   0 pydata/xarray/pulls/8890

Enforce typing on all tests in test_groupby.py and add the remaining type hints.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8890/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "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 33.271ms · About: xarray-datasette