home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 1412019155 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • headtr1ck 7
  • dcherian 3
  • max-sixty 2
  • hmaarrfk 1

author_association 3

  • COLLABORATOR 7
  • MEMBER 5
  • CONTRIBUTOR 1

issue 1

  • Lazy Imports · 13 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1317819272 https://github.com/pydata/xarray/pull/7179#issuecomment-1317819272 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85OjFOI dcherian 2448579 2022-11-16T23:32:21Z 2022-11-16T23:32:21Z MEMBER

Turns out it is a pyodide bug with how they hook in to importlib

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1317646082 https://github.com/pydata/xarray/pull/7179#issuecomment-1317646082 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85Oia8C headtr1ck 43316012 2022-11-16T20:44:36Z 2022-11-16T20:46:15Z COLLABORATOR

I don't think this is a bug in importlib but rather pyodide. They seem to add a hook to importlib (which is allowed, but probably causing this issue?)

Edit: The error message from pyodide seems more like this is intentional? Is scipy really installed correctly?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1317583451 https://github.com/pydata/xarray/pull/7179#issuecomment-1317583451 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85OiLpb dcherian 2448579 2022-11-16T19:49:22Z 2022-11-16T19:50:02Z MEMBER

FYI I'm getting this error when trying to update the version in pyodide: https://app.circleci.com/pipelines/github/pyodide/pyodide/5016/workflows/e2cc0865-a91d-4cdb-8dbc-dfaeeb522c5f/jobs/60731

```python JavascriptException message: Traceback (most recent call last): File "/lib/python3.10/asyncio/futures.py", line 201, in result raise self.exception File "/lib/python3.10/asyncio/tasks.py", line 232, in __step result = coro.send(None) File "/lib/python3.10/_pyodide/_base.py", line 531, in eval_code_async await CodeRunner( File "/lib/python3.10/_pyodide/_base.py", line 357, in run_async coroutine = eval(self.code, globals, locals) File "<exec>", line 1, in <module> File "/lib/python3.10/site-packages/xarray/__init__.py", line 1, in <module> from . import testing, tutorial File "/lib/python3.10/site-packages/xarray/tutorial.py", line 17, in <module> from .backends.api import open_dataset as _open_dataset File "/lib/python3.10/site-packages/xarray/backends/__init__.py", line 16, in <module> from .scipy import ScipyBackendEntrypoint, ScipyDataStore File "/lib/python3.10/site-packages/xarray/backends/scipy_.py", line 239, in <module> class ScipyBackendEntrypoint(BackendEntrypoint): File "/lib/python3.10/site-packages/xarray/backends/scipy_.py", line 260, in ScipyBackendEntrypoint available = module_available("scipy") File "/lib/python3.10/site-packages/xarray/core/utils.py", line 1009, in module_available return importlib.util.find_spec(module) is not None File "/lib/python3.10/importlib/util.py", line 103, in find_spec return _find_spec(fullname, parent_path) File "/lib/python3.10/_pyodide/_importhook.py", line 226, in find_spec raise ModuleNotFoundError( ModuleNotFoundError: The module 'scipy' is included in the Pyodide distribution, but it is not installed. You can install it by calling: await micropip.install("scipy") in Python or await pyodide.loadPackage("scipy") in JavaScript. See https://pyodide.org/en/stable/usage/loading-packages.html for more details.

````

this seems like a bug in importlib

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1295257627 https://github.com/pydata/xarray/pull/7179#issuecomment-1295257627 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85NNBAb hmaarrfk 90008 2022-10-28T17:21:40Z 2022-10-28T17:21:40Z CONTRIBUTOR

Exciting improvements on usability for the next version!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1295196783 https://github.com/pydata/xarray/pull/7179#issuecomment-1295196783 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85NMyJv dcherian 2448579 2022-10-28T16:25:19Z 2022-10-28T16:25:19Z MEMBER

Thanks @headtr1ck great PR!

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1288072721 https://github.com/pydata/xarray/pull/7179#issuecomment-1288072721 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85Mxm4R headtr1ck 43316012 2022-10-23T10:02:46Z 2022-10-23T10:02:46Z COLLABORATOR

It seems that cfgrib has its own xarray_plugin now. Should the internal version be deprecated?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1287920868 https://github.com/pydata/xarray/pull/7179#issuecomment-1287920868 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MxBzk headtr1ck 43316012 2022-10-22T21:10:53Z 2022-10-22T21:10:53Z COLLABORATOR

I managed to get dask.array lazy as well, but dask.utils is still imported by backends.locks.

Someone else has to tackle this, I am not too familiar with this...

This got the import time quite low. I am happy with this now :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1287814936 https://github.com/pydata/xarray/pull/7179#issuecomment-1287814936 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85Mwn8Y headtr1ck 43316012 2022-10-22T14:47:16Z 2022-10-22T21:09:25Z COLLABORATOR

Seems like it is but a good idea to mess with sys.modules in pytest. Anyone got an idea how to solve that?

Edit: solved :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1287807063 https://github.com/pydata/xarray/pull/7179#issuecomment-1287807063 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MwmBX headtr1ck 43316012 2022-10-22T14:15:48Z 2022-10-22T14:17:19Z COLLABORATOR

Now I have made every module lazy that is not too much work, this includes: matplotlib, flox and all backends.

The only remaining large import is dask.array, here I have to check if that is possible to make lazy? This alone is 500ms import time, since it also imports numba, scipy and sparse... Maybe we could even open a ticket at dask about this topic as well?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1283016719 https://github.com/pydata/xarray/pull/7179#issuecomment-1283016719 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MeUgP headtr1ck 43316012 2022-10-18T21:18:14Z 2022-10-18T21:18:14Z COLLABORATOR

The simplest solution would be to add a simple unit test that checks that blacklisted packets are not in sys.modules.

For import timings we have asv, but that is not run so often.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1282995923 https://github.com/pydata/xarray/pull/7179#issuecomment-1282995923 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MePbT max-sixty 5635139 2022-10-18T20:58:04Z 2022-10-18T20:58:04Z MEMBER

Do you think there's a risk something gets added back by mistake?

A galaxy brain idea is to have a lint in pre-commit which looks for ^import (foo|bar) for the libraries we should be lazy loading. Not fool proof. Or something to measure import time so we can see if it rises again.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1282951823 https://github.com/pydata/xarray/pull/7179#issuecomment-1282951823 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MeEqP headtr1ck 43316012 2022-10-18T20:16:18Z 2022-10-18T20:16:18Z COLLABORATOR

Not as much of an improvement as I thought, but shaving off another 20ms.

I can see if I can bring it down even further...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1281527397 https://github.com/pydata/xarray/pull/7179#issuecomment-1281527397 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MYo5l max-sixty 5635139 2022-10-17T21:36:58Z 2022-10-17T21:36:58Z MEMBER

Very nice @headtr1ck !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155

Advanced export

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

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 13.751ms · About: xarray-datasette