home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

31 rows where comments = 7, repo = 107914493 and state = "closed" sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: user, milestone, updated_at, author_association, draft, created_at (date), updated_at (date), closed_at (date)

type 2

  • issue 27
  • pull 4

state 1

  • closed · 31 ✖

repo 1

  • datasette · 31 ✖
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
449886319 MDU6SXNzdWU0NDk4ODYzMTk= 493 Rename metadata.json to config.json simonw 9599 closed 0   Datasette 1.0 3268330 7 2019-05-29T15:48:03Z 2023-08-23T01:29:21Z 2023-08-23T01:29:20Z OWNER  

It is increasingly being useful configuration options, when it started out as purely metadata.

Could cause confusion with the --config mechanism though - maybe that should be called "settings" instead?

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/493/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1473481262 I_kwDOBm6k_c5X04ou 1928 Hacker News Datasette write demo simonw 9599 closed 0     7 2022-12-02T21:17:41Z 2022-12-02T23:47:11Z 2022-12-02T21:43:19Z OWNER  

Idea is to have my existing scraper at https://github.com/simonw/scrape-hacker-news-by-domain also write to my private Datasette Cloud account, then create an atom feed from it.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1928/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1422915587 I_kwDOBm6k_c5Uz_gD 1853 Upgrade Datasette Docker to Python 3.11 simonw 9599 closed 0     7 2022-10-25T18:44:31Z 2022-10-25T19:28:56Z 2022-10-25T19:05:16Z OWNER  

Related: - #1768

I think this base image looks right: 3.11.0-slim-bullseye

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1853/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1239008850 I_kwDOBm6k_c5J2cZS 1744 `--nolock` feature for opening locked databases simonw 9599 closed 0     7 2022-05-17T18:25:16Z 2022-05-17T19:46:38Z 2022-05-17T19:40:30Z OWNER  

The getting started docs currently suggest you try this to browse your Chrome history:

datasette ~/Library/Application\ Support/Google/Chrome/Default/History

But if Chrome is running you will likely get this error:

sqlite3.OperationalError: database is locked

Turns out there's a workaround for this which I just spotted on the SQLite forum:

You can do this using a URI filename: sqlite3 'file:places.sqlite?mode=ro&nolock=1' That opens the file places.sqlite in read-only mode with locking disabled. This isn't safe, in that changes to the database made by other corrections are likely to cause this connection to return incorrect results or crash. Read-only mode should at least mean that you don't corrupt the database in the process.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1744/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1175648453 I_kwDOBm6k_c5GEvjF 1675 Extract out `check_permissions()` from `BaseView simonw 9599 closed 0     7 2022-03-21T16:39:46Z 2022-03-21T17:14:31Z 2022-03-21T17:13:21Z OWNER  

I'm going to refactor this stuff out and document it so it can be easily used by plugins:

https://github.com/simonw/datasette/blob/4a4164b81191dec35e423486a208b05a9edc65e4/datasette/views/base.py#L69-L103

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1660#issuecomment-1074136176

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1675/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1173017980 PR_kwDOBm6k_c40oRq- 1664 Remove hashed URL mode simonw 9599 closed 0     7 2022-03-17T23:19:10Z 2022-03-19T00:12:04Z 2022-03-19T00:12:04Z OWNER simonw/datasette/pulls/1664

Refs #1661.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1664/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1160432941 PR_kwDOBm6k_c4z_p6S 1648 Use dash encoding for table names and row primary keys in URLs simonw 9599 closed 0     7 2022-03-05T19:50:45Z 2022-03-07T15:38:30Z 2022-03-07T15:38:30Z OWNER simonw/datasette/pulls/1648

Refs #1439.

  • [x] Build dash_encode / dash_decode functions
  • [x] Use dash encoding for row primary keys
  • [x] Use dash encoding for ?_next= pagination tokens
  • [x] Use dash encoding for table names in URLs
  • [x] Use dash encoding for database name
  • ~~Implement redirects from previous % URLs that replace those with -~~ - separate issue: #1650
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1648/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
688622148 MDU6SXNzdWU2ODg2MjIxNDg= 957 Simplify imports of common classes simonw 9599 closed 0   Datasette 1.0 3268330 7 2020-08-29T23:44:04Z 2022-02-06T06:36:41Z 2022-02-06T06:34:37Z OWNER  

There are only a few classes that plugins need to import. It would be nice if these imports were as short and memorable as possible.

For example: python from datasette.app import Datasette from datasette.utils.asgi import Response Could both become: python from datasette import Datasette from datasette import Response

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/957/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1059555791 I_kwDOBm6k_c4_J4nP 1527 Columns starting with an underscore behave poorly in filters simonw 9599 closed 0   Datasette 0.60 7571612 7 2021-11-22T01:01:36Z 2022-01-14T00:57:08Z 2022-01-14T00:57:08Z OWNER  

Similar bug to #1525 (and #1506 before it). Start on https://latest.datasette.io/fixtures/facetable?_facet=_neighborhood - then select a neighborhood - then try to remove that filter using the little "x" and submitting the form again.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1527/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1087931918 I_kwDOBm6k_c5A2IYO 1579 `.execute_write(... block=True)` should be the default behaviour simonw 9599 closed 0   Datasette 0.60 7571612 7 2021-12-23T18:54:28Z 2022-01-13T22:28:08Z 2021-12-23T19:18:26Z OWNER  

Every single piece of code I've written against the write APIs has used the block=True option to wait for the result.

Without that, it instead fires the write into the queue but then continues even before it has finished executing.

block=True should clearly be the default behaviour here!

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1579/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1055402144 PR_kwDOBm6k_c4unfnq 1512 New pattern for async view classes simonw 9599 closed 0     7 2021-11-16T21:55:44Z 2021-11-17T01:39:54Z 2021-11-17T01:39:44Z OWNER simonw/datasette/pulls/1512

Refs #878 - starting out with the new AsyncBase class implementing a pytest-inspired asyncio parallel execution mechanism.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1512/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1  
904071938 MDU6SXNzdWU5MDQwNzE5Mzg= 1345 ?_nocol= does not interact well with default facets simonw 9599 closed 0     7 2021-05-27T18:39:55Z 2021-05-31T02:40:44Z 2021-05-31T02:31:21Z OWNER  

Clicking "Hide this column" on fips on https://covid-19.datasettes.com/covid/ny_times_us_counties shows this error:

https://covid-19.datasettes.com/covid/ny_times_us_counties?_nocol=fips

Invalid SQL

no such column: fips

The reason is that https://covid-19.datasettes.com/-/metadata sets up the following:

json "ny_times_us_counties": { "sort_desc": "date", "facets": [ "state", "county", "fips" ], It's setting fips as a default facet, which breaks if you attempt to remove the column using ?_nocol.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1345/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
898904402 MDU6SXNzdWU4OTg5MDQ0MDI= 1337 "More" link for facets that shows _facet_size=max results simonw 9599 closed 0     7 2021-05-23T00:08:51Z 2021-05-27T16:14:14Z 2021-05-27T16:01:03Z OWNER  

Original title: "More" link for facets that shows the full set of results

The simplest way to do this will be to have it link to a generated SQL query.

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1332#issuecomment-846479062

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1337/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
841456306 MDU6SXNzdWU4NDE0NTYzMDY= 1276 Invalid SQL: "no such table: pragma_database_list" on database page justinallen 1314318 closed 0     7 2021-03-26T00:03:53Z 2021-03-31T16:27:27Z 2021-03-28T23:52:31Z NONE  

Don't think this has been covered here yet. I'm a little stumped with this one and can't tell if it's a bug or I have something misconfigured.

Oddly, when running locally the usual list of tables populates (i.e. at /charts a list of tables in charts.db). But when on the web server it throws an Invalid SQL error and "no such table: pragma_database_list" below.

All the url endpoints seem to work fine aside from this - individual tables (/charts/chart_one), as well as stored queries (/charts/query_one).

Not sure if this has anything to do with upgrading to Datasette 0.55, or something to do with our setup, which uses a metadata build script similar to the one for the 538 server, or something else.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1276/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
842881221 MDU6SXNzdWU4NDI4ODEyMjE= 1281 Latest Datasette tags missing from Docker Hub simonw 9599 closed 0     7 2021-03-29T00:58:30Z 2021-03-29T01:41:48Z 2021-03-29T01:41:48Z OWNER  

Spotted this while testing https://github.com/simonw/datasette/issues/1249#issuecomment-808998719_

https://hub.docker.com/r/datasetteproject/datasette/tags?page=1&ordering=last_updated isn't showing the tags for any version more recent than 0.54.1 - we are up to 0.56 now.

But the :latest tag is for the new 0.56 release.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1281/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
721050815 MDU6SXNzdWU3MjEwNTA4MTU= 1019 "Edit SQL" button on canned queries jsfenfen 639012 closed 0   0.51 6026070 7 2020-10-14T00:51:39Z 2020-10-23T19:44:06Z 2020-10-14T03:44:23Z CONTRIBUTOR  

Feature request: Would it be possible to add an "edit this query" button on canned queries? Clicking it would open the canned query as an editable sql query. I think the intent is to have named parameters to allow this, but sometimes you just gotta rewrite it?

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1019/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
722724086 MDU6SXNzdWU3MjI3MjQwODY= 1025 Fix last remaining links to "/" that do not respect base_url simonw 9599 closed 0   0.51 6026070 7 2020-10-15T22:46:38Z 2020-10-23T19:44:06Z 2020-10-20T05:21:29Z OWNER  

Refs #1023 datasette % git grep '"/"' -- '*.html' datasette/templates/error.html: <a href="/">home</a> datasette/templates/patterns.html: <a href="/">home</a> / datasette/templates/query.html: <a href="/">home</a> /

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1025/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
440134714 MDU6SXNzdWU0NDAxMzQ3MTQ= 446 Define mechanism for plugins to return structured data simonw 9599 closed 0   Datasette 1.0 3268330 7 2019-05-03T17:00:16Z 2020-10-02T00:08:54Z 2020-10-02T00:08:47Z OWNER  

Several plugin hooks now expect plugins to return data in a specific shape - notably the new output format hook and the custom facet hook.

These use Python dictionaries right now but that's quite error prone: it would be good to have a mechanism that supported a more structured format.

Full list of current hooks is here: https://datasette.readthedocs.io/en/latest/plugins.html#plugin-hooks

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/446/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
705827457 MDU6SXNzdWU3MDU4Mjc0NTc= 971 Support the dbstat table simonw 9599 closed 0     7 2020-09-21T18:38:53Z 2020-09-21T19:00:02Z 2020-09-21T18:59:52Z OWNER  

dbstat is a table that is usually available on SQLite giving statistics about the database. For example:

https://fivethirtyeight.datasettes.com/fivethirtyeight?sql=SELECT+*+FROM+%22dbstat%22+WHERE+name%3D%27bachelorette%2Fbachelorette%27%3B

| name | path | pageno | pagetype | ncell | payload | unused | mx_payload | pgoffset | pgsize | |---------------------------|--------|----------|------------|---------|-----------|----------|--------------|------------|----------| | bachelorette/bachelorette | / | 89 | internal | 13 | 0 | 3981 | 0 | 360448 | 4096 | | bachelorette/bachelorette | /000/ | 91 | leaf | 66 | 3792 | 32 | 74 | 368640 | 4096 | | bachelorette/bachelorette | /001/ | 92 | leaf | 67 | 3800 | 14 | 74 | 372736 | 4096 | | bachelorette/bachelorette | /002/ | 93 | leaf | 65 | 3717 | 46 | 70 | 376832 | 4096 | | bachelorette/bachelorette | /003/ | 94 | leaf | 68 | 3742 | 6 | 71 | 380928 | 4096 | | bachelorette/bachelorette | /004/ | 95 | leaf | 70 | 3696 | 42 | 66 | 385024 | 4096 | | bachelorette/bachelorette | /005/ | 96 | leaf | 69 | 3721 | 22 | 71 | 389120 | 4096 | | bachelorette/bachelorette | /006/ | 97 | leaf | 70 | 3737 | 1 | 72 | 393216 | 4096 | | bachelorette/bachelorette | /007/ | 98 | leaf | 69 | 3728 | 15 | 69 | 397312 | 4096 | | bachelorette/bachelorette | /008/ | 99 | leaf | 73 | 3715 | 8 | 64 | 401408 | 4096 | | bachelorette/bachelorette | /009/ | 100 | leaf | 73 | 3705 | 18 | 62 | 405504 | 4096 | | bachelorette/bachelorette | /00a/ | 101 | leaf | 75 | 3681 | 32 | 62 | 409600 | 4096 | | bachelorette/bachelorette | /00b/ | 102 | leaf | 77 | 3694 | 9 | 62 | 413696 | 4096 | | bachelorette/bachelorette | /00c/ | 103 | leaf | 74 | 3673 | 45 | 62 | 417792 | 4096 | | bachelorette/bachelorette | /00d/ | 104 | leaf | 5 | 228 | 3835 | 48 | 421888 | 4096 |

Other than direct select * from dbsat queries it is completely invisible.

It would be cool if https://fivethirtyeight.datasettes.com/fivethirtyeight/dbstat didn't 404 (on databases for which that table was available).

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/971/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
688427751 MDU6SXNzdWU2ODg0Mjc3NTE= 956 Push to Docker Hub failed - but it shouldn't run for alpha releases anyway simonw 9599 closed 0     7 2020-08-29T01:09:12Z 2020-09-15T20:46:41Z 2020-09-15T20:36:34Z OWNER  

https://github.com/simonw/datasette/runs/1043709494?check_suite_focus=true

  • [x] This step should not run if a release is an alpha or beta
  • [x] When it DOES run it should work
  • [x] See it work for both an alpha and a non-alpha release, then close this ticket
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/956/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
677926613 MDU6SXNzdWU2Nzc5MjY2MTM= 931 Docker container is no longer being pushed (it's stuck on 0.45) simonw 9599 closed 0     7 2020-08-12T19:33:03Z 2020-08-12T21:36:20Z 2020-08-12T21:36:20Z OWNER  

e.g. https://travis-ci.org/github/simonw/datasette/jobs/717123725

Here's how it broke: --2020-08-12 03:08:17-- https://www.gaia-gis.it/gaia-sins/freexl-1.0.5.tar.gz Resolving www.gaia-gis.it (www.gaia-gis.it)... 212.83.162.51 Connecting to www.gaia-gis.it (www.gaia-gis.it)|212.83.162.51|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2020-08-12 03:08:18 ERROR 404: Not Found. The command '/bin/sh -c wget "https://www.gaia-gis.it/gaia-sins/freexl-1.0.5.tar.gz" && tar zxf freexl-1.0.5.tar.gz && cd freexl-1.0.5 && ./configure && make && make install' returned a non-zero code: 8 The command "docker build -f Dockerfile -t $REPO:$TRAVIS_TAG ." exited with 8. 0.07s$ docker tag $REPO:$TRAVIS_TAG $REPO:latest Error response from daemon: No such image: [secure]/datasette:0.47.1 The command "docker tag $REPO:$TRAVIS_TAG $REPO:latest" exited with 1. 0.08s$ docker push $REPO The push refers to repository [docker.io/[secure]/datasette] An image does not exist locally with the tag: [secure]/datasette The command "docker push $REPO" exited with 1. cache.2 store build cache

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/931/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
577578306 MDU6SXNzdWU1Nzc1NzgzMDY= 697 index.html is not reliably loaded from a plugin simonw 9599 closed 0     7 2020-03-08T22:37:55Z 2020-03-08T23:33:28Z 2020-03-08T23:11:27Z OWNER  

Lots of detail in https://github.com/simonw/datasette-search-all/issues/2 - short version is that I have a plugin with its own index.html template and Datasette intermittently fails to load it and uses the default index.html that ships with Datasette instead.

Related:

  • 689: "Templates considered" comment broken in >=0.35

  • 693: Variables from extra_template_vars() not exposed in _context=1 (may as well fix this while I'm in there)

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/697/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
576711589 MDU6SXNzdWU1NzY3MTE1ODk= 695 Update SQLite bundled with Docker container simonw 9599 closed 0     7 2020-03-06T05:42:12Z 2020-03-08T23:33:23Z 2020-03-06T06:15:27Z OWNER  

It's 3.26.0 at the moment: https://github.com/simonw/datasette/blob/af9cd4ca64652fae262e6f7b5d201f6e0adc989b/Dockerfile#L9-L11 Most recent release is 3.31.1: https://www.sqlite.org/releaselog/3_31_1.html

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/695/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
497171390 MDU6SXNzdWU0OTcxNzEzOTA= 577 Utility mechanism for plugins to render templates simonw 9599 closed 0   Datasette 1.0 3268330 7 2019-09-23T15:30:36Z 2020-02-04T20:26:20Z 2020-02-04T20:26:19Z OWNER  

Sometimes a plugin will need to render a template for some custom UI. We need a documented API for doing this, which ensures that everything will work correctly if you extend base.html etc.

See also #576. This could be a .render() method on the Datasette class, but that feels a bit weird - should that class also take responsibility for rendering?

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/577/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
289425975 MDExOlB1bGxSZXF1ZXN0MTYzNTYxODMw 181 add "format sql" button to query page, uses sql-formatter bsmithgall 1957344 closed 0     7 2018-01-17T21:50:04Z 2019-11-11T03:08:25Z 2019-11-11T03:08:25Z NONE simonw/datasette/pulls/181

Cool project!

This fixes #136 using the suggested sql formatter library. I included the minified version in the bundle and added the relevant scripts to the codemirror includes instead of adding new files, though I could also add new files. I wanted to keep it all together, since the result of the format needs access to the editor in order to properly update the codemirror instance.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/181/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
309033998 MDU6SXNzdWUzMDkwMzM5OTg= 187 Windows installation error robmarkcole 11855322 closed 0     7 2018-03-27T16:04:37Z 2019-06-15T21:44:23Z 2019-06-15T21:44:23Z NONE  

On attempting install on a Win 7 PC with py 3.6.2 (Anaconda dist) I get the error:

Collecting uvloop>=0.5.3 (from Sanic==0.7.0->datasette) Downloading uvloop-0.9.1.tar.gz (1.8MB) 100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 1.8MB 12.8MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\RCole\AppData\Local\Temp\pip-build-juakfqt8\uvloop\setup.py ", line 10, in <module> raise RuntimeError('uvloop does not support Windows at the moment') RuntimeError: uvloop does not support Windows at the moment

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/187/reactions",
    "total_count": 4,
    "+1": 4,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
432636432 MDU6SXNzdWU0MzI2MzY0MzI= 429 ?_where=sql-fragment parameter for table views simonw 9599 closed 0     7 2019-04-12T15:58:51Z 2019-04-15T10:48:01Z 2019-04-13T01:37:25Z OWNER  

Only available if arbitrary SQL is enabled (the default).

?_where=id in (1,2,3)&_where=id in (select tag_id from tags)

Allows any table (or view) page to have arbitrary additional extra_where clauses defined using the URL!

This would be extremely useful for building JavaScript applications against the Datasette API that only need on extra tiny bit of SQL but still want to benefit from other table view features like faceting.

Would be nice if this could take :named parameters and have them filled in via querystring as well.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/429/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
336465018 MDU6SXNzdWUzMzY0NjUwMTg= 329 Travis should push tagged images to Docker Hub for each release simonw 9599 closed 0     7 2018-06-28T04:01:31Z 2018-11-05T06:54:10Z 2018-11-05T06:53:28Z OWNER  

https://sebest.github.io/post/using-travis-ci-to-build-docker-images/

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/329/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
273127694 MDU6SXNzdWUyNzMxMjc2OTQ= 57 Ship a Docker image of the whole thing simonw 9599 closed 0     7 2017-11-11T07:51:28Z 2018-06-28T04:01:51Z 2018-06-28T04:01:38Z OWNER  

The generated Docker images can then just inherit from that. This will speed up deploys as no need to pip install anything.

  • [x] Ship that image to Docker Hub
  • [ ] Update the generated Dockerfile to use it
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/57/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
269731374 MDU6SXNzdWUyNjk3MzEzNzQ= 44 ?_group_count=country - return counts by specific column(s) simonw 9599 closed 0     7 2017-10-30T19:50:32Z 2018-04-26T15:09:58Z 2018-04-26T15:09:58Z OWNER  

Imagine if this:

https://stateless-datasets-jykibytogk.now.sh/flights-07d1283/airports.jsono?country__contains=gu&_group_count=country

Turned into this:

https://stateless-datasets-jykibytogk.now.sh/flights-07d1283?sql=select%20country,%20count(*)%20as%20group_count_country%20from%20airports%20where%20country%20like%20%27%gu%%27%20group%20by%20country%20order%20by%20group_count_country%20desc

This would involve introducing a new precedent of query string arguments that start with an _ having special meanings. While we're at it, could try adding _fields=x,y,z

Tasks:

  • [x] Get initial version working
  • [ ] Refactor code to not just "pretend to be a view"
  • [ ] Get foreign key relationships expanded
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/44/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
309558826 MDU6SXNzdWUzMDk1NTg4MjY= 190 Keyset pagination doesn't work correctly for compound primary keys simonw 9599 closed 0     7 2018-03-28T22:45:06Z 2018-03-30T06:31:15Z 2018-03-30T06:26:28Z OWNER  

Consider https://datasette-issue-190-compound-pks.now.sh/compound-pks-9aafe8f/compound_primary_key

The next= link is to d,v:

https://datasette-issue-190-compound-pks.now.sh/compound-pks-9aafe8f/compound_primary_key?_next=d%2Cv

But that page starts with:

The next key in the sequence should be d,w. Also we should return the full a-z of the ones that start with the letter e - in this example we only return e-w, e-x, e-y and e-z

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/190/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 866.355ms · About: github-to-sqlite