home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

24 rows where "updated_at" is on date 2023-08-09 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 9

  • [feature request]`datasette install plugins.json` options 8
  • Query view shouldn't return `columns` 4
  • Add writable canned query demo to latest.datasette.io 3
  • Release notes for 1.0a3 3
  • Implement and document extras for the new query view page 2
  • `render_cell()` hook should take an optional `request` argument 1
  • Implement canned queries against new query JSON work 1
  • Refactor code that supports templates_considered comment 1
  • Redesign row default JSON 1

user 2

  • simonw 23
  • HaveF 1

author_association 2

  • OWNER 23
  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1672224611 https://github.com/simonw/datasette/issues/2133#issuecomment-1672224611 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jrB9j simonw 9599 2023-08-09T22:07:43Z 2023-08-09T22:07:43Z OWNER

Documentation: https://docs.datasette.io/en/latest/plugins.html#seeing-what-plugins-are-installed

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1672076671 https://github.com/simonw/datasette/issues/2133#issuecomment-1672076671 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jqd1_ simonw 9599 2023-08-09T20:09:31Z 2023-08-09T20:09:31Z OWNER

I'm going to have it only return plugins with a version other than None.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1672076284 https://github.com/simonw/datasette/issues/2133#issuecomment-1672076284 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jqdv8 simonw 9599 2023-08-09T20:09:12Z 2023-08-09T20:09:12Z OWNER

Problem - if there are plugins in the plugins directory it was returning this: messages_output_renderer.py==None my_plugin.py==None my_plugin_2.py==None register_output_renderer.py==None sleep_sql_function.py==None view_name.py==None

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1671983228 https://github.com/simonw/datasette/issues/2137#issuecomment-1671983228 https://api.github.com/repos/simonw/datasette/issues/2137 IC_kwDOBm6k_c5jqHB8 simonw 9599 2023-08-09T19:02:47Z 2023-08-09T19:02:47Z OWNER

As part of this I'd like to refactor the JSON renderer code - I started attempting that here: https://github.com/simonw/datasette/commit/f3944608cc000a2542b4fe9a7a89c866391924f2

In particular I want to get rid of that data argument.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Redesign row default JSON 1843821954  
1671982215 https://github.com/simonw/datasette/issues/2136#issuecomment-1671982215 https://api.github.com/repos/simonw/datasette/issues/2136 IC_kwDOBm6k_c5jqGyH simonw 9599 2023-08-09T19:02:19Z 2023-08-09T19:02:19Z OWNER

I'm going with a bit of a hacky workaround for the moment, until I get a chance to refactor this: - #2137

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Query view shouldn't return `columns` 1843710170  
1671964003 https://github.com/simonw/datasette/issues/2136#issuecomment-1671964003 https://api.github.com/repos/simonw/datasette/issues/2136 IC_kwDOBm6k_c5jqCVj simonw 9599 2023-08-09T18:53:10Z 2023-08-09T18:53:18Z OWNER

I made an initial attempt at this in a branch, but it broke too much other stuff. https://github.com/simonw/datasette/commit/f3944608cc000a2542b4fe9a7a89c866391924f2

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Query view shouldn't return `columns` 1843710170  
1671862711 https://github.com/simonw/datasette/issues/2113#issuecomment-1671862711 https://api.github.com/repos/simonw/datasette/issues/2113 IC_kwDOBm6k_c5jppm3 simonw 9599 2023-08-09T17:35:22Z 2023-08-09T17:35:22Z OWNER

Need ?_extra=columns too since I'm removing "columns" from the default query JSON in https://github.com/simonw/datasette/issues/2136

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Implement and document extras for the new query view page 1822939274  
1671861623 https://github.com/simonw/datasette/issues/2136#issuecomment-1671861623 https://api.github.com/repos/simonw/datasette/issues/2136 IC_kwDOBm6k_c5jppV3 simonw 9599 2023-08-09T17:34:35Z 2023-08-09T17:34:35Z OWNER

I'll make ?_extra=columns work in: - #2113

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Query view shouldn't return `columns` 1843710170  
1671848664 https://github.com/simonw/datasette/issues/2136#issuecomment-1671848664 https://api.github.com/repos/simonw/datasette/issues/2136 IC_kwDOBm6k_c5jpmLY simonw 9599 2023-08-09T17:24:37Z 2023-08-09T17:24:37Z OWNER

It also bothers me that ok comes first in one but not first in the other - I'd like the order of keys in the JSON to be consistent, even though order isn't meant to mean anything.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Query view shouldn't return `columns` 1843710170  
1671844664 https://github.com/simonw/datasette/issues/2135#issuecomment-1671844664 https://api.github.com/repos/simonw/datasette/issues/2135 IC_kwDOBm6k_c5jplM4 simonw 9599 2023-08-09T17:21:22Z 2023-08-09T17:21:22Z OWNER

OK, I've done the small changes - still need to document the big JSON changes though.

Those aren't covered by the regular documentation either so I need to update that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Release notes for 1.0a3 1843600087  
1671836347 https://github.com/simonw/datasette/issues/2007#issuecomment-1671836347 https://api.github.com/repos/simonw/datasette/issues/2007 IC_kwDOBm6k_c5jpjK7 simonw 9599 2023-08-09T17:15:03Z 2023-08-09T17:15:03Z OWNER

Updated documentation: https://docs.datasette.io/en/latest/plugin_hooks.html#render-cell-row-value-column-table-database-datasette-request

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`render_cell()` hook should take an optional `request` argument 1560662739  
1671753753 https://github.com/simonw/datasette/issues/2135#issuecomment-1671753753 https://api.github.com/repos/simonw/datasette/issues/2135 IC_kwDOBm6k_c5jpPAZ simonw 9599 2023-08-09T16:26:17Z 2023-08-09T16:28:19Z OWNER
  • Dropped support for Python 3.7
  • New Justfile
  • 1970

  • datasette.render_template() now accepts a Context subclass as an alternative to a dictionary
  • 2106

  • 2007

  • https://github.com/simonw/datasette/issues/2130
  • https://github.com/simonw/datasette/issues/2079
  • https://github.com/simonw/datasette/issues/1153
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Release notes for 1.0a3 1843600087  
1671750913 https://github.com/simonw/datasette/issues/2135#issuecomment-1671750913 https://api.github.com/repos/simonw/datasette/issues/2135 IC_kwDOBm6k_c5jpOUB simonw 9599 2023-08-09T16:24:26Z 2023-08-09T16:24:26Z OWNER

Remember not to include changes from this:

https://github.com/simonw/datasette/blob/26be9f0445b753fb84c802c356b0791a72269f25/docs/changelog.rst?plain=1#L9-L31

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Release notes for 1.0a3 1843600087  
1671725144 https://github.com/simonw/datasette/issues/2113#issuecomment-1671725144 https://api.github.com/repos/simonw/datasette/issues/2113 IC_kwDOBm6k_c5jpIBY simonw 9599 2023-08-09T16:07:58Z 2023-08-09T16:07:58Z OWNER

Punting this out of the 1.0a3 alpha for the moment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Implement and document extras for the new query view page 1822939274  
1671722482 https://github.com/simonw/datasette/issues/2133#issuecomment-1671722482 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jpHXy simonw 9599 2023-08-09T16:06:28Z 2023-08-09T16:06:28Z OWNER

Plugin configuration itself currently lives in metadata.json which I don't like - that file was supposed to be for metadata about your databases, it's a bit of an accident that it grew configuration options as well.

I'm hoping to fix that for Datasette 1.0, but I'm still figuring out how to do that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1671720761 https://github.com/simonw/datasette/issues/2133#issuecomment-1671720761 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jpG85 simonw 9599 2023-08-09T16:05:33Z 2023-08-09T16:05:33Z OWNER

Honestly the --all option isn't particularly useful - it's really more of a debugging tool for myself than something that I expect anyone else to use.

The purpose of datasette plugins generally is to help people confirm that plugins installed correctly. It's effectively the CLI alternative to hitting https://datasette.io/-/plugins

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1671649530 https://github.com/simonw/datasette/issues/2133#issuecomment-1671649530 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jo1j6 HaveF 54462 2023-08-09T15:41:14Z 2023-08-09T15:41:14Z NONE

Yes, using this approach(datasette install -r requirements.txt) will result in more consistency.

I'm curious about the results of the datasette plugins --all command. Where will we use the output of this command? Will it include configuration information for these plugins in the future? If so, will we need to consider the configuration of these plugins in addition to installing them on different computers?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1671634654 https://github.com/simonw/datasette/issues/2133#issuecomment-1671634654 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jox7e simonw 9599 2023-08-09T15:32:14Z 2023-08-09T15:32:14Z OWNER

```diff diff --git a/datasette/cli.py b/datasette/cli.py index 32266888..370b722c 100644 --- a/datasette/cli.py +++ b/datasette/cli.py @@ -223,15 +223,22 @@ pm.hook.publish_subcommand(publish=publish)

@cli.command() @click.option("--all", help="Include built-in default plugins", is_flag=True) +@click.option( + "--requirements", help="Output requirements.txt of installed plugins", is_flag=True +) @click.option( "--plugins-dir", type=click.Path(exists=True, file_okay=False, dir_okay=True), help="Path to directory containing custom plugins", ) -def plugins(all, plugins_dir): +def plugins(all, requirements, plugins_dir): """List currently installed plugins""" app = Datasette([], plugins_dir=plugins_dir) - click.echo(json.dumps(app._plugins(all=all), indent=4)) + if requirements: + for plugin in app._plugins(): + click.echo("{}=={}".format(plugin["name"], plugin["version"])) + else: + click.echo(json.dumps(app._plugins(all=all), indent=4))

@cli.command() Output: % datasette plugins --requirements
datasette-codespaces==0.1.1 datasette-graphql==2.2 datasette-json-html==1.0.1 datasette-pretty-json==0.2.2 datasette-x-forwarded-host==0.1 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1671628602 https://github.com/simonw/datasette/issues/2133#issuecomment-1671628602 https://api.github.com/repos/simonw/datasette/issues/2133 IC_kwDOBm6k_c5jowc6 simonw 9599 2023-08-09T15:28:42Z 2023-08-09T15:28:42Z OWNER

Neat idea! We already have this command:

datasette install -r requirements.txt

So maybe datasetet plugins --requirements could generate a requirements.txt file which could be used there.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[feature request]`datasette install plugins.json` options 1841501975  
1671626876 https://github.com/simonw/datasette/issues/2131#issuecomment-1671626876 https://api.github.com/repos/simonw/datasette/issues/2131 IC_kwDOBm6k_c5jowB8 simonw 9599 2023-08-09T15:27:40Z 2023-08-09T15:27:40Z OWNER

Another place that needs fixing: https://github.com/simonw/datasette/blob/26be9f0445b753fb84c802c356b0791a72269f25/datasette/views/database.py#L244-L249

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor code that supports templates_considered comment 1840417903  
1671526372 https://github.com/simonw/datasette/issues/2134#issuecomment-1671526372 https://api.github.com/repos/simonw/datasette/issues/2134 IC_kwDOBm6k_c5joXfk simonw 9599 2023-08-09T14:39:54Z 2023-08-09T14:39:54Z OWNER

Alternatively, what about if there was a custom SQL function available during canned write queries for setting the output message? Then the fact that canned queries don't return a table view wouldn't be a problem. Bit weird though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add writable canned query demo to latest.datasette.io 1843391585  
1671503163 https://github.com/simonw/datasette/issues/2134#issuecomment-1671503163 https://api.github.com/repos/simonw/datasette/issues/2134 IC_kwDOBm6k_c5joR07 simonw 9599 2023-08-09T14:32:30Z 2023-08-09T14:32:30Z OWNER

Annoying thing about this plugin is that you don't see the new counter value when you submit the increment or decrement query.

Maybe canned queries should support SQL multiple statements? Could return the result of the last one.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add writable canned query demo to latest.datasette.io 1843391585  
1671500965 https://github.com/simonw/datasette/issues/2134#issuecomment-1671500965 https://api.github.com/repos/simonw/datasette/issues/2134 IC_kwDOBm6k_c5joRSl simonw 9599 2023-08-09T14:31:43Z 2023-08-09T14:31:43Z OWNER

Here's a simple plugin that can do this: ```python from datasette import hookimpl

@hookimpl def startup(datasette): db = datasette.add_memory_database("counters")

async def inner():
    await db.execute_write("create table if not exists counters (name text primary key, value integer)")
    await db.execute_write("insert or ignore into counters (name, value) values ('counter', 0)")

return inner

@hookimpl def canned_queries(database): if database == "counters": return { "increment": { "sql": "update counters set value = value + 1 where name = 'counter'", "write": True, }, "decrement": { "sql": "update counters set value = value - 1 where name = 'counter'", "write": True, }, } ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add writable canned query demo to latest.datasette.io 1843391585  
1670470516 https://github.com/simonw/datasette/issues/2114#issuecomment-1670470516 https://api.github.com/repos/simonw/datasette/issues/2114 IC_kwDOBm6k_c5jkVt0 simonw 9599 2023-08-09T00:09:55Z 2023-08-09T00:10:32Z OWNER

I decided to figure out where the _size= parameter here comes from: https://github.com/simonw/datasette/blob/cd57b0f71234273156cb1eba3f9153b9e27ac14d/datasette/views/database.py#L576-L588

It took some spelunking, but it looks like I added that five years ago as part of CSV streaming in https://github.com/simonw/datasette/commit/fc3660cfad7668dbce6ead12766e048fc1f78b11

It's there purely to allow CSV streaming to set _size="max".

And since CSV streaming is still just a table thing, not a query thing, I can drop it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Implement canned queries against new query JSON work 1822940263  

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