home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

20 rows where "updated_at" is on date 2020-10-23 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, updated_at (date)

issue 6

  • Plugin hook for loading templates 12
  • Include LICENSE in sdist 3
  • Add minimum supported python 2
  • Extract the hash-URL mechanism out into a plugin 1
  • For 1.0 update trove classifier in setup.py 1
  • /db/table/-/blob/pk/column.blob download URL 1

user 3

  • simonw 17
  • codecov[bot] 2
  • bollwyvl 1

author_association 3

  • OWNER 17
  • NONE 2
  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
715618333 https://github.com/simonw/datasette/issues/1042#issuecomment-715618333 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTYxODMzMw== simonw 9599 2020-10-23T22:33:24Z 2020-10-23T22:33:24Z OWNER

It wouldn't be a disaster if template-loading plugins were unable to hook into the /{slug1}/{slug2}.html custom page mechanism, since plugins can define their own pages already using register_routes().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715618077 https://github.com/simonw/datasette/issues/1042#issuecomment-715618077 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTYxODA3Nw== simonw 9599 2020-10-23T22:32:24Z 2020-10-23T22:32:24Z OWNER

Another option: the first version of the plugin hook could accept only the template filename. Subsequent releases could add more arguments, since Pluggy allows new arguments to be added without breaking backwards compatibility.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715617830 https://github.com/simonw/datasette/issues/1042#issuecomment-715617830 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTYxNzgzMA== simonw 9599 2020-10-23T22:31:26Z 2020-10-23T22:31:26Z OWNER

So maybe this should be a register_template_loader mechanism that returns a Jinja loader after all? That would mean that only the template filename could be used as the input to the plugin, which doesn't seem as useful as emulating the extra_template_vars() interface.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715617405 https://github.com/simonw/datasette/issues/1042#issuecomment-715617405 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTYxNzQwNQ== simonw 9599 2020-10-23T22:29:53Z 2020-10-23T22:29:53Z OWNER

Also consider that DatasetteRouter uses .list_templates() to gather together {slug}.html style templates for the custom page templates mechanism: https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L949-L967

For that to work with the new plugin hook, custom template providing plugins will need a way to provide a list of templates that they know about.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715616757 https://github.com/simonw/datasette/issues/1042#issuecomment-715616757 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTYxNjc1Nw== simonw 9599 2020-10-23T22:27:28Z 2020-10-23T22:27:28Z OWNER

Almost all of the core template loading happens in the BaseView.render method: https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/views/base.py#L114-L133

The one exception is the 404 handling code here: https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L1034-L1042

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715614971 https://github.com/simonw/datasette/issues/1042#issuecomment-715614971 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTYxNDk3MQ== simonw 9599 2020-10-23T22:20:14Z 2020-10-23T22:23:51Z OWNER

Alternative plugin hook idea: python @hookspec def load_template(template, database, table, columns, view_name, request, datasette): "Load the specified template, returning the template code as a string" Imitating the existing extra_template_vars family of hooks: https://docs.datasette.io/en/stable/plugin_hooks.html#extra-template-vars-template-database-table-columns-view-name-request-datasette

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715587715 https://github.com/simonw/datasette/pull/1040#issuecomment-715587715 https://api.github.com/repos/simonw/datasette/issues/1040 MDEyOklzc3VlQ29tbWVudDcxNTU4NzcxNQ== simonw 9599 2020-10-23T21:01:07Z 2020-10-23T21:03:10Z OWNER

A download icon would be nice for the links in the table display.

I like this one https://primer.style/octicons/download-24

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
/db/table/-/blob/pk/column.blob download URL 726910999  
715586711 https://github.com/simonw/datasette/pull/1043#issuecomment-715586711 https://api.github.com/repos/simonw/datasette/issues/1043 MDEyOklzc3VlQ29tbWVudDcxNTU4NjcxMQ== simonw 9599 2020-10-23T20:58:26Z 2020-10-23T20:58:26Z OWNER

I misunderstood - asgi-csrf already has an sdist.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Include LICENSE in sdist 727915394  
715585140 https://github.com/simonw/datasette/pull/1043#issuecomment-715585140 https://api.github.com/repos/simonw/datasette/issues/1043 MDEyOklzc3VlQ29tbWVudDcxNTU4NTE0MA== simonw 9599 2020-10-23T20:54:29Z 2020-10-23T20:54:29Z OWNER

Thanks. I'll push a source release of asgi-csrf.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Include LICENSE in sdist 727915394  
715584579 https://github.com/simonw/datasette/pull/1044#issuecomment-715584579 https://api.github.com/repos/simonw/datasette/issues/1044 MDEyOklzc3VlQ29tbWVudDcxNTU4NDU3OQ== simonw 9599 2020-10-23T20:53:01Z 2020-10-23T20:53:01Z OWNER

Thanks for this!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add minimum supported python 727916744  
715556545 https://github.com/simonw/datasette/issues/745#issuecomment-715556545 https://api.github.com/repos/simonw/datasette/issues/745 MDEyOklzc3VlQ29tbWVudDcxNTU1NjU0NQ== simonw 9599 2020-10-23T19:47:10Z 2020-10-23T19:47:10Z OWNER

Dupe of #647

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Extract the hash-URL mechanism out into a plugin 608613033  
715497419 https://github.com/simonw/datasette/issues/1042#issuecomment-715497419 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTQ5NzQxOQ== simonw 9599 2020-10-23T18:12:40Z 2020-10-23T18:12:40Z OWNER

Maybe the template loader can optionally return some extra context to pass to the template. That could be used to solve the templates considered comment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715496859 https://github.com/simonw/datasette/issues/1042#issuecomment-715496859 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTQ5Njg1OQ== simonw 9599 2020-10-23T18:11:27Z 2020-10-23T18:11:27Z OWNER

When loading a template the filename is required, but you can optionally also send a set of extra arguments which the template loader can take into consideration.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
715490532 https://github.com/simonw/datasette/issues/1042#issuecomment-715490532 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTQ5MDUzMg== simonw 9599 2020-10-23T17:57:34Z 2020-10-23T17:57:34Z OWNER

A better version of this hook would be passed the database, table and query name depending on what was being rendered.

This would require some re-thinking of how core templates are loaded, especially since I would want the templates considered comment to continue working.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
714916127 https://github.com/simonw/datasette/pull/1044#issuecomment-714916127 https://api.github.com/repos/simonw/datasette/issues/1044 MDEyOklzc3VlQ29tbWVudDcxNDkxNjEyNw== codecov[bot] 22429695 2020-10-23T05:12:52Z 2020-10-23T05:12:52Z NONE

Codecov Report

Merging #1044 into main will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #1044 +/-

======================================= Coverage 84.65% 84.65%
======================================= Files 28 28
Lines 3924 3924
======================================= Hits 3322 3322
Misses 602 602
```


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 d0cc6f4...6453ab1. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add minimum supported python 727916744  
714915025 https://github.com/simonw/datasette/pull/1043#issuecomment-714915025 https://api.github.com/repos/simonw/datasette/issues/1043 MDEyOklzc3VlQ29tbWVudDcxNDkxNTAyNQ== codecov[bot] 22429695 2020-10-23T05:09:09Z 2020-10-23T05:09:09Z NONE

Codecov Report

Merging #1043 into main will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #1043 +/-

======================================= Coverage 84.65% 84.65%
======================================= Files 28 28
Lines 3924 3924
======================================= Hits 3322 3322
Misses 602 602
```


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 d0cc6f4...dc4129c. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Include LICENSE in sdist 727915394  
714908859 https://github.com/simonw/datasette/issues/1012#issuecomment-714908859 https://api.github.com/repos/simonw/datasette/issues/1012 MDEyOklzc3VlQ29tbWVudDcxNDkwODg1OQ== bollwyvl 45380 2020-10-23T04:49:20Z 2020-10-23T04:49:20Z CONTRIBUTOR

Good luck on 1.0! It may also be worth lobbying for a Framework::Datasette::1.0 classifier. This would be a nice way to allow the ecosystem to self-document a bit more discoverably.

I was surprised to see the PR for Framework::Jupyter is a... database migration! Of course, there may be more workflow to it!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
For 1.0 update trove classifier in setup.py 718540751  
714868867 https://github.com/simonw/datasette/issues/1042#issuecomment-714868867 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNDg2ODg2Nw== simonw 9599 2020-10-23T02:31:17Z 2020-10-23T02:31:17Z OWNER

I'll build this in conjunction with a plugin that supports editing templates stored in SQLite.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
714868624 https://github.com/simonw/datasette/issues/1042#issuecomment-714868624 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNDg2ODYyNA== simonw 9599 2020-10-23T02:30:27Z 2020-10-23T02:30:37Z OWNER

Maybe register_template_loader(datasette) which returns an object which is added in at the beginning of the list passed to ChoiceLoader here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  
714868207 https://github.com/simonw/datasette/issues/1042#issuecomment-714868207 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNDg2ODIwNw== simonw 9599 2020-10-23T02:29:12Z 2020-10-23T02:29:12Z OWNER

Relevant code: https://github.com/simonw/datasette/blob/d0cc6f4c32e1f89238ddec782086b3122f445bd4/datasette/app.py#L288-L311

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin hook for loading templates 727802081  

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