home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where "updated_at" is on date 2020-10-24 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)

issue 6

  • datasette.urls.static_plugins(...) method 2
  • Plugin hook for loading templates 2
  • Plugin documentation should cover how to bundle static/templates in setup.py 1
  • /db/table/-/blob/pk/column.blob download URL 1
  • Document that datasette.render_template(template, ...) also accepts a list of templates 1
  • Link to blob downloads in the right places 1

user 3

  • simonw 6
  • psychemedia 1
  • codecov[bot] 1

author_association 3

  • OWNER 6
  • CONTRIBUTOR 1
  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
713920562 https://github.com/simonw/datasette/pull/1040#issuecomment-713920562 https://api.github.com/repos/simonw/datasette/issues/1040 MDEyOklzc3VlQ29tbWVudDcxMzkyMDU2Mg== codecov[bot] 22429695 2020-10-21T22:44:12Z 2020-10-24T23:08:14Z NONE

Codecov Report

Merging #1040 into main will increase coverage by 0.10%. The diff coverage is 100.00%.

```diff @@ Coverage Diff @@

main #1040 +/-

========================================== + Coverage 84.65% 84.76% +0.10%
========================================== Files 28 28
Lines 3924 3938 +14
========================================== + Hits 3322 3338 +16
+ Misses 602 600 -2
```

| Impacted Files | Coverage Δ | | |---|---|---| | datasette/views/index.py | 98.18% <ø> (+1.69%) | :arrow_up: | | datasette/views/special.py | 92.70% <ø> (-0.82%) | :arrow_down: | | datasette/app.py | 96.37% <100.00%> (+0.17%) | :arrow_up: | | datasette/views/base.py | 93.77% <100.00%> (ø) | | | datasette/views/table.py | 96.07% <100.00%> (+0.22%) | :arrow_up: |


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 bf82b3d...4f3165f. Read the comment docs.

{
    "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  
716066342 https://github.com/simonw/datasette/issues/1046#issuecomment-716066342 https://api.github.com/repos/simonw/datasette/issues/1046 MDEyOklzc3VlQ29tbWVudDcxNjA2NjM0Mg== simonw 9599 2020-10-24T23:02:07Z 2020-10-24T23:02:25Z OWNER

A download icon would be nice for the links in the table display. I like this one https://primer.style/octicons/download-24

svg <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"> <path d="M4.97 11.03a.75.75 0 111.06-1.06L11 14.94V2.75a.75.75 0 011.5 0v12.19l4.97-4.97a.75.75 0 111.06 1.06l-6.25 6.25a.75.75 0 01-1.06 0l-6.25-6.25zm-.22 9.47a.75.75 0 000 1.5h14.5a.75.75 0 000-1.5H4.75z"></path> </svg>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Link to blob downloads in the right places 728895193  
716066000 https://github.com/simonw/datasette/issues/1033#issuecomment-716066000 https://api.github.com/repos/simonw/datasette/issues/1033 MDEyOklzc3VlQ29tbWVudDcxNjA2NjAwMA== psychemedia 82988 2020-10-24T22:58:33Z 2020-10-24T22:58:33Z CONTRIBUTOR

From the docs, I note:

datasette.urls.instance() Returns the URL to the Datasette instance root page. This is usually "/"

What about the proxy case? Eg if I am using jupyter-server-proxy on a MyBinder or local Jupyter notebook server site, https://example.com:PORT/weirdpath/datasette, what does datasette.urls.instance() refer to?

  • [ ] https://example.com:PORT/weirdpath/datasette
  • [ ] https://example.com:PORT/weirdpath/
  • [ ] https://example.com:PORT/
  • [ ] https://example.com
  • [ ] something else?
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
datasette.urls.static_plugins(...) method 725099777  
716048564 https://github.com/simonw/datasette/issues/1033#issuecomment-716048564 https://api.github.com/repos/simonw/datasette/issues/1033 MDEyOklzc3VlQ29tbWVudDcxNjA0ODU2NA== simonw 9599 2020-10-24T20:08:31Z 2020-10-24T20:08:31Z OWNER

Documentation here: https://docs.datasette.io/en/latest/internals.html#datasette-urls

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
datasette.urls.static_plugins(...) method 725099777  
716048199 https://github.com/simonw/datasette/issues/575#issuecomment-716048199 https://api.github.com/repos/simonw/datasette/issues/575 MDEyOklzc3VlQ29tbWVudDcxNjA0ODE5OQ== simonw 9599 2020-10-24T20:05:44Z 2020-10-24T20:05:44Z OWNER

https://docs.datasette.io/en/latest/writing_plugins.html#static-assets

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin documentation should cover how to bundle static/templates in setup.py 497162288  
715643763 https://github.com/simonw/datasette/issues/1042#issuecomment-715643763 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTY0Mzc2Mw== simonw 9599 2020-10-24T00:34:31Z 2020-10-24T00:34:52Z OWNER

I'm going to rename that to template variable from select_templates to templates_considered too.

{
    "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  
715643646 https://github.com/simonw/datasette/issues/1042#issuecomment-715643646 https://api.github.com/repos/simonw/datasette/issues/1042 MDEyOklzc3VlQ29tbWVudDcxNTY0MzY0Ng== simonw 9599 2020-10-24T00:33:46Z 2020-10-24T00:33:46Z OWNER

I'd like to do this all in the datasette.render_template() method to ensure it's available to plugins as well, not just core code that uses the BaseView class.

This code is the problem: https://github.com/simonw/datasette/blob/d3e9b0aecb6f8e9b2befd9c654ccb7ce852db3e7/datasette/views/base.py#L114-L133

I think I'll fix this by moving the select_templates mechanism into datasette.render_templates().

{
    "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  
715641183 https://github.com/simonw/datasette/issues/1045#issuecomment-715641183 https://api.github.com/repos/simonw/datasette/issues/1045 MDEyOklzc3VlQ29tbWVudDcxNTY0MTE4Mw== simonw 9599 2020-10-24T00:19:29Z 2020-10-24T00:19:29Z OWNER

It turns out it already does that:

https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L710-L720

But the documentation doesn't reflect that:

template - string

The template file to be rendered, e.g. my_plugin.html. Datasette will search for this file first in the --template-dir= location, if it was specified - then in the plugin's bundled templates and finally in Datasette's set of default templates.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document that datasette.render_template(template, ...) also accepts a list of templates 728600048  

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