home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where "created_at" is on date 2021-06-25 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • simonw 4
  • codecov[bot] 1

issue 2

  • Test against Python 3.10-dev 3
  • Experiment with type hints 2

author_association 2

  • OWNER 4
  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
868881190 https://github.com/simonw/sqlite-utils/issues/37#issuecomment-868881190 https://api.github.com/repos/simonw/sqlite-utils/issues/37 MDEyOklzc3VlQ29tbWVudDg2ODg4MTE5MA== simonw 9599 2021-06-25T23:24:28Z 2021-06-25T23:24:28Z OWNER

Maybe I could release a separate Python package types-sqlite-utils-numpy which adds an over-ridden type definition that includes the numpy types?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Experiment with type hints 465815372  
868881033 https://github.com/simonw/sqlite-utils/issues/37#issuecomment-868881033 https://api.github.com/repos/simonw/sqlite-utils/issues/37 MDEyOklzc3VlQ29tbWVudDg2ODg4MTAzMw== simonw 9599 2021-06-25T23:23:49Z 2021-06-25T23:23:49Z OWNER

Twitter conversation about how to add types to the .create_table(columns=) parameter: https://twitter.com/simonw/status/1408532867592818693

Anyone know how to write a mypy type definition for this?

{"id": int, "name": str, "image": bytes, "weight": float}

It's a dict where keys are strings and values are one of int/str/bytes/float (weird API design I know, but I designed this long before I was thinking about mypy)

Looks like this could work:

python def create_table( self, name, columns: Dict[str, Union[Type[int], Type[bytes], Type[str], Type[float]]], pk=None, foreign_keys=None, column_order=None, not_null=None, defaults=None, hash_id=None, extracts=None, ): Except... that method can optionally also accept numpy types if numpy is installed. I don't know if it's possible to dynamically change a signature based on an import, since mypy is a static type analyzer and doesn't ever execute the code.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Experiment with type hints 465815372  
868728092 https://github.com/simonw/sqlite-utils/pull/293#issuecomment-868728092 https://api.github.com/repos/simonw/sqlite-utils/issues/293 MDEyOklzc3VlQ29tbWVudDg2ODcyODA5Mg== simonw 9599 2021-06-25T17:39:35Z 2021-06-25T17:39:35Z OWNER

Here's more about this problem: https://github.com/numpy/numpy/issues/15947

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Test against Python 3.10-dev 929748885  
868134040 https://github.com/simonw/sqlite-utils/pull/293#issuecomment-868134040 https://api.github.com/repos/simonw/sqlite-utils/issues/293 MDEyOklzc3VlQ29tbWVudDg2ODEzNDA0MA== simonw 9599 2021-06-25T01:49:44Z 2021-06-25T01:50:33Z OWNER

Test failed on 3.10 with numpy on macOS: sqlite_utils/__init__.py:1: in <module> 11 from .db import Database 12 sqlite_utils/db.py:48: in <module> 13 import numpy as np # type: ignore 14 ../../../hostedtoolcache/Python/3.10.0-beta.3/x64/lib/python3.10/site-packages/numpy/__init__.py:391: in <module> 15 raise RuntimeError(msg) 16 E RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, more information is available at https://numpy.org/doc/stable/user/building.html#accelerated-blas-lapack-libraries Otherwise report this to the vendor that provided NumPy. 17 E RankWarning: Polyfit may be poorly conditioned 18 Error: Process completed with exit code 4.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 1
}
Test against Python 3.10-dev 929748885  
868125750 https://github.com/simonw/sqlite-utils/pull/293#issuecomment-868125750 https://api.github.com/repos/simonw/sqlite-utils/issues/293 MDEyOklzc3VlQ29tbWVudDg2ODEyNTc1MA== codecov[bot] 22429695 2021-06-25T01:42:43Z 2021-06-25T01:42:43Z NONE

Codecov Report

Merging #293 (ae0f46a) into main (747be60) will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #293 +/-

======================================= Coverage 96.03% 96.03%
======================================= Files 4 4
Lines 1994 1994
======================================= Hits 1915 1915
Misses 79 79
```


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 747be60...ae0f46a. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Test against Python 3.10-dev 929748885  

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,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
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 558.057ms · About: github-to-sqlite