home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

3 rows where comments = 7, type = "pull" and user = 14371165 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)

type 1

  • pull · 3 ✖

state 1

  • closed 3

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
996352280 PR_kwDOAMm_X84rv1Fo 5794 Single matplotlib import Illviljan 14371165 closed 0     7 2021-09-14T19:15:12Z 2022-08-12T09:06:30Z 2021-10-24T09:54:28Z MEMBER   0 pydata/xarray/pulls/5794

Reduce number of imports inside functions. I think it helps making the code easier to read as well, as now you know that plt is always available.

  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

Seems to not be a major difference in initial imports from (my small sample of) repeated tests:

This branch: ```python %timeit -n1 -r1 import xarray

3.81 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.83 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.87 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.7 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.77 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.91 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.8 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

np.mean([3.81, 3.83, 3.87, 3.7, 3.77, 3.91, 3.8]) Out[3]: 3.812857142857143 ```

Main: ```python %timeit -n1 -r1 import xarray

3.93 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.69 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.64 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.76 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.79 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.81 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each) 3.68 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

np.mean([3.93, 3.69, 3.64, 3.76, 3.79, 3.81, 3.68]) Out[4]: 3.7571428571428567 ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5794/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
972720354 MDExOlB1bGxSZXF1ZXN0NzE0Mjc0ODcw 5710 Fix errors in test_latex_name_isnt_split for min environments Illviljan 14371165 closed 0     7 2021-08-17T13:57:44Z 2021-08-18T03:02:25Z 2021-08-18T02:34:05Z MEMBER   0 pydata/xarray/pulls/5710

There's some error in the minimum environments (for example ubuntu-latest py37-bare-minimum) introduced in #5682 but was hidden in all other errors because of #5654: =========================== short test summary info ============================ ERROR xarray/tests/test_plot.py::test_latex_name_isnt_split - NameError: name... = 7908 passed, 4163 skipped, 202 xfailed, 42 xpassed, 89 warnings, 1 error in 279.31s (0:04:39) =

But when looking further in the details it mentions a completely different function crashing because matplotlib isn't installed, which is true but the function doesn't test any mpl-specific things. ``` ==================================== ERRORS ==================================== ___ ERROR at teardown of test_latex_name_isnt_split ____ [gw0] linux -- Python 3.7.10 /usr/share/miniconda/envs/xarray-tests/bin/python

@pytest.fixture(scope="function", autouse=True)
def test_all_figures_closed():
    """meta-test to ensure all figures are closed at the end of a test

    Notes:  Scope is kept to module (only invoke this function once per test
    module) else tests cannot be run in parallel (locally). Disadvantage: only
    catches one open figure per run. May still give a false positive if tests
    are run in parallel.
    """
    yield None
  open_figs = len(plt.get_fignums())

E NameError: name 'plt' is not defined

/home/runner/work/xarray/xarray/xarray/tests/test_plot.py:72: NameError ``` Might be something that pytest runs on every function. Not sure if there's a clean way of turning it off, but requiring matplotlib to be installed works of course.

  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5710/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
925664972 MDExOlB1bGxSZXF1ZXN0Njc0MDg1Mjk3 5502 Use integer type hints in chunk functions Illviljan 14371165 closed 0     7 2021-06-20T19:18:58Z 2021-07-02T16:07:43Z 2021-06-21T07:10:32Z MEMBER   0 pydata/xarray/pulls/5502

Attempt to fix errors found in #5365. I've changed it to integers because when does it ever make sense to input 1.5 or a complex number? It will always be forced to integers anyway: https://github.com/dask/dask/blob/8aea537d925b794a94f828d35211a5da05ad9dce/dask/array/core.py#L2815

Integers don't work with Numbers: xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item]

Floats don't work with Numbers: xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type "Hashable": "int"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type "Hashable": "float"; expected "Hashable": "Union[None, Number, str, Tuple[Number, ...]]" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type "Hashable": "float"; expected "Hashable": "Union[None, Number, Tuple[Number, ...]]" [dict-item] This workaround seems related to: https://github.com/python/mypy/issues/3186

  • [ ] Closes #xxxx
  • [ ] Tests added
  • [ ] Passes pre-commit run --all-files
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5502/reactions",
    "total_count": 1,
    "+1": 1,
    "-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 34.166ms · About: xarray-datasette