home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where "created_at" is on date 2021-06-07 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 6

  • Add some types, enforce with mypy 2
  • Get rid of this `restore_working_directory` hack entirely 2
  • pathlib.Path breaks internal schema 1
  • Navigation menu display bug 1
  • DRAFT: A new plugin hook for dynamic metadata 1
  • Don't show foreign key IDs twice if no label 1

user 2

  • simonw 7
  • brandonrobertz 1

author_association 2

  • OWNER 7
  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
856182547 https://github.com/simonw/datasette/pull/1368#issuecomment-856182547 https://api.github.com/repos/simonw/datasette/issues/1368 MDEyOklzc3VlQ29tbWVudDg1NjE4MjU0Nw== brandonrobertz 2670795 2021-06-07T18:59:47Z 2021-06-07T23:04:25Z CONTRIBUTOR

Note that if we went with a "update_metadata" hook, the hook signature would look something like this (it would return nothing):

update_metadata( datasette=self, metadata=metadata, key=key, database=database, table=table, fallback=fallback )

The Datasette function _metadata_recursive_update(self, orig, updated) would disappear into the plugins. Doing this, though, we'd lose the easy ability to make the local metadata.yaml immutable (since we'd no longer have the recursive update).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
DRAFT: A new plugin hook for dynamic metadata 913865304  
856231119 https://github.com/simonw/sqlite-utils/issues/266#issuecomment-856231119 https://api.github.com/repos/simonw/sqlite-utils/issues/266 MDEyOklzc3VlQ29tbWVudDg1NjIzMTExOQ== simonw 9599 2021-06-07T20:26:05Z 2021-06-07T20:26:05Z OWNER

https://github.com/python/cpython/blob/2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6/Lib/typing.py#L2173-L2195

In Python 3.6 or higher can do this:

python class Employee(NamedTuple): name: str id: int

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add some types, enforce with mypy 913135723  
856212136 https://github.com/simonw/datasette/issues/1365#issuecomment-856212136 https://api.github.com/repos/simonw/datasette/issues/1365 MDEyOklzc3VlQ29tbWVudDg1NjIxMjEzNg== simonw 9599 2021-06-07T19:54:04Z 2021-06-07T19:54:04Z OWNER

I've hit this one too. I agree, fixing this in Datasette itself is better than fixing it in the tests across multiple other projects.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
pathlib.Path breaks internal schema 913017577  
856208637 https://github.com/simonw/datasette/issues/1369#issuecomment-856208637 https://api.github.com/repos/simonw/datasette/issues/1369 MDEyOklzc3VlQ29tbWVudDg1NjIwODYzNw== simonw 9599 2021-06-07T19:47:23Z 2021-06-07T19:47:23Z OWNER

No point in showing the IDs twice if the blue label doesn't differ from the gray ID

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Don't show foreign key IDs twice if no label 913900374  
856160770 https://github.com/simonw/datasette/issues/1367#issuecomment-856160770 https://api.github.com/repos/simonw/datasette/issues/1367 MDEyOklzc3VlQ29tbWVudDg1NjE2MDc3MA== simonw 9599 2021-06-07T18:22:33Z 2021-06-07T18:22:33Z OWNER

Here's why: https://github.com/simonw/datasette/blob/03ec71193b9545536898a4bc7493274fec48bdd7/datasette/static/app.css#L455-L458

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Navigation menu display bug 913823889  
856147969 https://github.com/simonw/datasette/issues/1366#issuecomment-856147969 https://api.github.com/repos/simonw/datasette/issues/1366 MDEyOklzc3VlQ29tbWVudDg1NjE0Nzk2OQ== simonw 9599 2021-06-07T18:03:03Z 2021-06-07T18:03:03Z OWNER

Here's an example of a test that uses it. It's necessary because sometimes fixtures that create temporary directories break in unexpected ways:

https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/tests/test_plugins.py#L658-L666

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get rid of this `restore_working_directory` hack entirely 913809802  
856147450 https://github.com/simonw/datasette/issues/1366#issuecomment-856147450 https://api.github.com/repos/simonw/datasette/issues/1366 MDEyOklzc3VlQ29tbWVudDg1NjE0NzQ1MA== simonw 9599 2021-06-07T18:02:13Z 2021-06-07T18:02:13Z OWNER

The hack in question is this fixture, which I've been using in an ad-hoc manner to work around errors while running the tests: https://github.com/simonw/datasette/blob/030deb4b25cda842ff7129ab7c18550c44dd8379/tests/conftest.py#L62-L75

I don't understand the underlying issue well enough to know how to get rid of it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get rid of this `restore_working_directory` hack entirely 913809802  
855611939 https://github.com/simonw/sqlite-utils/issues/266#issuecomment-855611939 https://api.github.com/repos/simonw/sqlite-utils/issues/266 MDEyOklzc3VlQ29tbWVudDg1NTYxMTkzOQ== simonw 9599 2021-06-07T06:07:41Z 2021-06-07T06:07:41Z OWNER

Looks like this is the way to do this: python Point = typing.NamedTuple( "Point", [('x', int), ('y', int)] )

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add some types, enforce with mypy 913135723  

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 516.957ms · About: github-to-sqlite