home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

20 rows where author_association = "OWNER" and "updated_at" is on date 2020-05-28 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 15

  • request.url and request.scheme should obey force_https_urls config setting 3
  • Redesign register_output_renderer callback 2
  • register_output_renderer can_render mechanism 2
  • Internals documentation for datasette.metadata() method 2
  • Automatically create a GitHub release linking to release notes for every tagged release 1
  • Ability to set default sort order for a table or view in metadata.json 1
  • Mechanism for register_output_renderer to suggest extension or not 1
  • Documentation for the "request" object 1
  • link_or_copy_directory() error - Invalid cross-device link 1
  • Ability to set custom default _size on a per-table basis 1
  • Question: Access to immutable database-path 1
  • All plugin hooks should have unit tests 1
  • Consolidate request.raw_args and request.args 1
  • Move test plugins into datasette/tests/plugins/ directory 1
  • register_output_renderer render callback should be optionally awaitable 1

user 1

  • simonw 20

author_association 1

  • OWNER · 20 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
635533807 https://github.com/simonw/datasette/issues/351#issuecomment-635533807 https://api.github.com/repos/simonw/datasette/issues/351 MDEyOklzc3VlQ29tbWVudDYzNTUzMzgwNw== simonw 9599 2020-05-28T18:56:15Z 2020-05-28T18:56:15Z OWNER

I'm not going to do this. I have a good enough solution now pasting the rendered HTML from the release notes into https://euangoddard.github.io/clipboard2markdown/ to get the Markdown.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Automatically create a GitHub release linking to release notes for every tagged release 345469355  
635532216 https://github.com/simonw/datasette/issues/508#issuecomment-635532216 https://api.github.com/repos/simonw/datasette/issues/508 MDEyOklzc3VlQ29tbWVudDYzNTUzMjIxNg== simonw 9599 2020-05-28T18:53:02Z 2020-05-28T18:53:02Z OWNER

I fixed this a while ago in #702: https://datasette.readthedocs.io/en/stable/metadata.html#setting-a-default-sort-order

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set default sort order for a table or view in metadata.json 455965174  
635530876 https://github.com/simonw/datasette/issues/774#issuecomment-635530876 https://api.github.com/repos/simonw/datasette/issues/774 MDEyOklzc3VlQ29tbWVudDYzNTUzMDg3Ng== simonw 9599 2020-05-28T18:50:18Z 2020-05-28T18:50:18Z OWNER

How about moving this functionality to the request object itself? python q = request["q"] # Raises KeyError if missing, otherwise returns first q = request.get("q", "default") # Returns first, or optional default or None facets = request.getlist("_facet")

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Consolidate request.raw_args and request.args 626078521  
635494730 https://github.com/simonw/datasette/issues/781#issuecomment-635494730 https://api.github.com/repos/simonw/datasette/issues/781 MDEyOklzc3VlQ29tbWVudDYzNTQ5NDczMA== simonw 9599 2020-05-28T17:39:54Z 2020-05-28T17:39:54Z OWNER

https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fwww.niche-museums.com%2Fbrowse%2Ffeed.atom validates now!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
request.url and request.scheme should obey force_https_urls config setting 626663119  
635480948 https://github.com/simonw/datasette/issues/780#issuecomment-635480948 https://api.github.com/repos/simonw/datasette/issues/780 MDEyOklzc3VlQ29tbWVudDYzNTQ4MDk0OA== simonw 9599 2020-05-28T17:12:45Z 2020-05-28T17:12:45Z OWNER

This is a good opportunity to reconsider the design of this function and see if I'm happy with it as-is or if there are some improvements I want to make before adding it to the documented API.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Internals documentation for datasette.metadata() method 626593402  
635471007 https://github.com/simonw/datasette/issues/781#issuecomment-635471007 https://api.github.com/repos/simonw/datasette/issues/781 MDEyOklzc3VlQ29tbWVudDYzNTQ3MTAwNw== simonw 9599 2020-05-28T16:58:47Z 2020-05-28T16:58:47Z OWNER

I'm inclined to do this at the earliest possible moment. I think that's probably in the DatasetteRouter class, which should see every scope first and be able to apply that setting to it. It already has some special case logic to deal with the base_url setting here:

https://github.com/simonw/datasette/blob/40885ef24e32d91502b6b8bbad1c7376f50f2830/datasette/app.py#L779-L789

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
request.url and request.scheme should obey force_https_urls config setting 626663119  
635468994 https://github.com/simonw/datasette/issues/781#issuecomment-635468994 https://api.github.com/repos/simonw/datasette/issues/781 MDEyOklzc3VlQ29tbWVudDYzNTQ2ODk5NA== simonw 9599 2020-05-28T16:55:35Z 2020-05-28T16:55:35Z OWNER

I think the right way to fix this is to modify the scope["scheme"] ASGI key before the Request object is constructed - otherwise that Request class will have to gain knowledge of Datasette's configuration mechanism.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
request.url and request.scheme should obey force_https_urls config setting 626663119  
635413437 https://github.com/simonw/datasette/issues/780#issuecomment-635413437 https://api.github.com/repos/simonw/datasette/issues/780 MDEyOklzc3VlQ29tbWVudDYzNTQxMzQzNw== simonw 9599 2020-05-28T15:15:03Z 2020-05-28T15:15:03Z OWNER

Also: I think I should add a query= parameter to help lookup metadata about a specific named canned query.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Internals documentation for datasette.metadata() method 626593402  
635384739 https://github.com/simonw/datasette/issues/744#issuecomment-635384739 https://api.github.com/repos/simonw/datasette/issues/744 MDEyOklzc3VlQ29tbWVudDYzNTM4NDczOQ== simonw 9599 2020-05-28T14:28:58Z 2020-05-28T14:28:58Z OWNER

This is now released. pip install datasette==0.43 should get the fix.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
link_or_copy_directory() error - Invalid cross-device link 608058890  
635131217 https://github.com/simonw/datasette/issues/706#issuecomment-635131217 https://api.github.com/repos/simonw/datasette/issues/706 MDEyOklzc3VlQ29tbWVudDYzNTEzMTIxNw== simonw 9599 2020-05-28T06:20:44Z 2020-05-28T06:20:44Z OWNER

Documentation: https://datasette.readthedocs.io/en/latest/sql_queries.html#canned-queries-default-fragment

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation for the "request" object 585633142  
635102675 https://github.com/simonw/datasette/issues/758#issuecomment-635102675 https://api.github.com/repos/simonw/datasette/issues/758 MDEyOklzc3VlQ29tbWVudDYzNTEwMjY3NQ== simonw 9599 2020-05-28T05:04:07Z 2020-05-28T05:04:07Z OWNER

@clausjuhl do you have any thoughts on what would be most useful for you in these JSON responses? The full /databasename-hash path, just the 7 character hash, or something else?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Question: Access to immutable database-path 612382643  
635101438 https://github.com/simonw/datasette/issues/751#issuecomment-635101438 https://api.github.com/repos/simonw/datasette/issues/751 MDEyOklzc3VlQ29tbWVudDYzNTEwMTQzOA== simonw 9599 2020-05-28T05:00:21Z 2020-05-28T05:00:21Z OWNER

Documentation: https://datasette.readthedocs.io/en/latest/metadata.html#setting-a-custom-page-size

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set custom default _size on a per-table basis 611540797  
634880090 https://github.com/simonw/datasette/issues/770#issuecomment-634880090 https://api.github.com/repos/simonw/datasette/issues/770 MDEyOklzc3VlQ29tbWVudDYzNDg4MDA5MA== simonw 9599 2020-05-27T19:10:57Z 2020-05-28T04:22:47Z OWNER

This can_render callback should take the same arguments as the redesigned render (previously called callback): https://github.com/simonw/datasette/issues/581#issuecomment-634879258

  • datasette - a Datasette instance
  • columns - the list of columns
  • rows - the list of rows (each one a SQLite Row object)
  • sql - the SQL query being executed
  • query_name - the name of the canned query, if this is one
  • database - the database name
  • table - the table or view name
  • request - the request object (to be documented in #706)
  • view_name - the name of the view
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
register_output_renderer can_render mechanism 625930207  
635069987 https://github.com/simonw/datasette/issues/773#issuecomment-635069987 https://api.github.com/repos/simonw/datasette/issues/773 MDEyOklzc3VlQ29tbWVudDYzNTA2OTk4Nw== simonw 9599 2020-05-28T03:13:27Z 2020-05-28T03:13:27Z OWNER

register_output_renderer test added in https://github.com/simonw/datasette/commit/52c4387c7d37c867104e3728cc1f4c4d1e100642#diff-56f7d7b4778bac73b6b655c02c8467aaR336

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
All plugin hooks should have unit tests 626001501  
635056520 https://github.com/simonw/datasette/issues/770#issuecomment-635056520 https://api.github.com/repos/simonw/datasette/issues/770 MDEyOklzc3VlQ29tbWVudDYzNTA1NjUyMA== simonw 9599 2020-05-28T02:28:00Z 2020-05-28T02:28:00Z OWNER

This should be optionally awaitable, as in #776

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
register_output_renderer can_render mechanism 625930207  
635056357 https://github.com/simonw/datasette/issues/776#issuecomment-635056357 https://api.github.com/repos/simonw/datasette/issues/776 MDEyOklzc3VlQ29tbWVudDYzNTA1NjM1Nw== simonw 9599 2020-05-28T02:27:26Z 2020-05-28T02:27:26Z OWNER

Example code from elsewhere: https://github.com/simonw/datasette/blob/52c4387c7d37c867104e3728cc1f4c4d1e100642/datasette/views/base.py#L416-L420

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
register_output_renderer render callback should be optionally awaitable 626163974  
635055346 https://github.com/simonw/datasette/issues/581#issuecomment-635055346 https://api.github.com/repos/simonw/datasette/issues/581 MDEyOklzc3VlQ29tbWVudDYzNTA1NTM0Ng== simonw 9599 2020-05-28T02:24:14Z 2020-05-28T02:24:14Z OWNER

Updated documentation is here: https://datasette.readthedocs.io/en/latest/plugins.html#register-output-renderer-datasette

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Redesign register_output_renderer callback 502993509  
635054690 https://github.com/simonw/datasette/issues/645#issuecomment-635054690 https://api.github.com/repos/simonw/datasette/issues/645 MDEyOklzc3VlQ29tbWVudDYzNTA1NDY5MA== simonw 9599 2020-05-28T02:22:12Z 2020-05-28T02:22:12Z OWNER

This is a duplicate of a more recent, more developed issue: #770

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for register_output_renderer to suggest extension or not 530653633  
634879258 https://github.com/simonw/datasette/issues/581#issuecomment-634879258 https://api.github.com/repos/simonw/datasette/issues/581 MDEyOklzc3VlQ29tbWVudDYzNDg3OTI1OA== simonw 9599 2020-05-27T19:09:22Z 2020-05-28T01:33:45Z OWNER

OK, the new design: your callback function can take any of the following arguments:

  • datasette - a Datasette instance
  • columns - the list of columns
  • rows - the list of rows (each one a SQLite Row object)
  • sql - the SQL query being executed
  • query_name - the name of the canned query, if this is one
  • database - the database name
  • table - the table or view name
  • request - the request object (to be documented in #706)
  • view_name - the name of the view

We will also continue to support the existing args and data arguments, but these will be undocumented and will be deprecated in Datasette 1.0. UPDATE: Decided against this, see https://github.com/simonw/datasette/issues/581#issuecomment-634946197

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Redesign register_output_renderer callback 502993509  
635023389 https://github.com/simonw/datasette/issues/775#issuecomment-635023389 https://api.github.com/repos/simonw/datasette/issues/775 MDEyOklzc3VlQ29tbWVudDYzNTAyMzM4OQ== simonw 9599 2020-05-28T00:47:32Z 2020-05-28T00:47:32Z OWNER

These:

https://github.com/simonw/datasette/blob/4b96857f170e329a73186e703cc0d9ca4e8719cc/tests/fixtures.py#L337-L506

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Move test plugins into datasette/tests/plugins/ directory 626131309  

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