home / github

Menu
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

117 rows where milestone = 3268330

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: user, state, comments, author_association, type, created_at (date), updated_at (date), closed_at (date)

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
323658641 MDU6SXNzdWUzMjM2NTg2NDE= 262 Add ?_extra= mechanism for requesting extra properties in JSON simonw 9599 open 0   Datasette 1.0 3268330 27 2018-05-16T14:55:42Z 2023-03-29T06:22:22Z   OWNER   Datasette views currently work by creating a set of data that should be returned as JSON, then defining an additional, optional `template_data()` function which is called if the view is being rendered as HTML. This `template_data()` function calculates extra template context variables which are necessary for the HTML view but should not be included in the JSON. Example of how that is used today: https://github.com/simonw/datasette/blob/2b79f2bdeb1efa86e0756e741292d625f91cb93d/datasette/views/table.py#L672-L704 With features like Facets in #255 I'm beginning to want to move more items into the `template_data()` - in the case of facets it's the `suggested_facets` array. This saves that feature from being calculated (involving several SQL queries) for the JSON case where it is unlikely to be used. But... as an API user, I want to still optionally be able to access that information. Solution: Add a `?_extra=suggested_facets&_extra=table_metadata` argument which can be used to optionally request additional blocks to be added to the JSON API. Then redefine as many of the current `template_data()` features as extra arguments instead, and teach Datasette to return certain extras by default when rendering templates. This could allow the JSON representation to be slimmed down further (removing e.g. the `table_definition` and `view_definition` keys) while still making that information available to API users who need it. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/262/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
324188953 MDU6SXNzdWUzMjQxODg5NTM= 272 Port Datasette to ASGI simonw 9599 closed 0 simonw 9599 Datasette 1.0 3268330 42 2018-05-17T21:16:32Z 2019-06-24T04:54:15Z 2019-06-24T03:33:06Z OWNER   Datasette doesn't take much advantage of Sanic, and I'm increasingly having to work around parts of it because of idiosyncrasies that are specific to Datasette - caring about the exact order of querystring arguments for example. Since Datasette is GET-only our needs from a web framework are actually pretty slim. This becomes more important as I expand the plugins #14 framework. Am I sure I want the plugin ecosystem to depend on a Sanic if I might move away from it in the future? If Datasette wasn't all about async/await I would use WSGI, but today it makes more sense to use ASGI. I'd like to be confident that switching to ASGI would still give me the excellent performance that Sanic provides. https://github.com/django/asgiref/blob/master/specs/asgi.rst datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/272/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
374953006 MDU6SXNzdWUzNzQ5NTMwMDY= 369 Interface should show same JSON shape options for custom SQL queries gfrmin 416374 open 0   Datasette 1.0 3268330 2 2018-10-29T10:39:15Z 2020-05-30T17:24:06Z   CONTRIBUTOR   At the moment the page returning a custom SQL query shows the JSON and CSV APIs, but not the multiple JSON shapes. However, adding the `_shape` parameter to the JSON API URL manually still works, so perhaps there should be consistency in the interface by having the same "Advanced Export" box for custom SQL queries. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/369/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
398011658 MDU6SXNzdWUzOTgwMTE2NTg= 398 Ensure downloading a 100+MB SQLite database file works simonw 9599 closed 0   Datasette 1.0 3268330 3 2019-01-10T20:57:52Z 2020-12-05T19:36:27Z 2020-12-05T19:36:27Z OWNER   I've seen attempted downloads of large files fail after about ten seconds. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/398/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
440222719 MDU6SXNzdWU0NDAyMjI3MTk= 448 _facet_array should work against views simonw 9599 closed 0   Datasette 1.0 3268330 12 2019-05-03T21:08:04Z 2021-11-16T01:32:05Z 2021-11-16T01:19:40Z OWNER   I created this view: https://json-view-facet-bug-demo-j7hipcg4aq-uc.a.run.app/russian-ads-8dbda00/ads_with_targets ``` CREATE VIEW ads_with_targets as select ads.*, json_group_array(targets.name) as target_names from ads join ad_targets on ad_targets.ad_id = ads.id join targets on ad_targets.target_id = targets.id group by ad_targets.ad_id ``` When I try to apply faceting by array it appears to work at first: https://json-view-facet-bug-demo-j7hipcg4aq-uc.a.run.app/russian-ads/ads_with_targets?_facet_array=target_names But actually it's doing the wrong thing - the SQL for the facets uses rowid, but rowid is not present on views at all! These results are incorrect, and clicking to select a facet will fail to produce any rows: https://json-view-facet-bug-demo-j7hipcg4aq-uc.a.run.app/russian-ads/ads_with_targets?_facet_array=target_names&target_names__arraycontains=people_who_match%3Ainterests%3AAfrican-American+Civil+Rights+Movement+%281954%E2%80%9468%29 Here's the SQL it should be using when you select a facet (note that it does not use a rowid): https://json-view-facet-bug-demo-j7hipcg4aq-uc.a.run.app/russian-ads?sql=select+*+from+ads_with_targets+where+id+in+%28%0D%0A++++++++++++select+ads_with_targets.id+from+ads_with_targets%2C+json_each%28ads_with_targets.target_names%29+j%0D%0A++++++++++++where+j.value+%3D+%3Ap0%0D%0A++++++++%29+limit+101&p0=people_who_match%3Ainterests%3ABlack+%28Color%29 So we need to do something a lot smarter here. I'm not sure what the fix will look like, or even if it's feasible given that views don't have a rowid to hook into so the JSON faceting SQL may have to be completely rewritten. ``` datasette publish cloudrun \ russian-ads.db \ --name json-view-facet-bug-demo \ --branch master \ --extra-options "--config sql_time_limit_ms:5000 --config facet_time_limit_ms:5000" ``` datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/448/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
443021509 MDU6SXNzdWU0NDMwMjE1MDk= 461 Paginate + search for databases/tables on the homepage simonw 9599 open 0   Datasette 1.0 3268330 4 2019-05-11T18:05:34Z 2020-12-17T22:14:46Z   OWNER   Split out from #460 - in order to support large numbers of connected databases the homepage needs to be paginated. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/461/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
444746021 MDU6SXNzdWU0NDQ3NDYwMjE= 468 Pagination for the database index page simonw 9599 closed 0   Datasette 1.0 3268330 1 2019-05-16T04:13:56Z 2020-10-16T23:20:26Z 2020-10-16T23:20:22Z OWNER   Some databases have a LOT of tables. Now that we often calculate table row counts dynamically we could really speed things up by paginating the database index page, e.g. http://fivethirtyeight-datasette.herokuapp.com/fivethirtyeight If we're paginating, having a filter-search-for-table widget (similar to the search-for-database widget I'm planning for the homepage) would make sense. Related: pagination for homepage #461 and Datasette Library #417 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/468/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
449854604 MDU6SXNzdWU0NDk4NTQ2MDQ= 492 Facets not correctly persisted in hidden form fields simonw 9599 closed 0   Datasette 1.0 3268330 4 2019-05-29T14:49:39Z 2020-09-15T20:12:29Z 2020-09-15T20:12:29Z OWNER   Steps to reproduce: visit https://2a4b892.datasette.io/fixtures/roadside_attractions?_facet_m2m=attraction_characteristic and click "Apply" Result is a 500: `no such column: attraction_characteristic` The error occurs because of this hidden HTML input: <input type="hidden" name="_facet" value="attraction_characteristic"> This should be: <input type="hidden" name="_facet_m2m" value="attraction_characteristic"> datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/492/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
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
456568880 MDU6SXNzdWU0NTY1Njg4ODA= 509 Support opening multiple databases with the same stem simonw 9599 closed 0 simonw 9599 Datasette 1.0 3268330 4 2019-06-15T19:32:00Z 2020-12-22T20:04:35Z 2020-12-22T20:04:35Z OWNER   e.g. I should be able to do this: datasette App/data.db Other_App/data.db This currently errors because you can't have two databases taking the `/data` URL path. Instead, how about in this particular case assigning the second database `/data-1`? datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/509/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
459587155 MDExOlB1bGxSZXF1ZXN0MjkwODk3MTA0 518 Port Datasette from Sanic to ASGI + Uvicorn simonw 9599 closed 0 simonw 9599 Datasette 1.0 3268330 12 2019-06-23T15:18:42Z 2019-06-24T13:42:50Z 2019-06-24T03:13:09Z OWNER simonw/datasette/pulls/518 Most of the code here was fleshed out in comments on #272 (Port Datasette to ASGI) - this pull request will track the final pieces: - [x] Update test harness to more correctly simulate the `raw_path` issue - [x] Use `raw_path` so table names containing `/` can work correctly - [x] Bug: JSON not served with correct content-type - [x] Get ?_trace=1 working again - [x] Replacement for `@app.listener("before_server_start")` - [x] Bug: `/fixtures/table%2Fwith%2Fslashes.csv?_format=json` downloads as CSV - [x] Replace Sanic request and response objects with my own classes, so I can remove Sanic dependency - [x] Final code tidy-up before merging to master datasette 107914493 pull     {"url": "https://api.github.com/repos/simonw/datasette/issues/518/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 0  
459590021 MDU6SXNzdWU0NTk1OTAwMjE= 519 Decide what goes into Datasette 1.0 simonw 9599 closed 0   Datasette 1.0 3268330 4 2019-06-23T15:47:41Z 2021-11-15T23:26:11Z 2021-11-15T23:26:11Z OWNER   Datasette ASGI #272 is a big part of it... but 1.0 will generally be an indicator that Datasette is a stable platform for developers to write plugins and custom templates against. So lots to think about. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/519/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
497170355 MDU6SXNzdWU0OTcxNzAzNTU= 576 Documented internals API for use in plugins simonw 9599 closed 0   Datasette 1.0 3268330 10 2019-09-23T15:28:50Z 2021-01-05T23:12:51Z 2021-01-05T23:12:37Z OWNER   Quite a few of the plugin hooks make a `datasette”`instance of the Datasette class available to the plugins, so that they can look up configuration settings and execute database queries. This means it should provide a documented, stable API so that plugin authors can rely on it. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/576/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
529429214 MDU6SXNzdWU1Mjk0MjkyMTQ= 642 Provide a cookiecutter template for creating new plugins simonw 9599 closed 0   Datasette 1.0 3268330 6 2019-11-27T15:46:36Z 2020-06-20T03:20:33Z 2020-06-20T03:20:25Z OWNER   See this conversation: https://twitter.com/psychemedia/status/1199707352540368896 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/642/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
531502365 MDU6SXNzdWU1MzE1MDIzNjU= 646 Make database level information from metadata.json available in the index.html template lagolucas 18017473 open 0   Datasette 1.0 3268330 3 2019-12-02T19:55:10Z 2022-03-15T20:50:34Z   NONE   Did a search on the issues here and didn't find anything related to what I want. I want to have information that is on the database level of the JSON like title, source and source_url, and use it on the index page. I tried some small tweaks on the python and html files, but failed to get that result. Is there a way? Thanks! datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/646/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
531755959 MDU6SXNzdWU1MzE3NTU5NTk= 647 Move hashed URL mode out to a plugin simonw 9599 closed 0   Datasette 1.0 3268330 9 2019-12-03T06:29:03Z 2022-03-19T11:56:05Z 2022-03-15T23:13:06Z OWNER   They used to be the default until #418. Since making them optional I haven't felt the need to use them even once. That suggests to me that they should be removed. I think their effect could be entirely handled by an ASGI wrapping plugin. https://datasette.readthedocs.io/en/0.32/performance.html#hashed-url-mode datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/647/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
542553350 MDU6SXNzdWU1NDI1NTMzNTA= 655 Copy and paste doesn't work reliably on iPhone for SQL editor simonw 9599 closed 0   Datasette 1.0 3268330 3 2019-12-26T13:15:10Z 2020-09-30T20:36:12Z 2020-08-30T17:51:40Z OWNER   I'm having a lot of trouble copying and pasting from the codemirror editor on my iPhone. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/655/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
570101428 MDExOlB1bGxSZXF1ZXN0Mzc5MTkyMjU4 683 .execute_write() and .execute_write_fn() methods on Database simonw 9599 closed 0   Datasette 1.0 3268330 14 2020-02-24T19:51:58Z 2020-05-30T18:40:20Z 2020-02-25T04:45:08Z OWNER simonw/datasette/pulls/683 See #682 - [x] Come up with design for `.execute_write()` and `.execute_write_fn()` - [x] Build some quick demo plugins to exercise the design - [x] Write some unit tests - [x] Write the documentation datasette 107914493 pull     {"url": "https://api.github.com/repos/simonw/datasette/issues/683/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 0  
570301333 MDU6SXNzdWU1NzAzMDEzMzM= 684 Add documentation on Database introspection methods to internals.rst simonw 9599 closed 0   Datasette 1.0 3268330 4 2020-02-25T04:20:24Z 2020-06-04T18:56:15Z 2020-05-30T18:40:39Z OWNER   `internals.rst` will be landing as part of #683 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/684/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
570309546 MDU6SXNzdWU1NzAzMDk1NDY= 685 Document (and reconsider design of) Database.execute() and Database.execute_against_connection_in_thread() simonw 9599 closed 0   Datasette 1.0 3268330 15 2020-02-25T04:49:44Z 2020-05-30T13:20:50Z 2020-05-08T17:42:18Z OWNER   In #683 I started a new section of internals documentation covering the `Database` class: https://datasette.readthedocs.io/en/latest/internals.html#database-class I decided not to document `.execute()` and `.execute_against_connection_in_thread()` yet because I'm not 100% happy with their API design yet. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/685/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
576722115 MDU6SXNzdWU1NzY3MjIxMTU= 696 Single failing unit test when run inside the Docker image simonw 9599 closed 0   Datasette 1.0 3268330 2 2020-03-06T06:16:36Z 2021-03-29T17:04:19Z 2021-03-07T07:41:18Z OWNER   ``` docker run -it -v `pwd`:/mnt datasetteproject/datasette:latest /bin/bash root@0e1928cfdf79:/# cd /mnt root@0e1928cfdf79:/mnt# pip install -e .[test] root@0e1928cfdf79:/mnt# pytest ``` I get one failure! It was for `test_searchable[/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw-expected_rows3]` ``` def test_searchable(app_client, path, expected_rows): response = app_client.get(path) > assert expected_rows == response.json["rows"] E AssertionError: assert [[1, 'barry c...sel', 'puma']] == [] E Left contains 2 more items, first extra item: [1, 'barry cat', 'terry dog', 'panther'] E Full diff: E + [] E - [[1, 'barry cat', 'terry dog', 'panther'], E - [2, 'terry dog', 'sara weasel', 'puma']] ``` _Originally posted by @simonw in https://github.com/simonw/datasette/issues/695#issuecomment-595614469_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/696/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
585633142 MDU6SXNzdWU1ODU2MzMxNDI= 706 Documentation for the "request" object simonw 9599 closed 0   Datasette 1.0 3268330 6 2020-03-22T02:55:50Z 2020-05-30T13:20:00Z 2020-05-27T22:31:22Z OWNER   Since that object is passed to the `extra_template_vars` hooks AND the classes registered by `register_facet_classes` it should be part of the documented interface on https://datasette.readthedocs.io/en/stable/internals.html I could also start passing it to the `register_output_renderer` callback. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/706/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
607223136 MDU6SXNzdWU2MDcyMjMxMzY= 741 Replace "datasette publish --extra-options" with "--setting" simonw 9599 open 0   Datasette 1.0 3268330 9 2020-04-27T04:29:04Z 2022-05-12T19:21:16Z   OWNER   See https://github.com/simonw/datasette-publish-now/issues/9#issuecomment-618155764 - the `--extra-options` mechanism is in practice just used to set `--config` options in data that you publish, but that means you end up with pretty messy looking commands: datasette publish my.db --extra-options="--config default_page_size:50 --config sql_time_limit_ms:3500" A neater design would be to support `--config` as an option for `datasette publish` directly: datasette publish my.db --config default_page_size:50 --config sql_time_limit_ms:3500 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/741/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
626078521 MDU6SXNzdWU2MjYwNzg1MjE= 774 Consolidate request.raw_args and request.args simonw 9599 closed 0   Datasette 1.0 3268330 8 2020-05-27T22:30:59Z 2020-05-29T23:27:35Z 2020-05-29T23:22:38Z OWNER   `request.raw_args` is not documented, and I'd like to remove it entirely. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/706#issuecomment-634975252_ I use it in a few places in other projects though, so I'll have to fix those first: https://github.com/search?q=user%3Asimonw+raw_args&type=Code datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/774/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
626593402 MDU6SXNzdWU2MjY1OTM0MDI= 780 Internals documentation for datasette.metadata() method simonw 9599 open 0   Datasette 1.0 3268330 2 2020-05-28T15:14:22Z 2022-03-15T20:50:34Z   OWNER   https://github.com/simonw/datasette/blob/40885ef24e32d91502b6b8bbad1c7376f50f2830/datasette/app.py#L297-L328 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/780/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
629535669 MDU6SXNzdWU2Mjk1MzU2Njk= 794 Show hooks implemented by each plugin on /-/plugins simonw 9599 closed 0   Datasette 1.0 3268330 2 2020-06-02T21:44:38Z 2020-06-02T22:30:17Z 2020-06-02T21:50:10Z OWNER   e.g. ```json { "name": "qs_actor.py", "static": false, "templates": false, "version": null, "hooks": [ "actor_from_request" ] } ``` datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/794/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
629595228 MDExOlB1bGxSZXF1ZXN0NDI2ODkxNDcx 796 New WIP writable canned queries simonw 9599 closed 0   Datasette 1.0 3268330 9 2020-06-03T00:08:00Z 2020-06-03T15:16:52Z 2020-06-03T15:16:50Z OWNER simonw/datasette/pulls/796 Refs #698. Replaces #703 Still todo: - [x] Unit tests - ~~Figure out `.json` mode~~ - [x] Flash message solution - ~~CSRF protection~~ - [x] Better error message display on errors - [x] Documentation - ~~Maybe widgets?~~ I'll do these later datasette 107914493 pull     {"url": "https://api.github.com/repos/simonw/datasette/issues/796/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 0  
631932926 MDU6SXNzdWU2MzE5MzI5MjY= 801 allow_by_query setting for configuring permissions with a SQL statement simonw 9599 closed 0   Datasette 1.0 3268330 6 2020-06-05T20:30:19Z 2020-06-11T18:58:56Z 2020-06-11T18:58:49Z OWNER   > Idea: an `"allow_sql"` key with a SQL query that gets passed the actor JSON as `:actor` and can extract the relevant keys from it and return 1 or 0. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/698#issuecomment-639787304_ See also #800 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/801/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
636511683 MDU6SXNzdWU2MzY1MTE2ODM= 830 Redesign register_facet_classes plugin hook simonw 9599 open 0   Datasette 1.0 3268330 3 2020-06-10T20:03:27Z 2021-12-16T19:58:22Z   OWNER   Nothing uses this plugin hook yet, so the design is not yet proven. I'm going to build a real plugin against it and use that process to inform any design changes that may need to be made. I'll add a warning about this to the documentation. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/830/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
639072811 MDU6SXNzdWU2MzkwNzI4MTE= 849 Rename master branch to main simonw 9599 closed 0   Datasette 1.0 3268330 10 2020-06-15T19:05:54Z 2022-10-27T13:57:08Z 2020-09-15T20:37:14Z OWNER   I was waiting for consensus to form around this (and kind-of hoping for `trunk` since I like the tree metaphor) and it looks like `main` is it. I've seen convincing arguments against `trunk` too - it indicates that the branch has some special significance like in Subversion (where all branches come from trunk) when it doesn't. So `main` is better anyway. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/849/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
642297505 MDU6SXNzdWU2NDIyOTc1MDU= 857 Comprehensive documentation for variables made available to templates simonw 9599 closed 0   Datasette 1.0 3268330 1 2020-06-20T03:19:43Z 2022-10-26T02:58:17Z 2022-10-26T02:58:17Z OWNER   Needed for the Datasette 1.0 release, so template authors can trust that Datasette is unlikely to break their templates. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/857/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
648435885 MDU6SXNzdWU2NDg0MzU4ODU= 878 New pattern for views that return either JSON or HTML, available for plugins simonw 9599 open 0   Datasette 1.0 3268330 26 2020-06-30T19:26:13Z 2022-03-19T16:19:30Z   OWNER   Can be part of #870 - refactoring existing views to use `register_routes()`. > I'm going to put the new `check_permissions()` method on `BaseView` as well. If I want that method to be available to plugins I can do so by turning that `BaseView` class into a documented API that plugins are encouraged to use themselves. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/832#issuecomment-651995453_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/878/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
668064026 MDU6SXNzdWU2NjgwNjQwMjY= 911 Rethink the --name option to "datasette publish" simonw 9599 open 0   Datasette 1.0 3268330 0 2020-07-29T18:49:49Z 2020-07-29T18:49:49Z   OWNER   `--name` works inconsistently across the different publish providers - on Cloud Run you should use `--service` instead for example. Need to review it across all of them and either remove it or clarify what it does. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/911/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
678760988 MDU6SXNzdWU2Nzg3NjA5ODg= 932 End-user documentation simonw 9599 open 0   Datasette 1.0 3268330 6 2020-08-13T22:04:39Z 2022-03-08T15:20:48Z   OWNER   Datasette's documentation is aimed at people who install and configure it. What about end users of preconfigured and deployed Datasette instances? Something that can be linked to from the Datasette UI would be really useful. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/932/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
687694947 MDU6SXNzdWU2ODc2OTQ5NDc= 954 Remove old register_output_renderer dict mechanism in Datasette 1.0 simonw 9599 open 0   Datasette 1.0 3268330 1 2020-08-28T04:04:23Z 2020-08-28T04:56:31Z   OWNER   > Documentation says that the old dictionary mechanism will be deprecated by 1.0: > > https://github.com/simonw/datasette/blob/799ecae94824640bdff21f86997f69844048d5c3/docs/plugin_hooks.rst#L460 _Originally posted by @simonw in https://github.com/simonw/datasette/issues/953#issuecomment-682312494_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/954/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 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
718259202 MDU6SXNzdWU3MTgyNTkyMDI= 1005 Remove xfail tests when new httpx is released simonw 9599 closed 0   Datasette 1.0 3268330 3 2020-10-09T16:00:19Z 2021-02-28T22:41:08Z 2021-02-28T22:41:08Z OWNER   > My `httpx` pull request adding `raw_path` support was just merged: https://github.com/encode/httpx/pull/1357 - but it's not in a release yet. > > I'm going to mark these tests as `xfail` so I can land this change - I'll remove that once an `httpx` release comes out that I can use to get the tests passing. > _Originally posted by @simonw in https://github.com/simonw/datasette/pull/1000#issuecomment-706263157_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1005/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
718540751 MDU6SXNzdWU3MTg1NDA3NTE= 1012 For 1.0 update trove classifier in setup.py simonw 9599 open 0   Datasette 1.0 3268330 5 2020-10-10T05:52:08Z 2021-11-16T13:18:36Z   OWNER   Development Status :: 5 - Production/Stable datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1012/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
730210880 MDU6SXNzdWU3MzAyMTA4ODA= 1055 query.html and table.html should share the same table implementation simonw 9599 open 0   Datasette 1.0 3268330 0 2020-10-27T07:58:21Z 2020-10-27T07:58:29Z   OWNER   In #998 I made a change that affected the table page but didn't affect the query page because I incorrectly assumed they shared rendering logic. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1055/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
732674148 MDU6SXNzdWU3MzI2NzQxNDg= 1062 Refactor .csv to be an output renderer - and teach register_output_renderer to stream all rows simonw 9599 open 0   Datasette 1.0 3268330 5 2020-10-29T21:25:02Z 2022-09-28T14:09:54Z   OWNER   This can drive the upgrade of the `register_output_renderer` hook to be able to handle streaming all rows in a large query. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1062/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
734777631 MDU6SXNzdWU3MzQ3Nzc2MzE= 1080 "View all" option for facets, to provide a (paginated) list of ALL of the facet counts plus a link to view them simonw 9599 open 0   Datasette 1.0 3268330 7 2020-11-02T19:55:06Z 2022-02-04T06:25:18Z   OWNER   Can use `/database/-/...` namespace from #296 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1080/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
749283032 MDU6SXNzdWU3NDkyODMwMzI= 1101 register_output_renderer() should support streaming data simonw 9599 open 0   Datasette 1.0 3268330 13 2020-11-24T02:17:09Z 2023-01-21T22:07:19Z   OWNER   > I'd like to implement this by first extending the `register_output_renderer()` hook to support streaming huge responses, then switching CSV to use the plugin hook in addition to TSV using it. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1096#issuecomment-732542285_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1101/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
750089847 MDU6SXNzdWU3NTAwODk4NDc= 1109 Deprecate --config in Datasette 1.0 (in favour of --setting) simonw 9599 open 0   Datasette 1.0 3268330 0 2020-11-24T21:43:57Z 2020-12-17T22:07:49Z   OWNER   I added a deprecation warning to this in #992. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1109/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
764059235 MDU6SXNzdWU3NjQwNTkyMzU= 1143 More flexible CORS support in core, to encourage good security practices yurivish 114388 open 0   Datasette 1.0 3268330 6 2020-12-12T17:06:35Z 2022-02-13T17:41:17Z   NONE   It would be nice if the `--cors` option accepted an origin regex to more securely allow secure local development. As an example, Observable notebooks namespace every user's notebooks by their username and user content is served from username.observableusercontent.com, so you would set `--cors-origin username.observableusercontent.com` to restrict access to a local development Datasette instance to only your own notebooks, rather than exposing the data to any website that makes a request. Thank you for all of your work on Datasette! datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1143/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
769520939 MDU6SXNzdWU3Njk1MjA5Mzk= 1149 Make it easier to theme Datasette with CSS simonw 9599 open 0   Datasette 1.0 3268330 3 2020-12-17T05:01:26Z 2021-03-22T21:43:16Z   OWNER   I want to theme https://datasette.io/ so that when you visit https://datasette.io/content (the Datasette UI part of it) the navigation from the parent site is used. I tried dropping in a `base.html` template like this: ```html {% extends "page_base.html" %} {% block base_extra_head %} <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> {% for url in extra_css_urls %} <link rel="stylesheet" href="{{ url.url }}"{% if url.sri %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}> {% endfor %} {% for url in extra_js_urls %} <script src="{{ url.url }}"{% if url.sri %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}></script> {% endfor %} {% block extra_head %}{% endblock %} {% endblock %} {% block extra_body_end %} {% include "_close_open_menus.html" %} {% for body_script in body_scripts %} <script>{{ body_script }}</script> {% endfor %} {% endblock %} ``` But this resulted in pages looking like this: <img width="1067" alt="content__categories__3_rows" src="https://user-images.githubusercontent.com/9599/102446045-c168e280-3fe1-11eb-94d6-e7350798eb96.png"> Note that the cog menu is broken and the filter UI is unstyled. To get these working correctly I would need to copy over a whole lot of Datasette's default CSS - and that means that when Datasette changes in the future those pages could break in subtle ways. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1149/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
770436876 MDU6SXNzdWU3NzA0MzY4NzY= 1150 Maintain an in-memory SQLite table of connected databases and their tables simonw 9599 closed 0   Datasette 1.0 3268330 32 2020-12-17T23:02:13Z 2020-12-27T14:51:39Z 2020-12-18T22:34:12Z OWNER   I want Datasette to have its own internal metadata about connected tables, to power features like a paginated searchable homepage in #461. I want this to be a SQLite table. This could also be part of the directory scanning mechanism prototyped in #672 - where Datasette can be set to continually scan a directory for new database files that it can serve. Also relevant to the Datasette Library concept in #417. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1150/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
774332247 MDExOlB1bGxSZXF1ZXN0NTQ1MjY0NDM2 1159 Improve the display of facets information lovasoa 552629 open 0   Datasette 1.0 3268330 9 2020-12-24T11:01:47Z 2023-07-31T18:57:59Z   FIRST_TIME_CONTRIBUTOR simonw/datasette/pulls/1159 This PR changes the display of facets to hopefully make them more readable. Before | After ---|--- ![image](https://user-images.githubusercontent.com/552629/103084609-b1ec2980-45df-11eb-85bc-68ab8df3e8d9.png) | ![image](https://user-images.githubusercontent.com/552629/103085220-620e6200-45e1-11eb-8189-5dd5d3e2569e.png) datasette 107914493 pull     {"url": "https://api.github.com/repos/simonw/datasette/issues/1159/reactions", "total_count": 4, "+1": 4, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 0  
779691739 MDU6SXNzdWU3Nzk2OTE3Mzk= 1176 Policy on documenting "public" datasette.utils functions simonw 9599 closed 0   Datasette 1.0 3268330 13 2021-01-05T22:55:25Z 2022-02-07T06:43:32Z 2022-02-07T06:42:58Z OWNER   https://github.com/simonw/datasette-css-properties starts [like this](https://github.com/simonw/datasette-css-properties/blob/0.1/datasette_css_properties/__init__.py#L1-L3): ```python from datasette import hookimpl from datasette.utils.asgi import Response from datasette.utils import escape_css_string, to_css_class ``` `escape_css_string` and `to_css_class` are not documented, which means relying on them is risky since there's no promise that they won't change. Would be good to figure out a policy on this, and maybe promote some of them to "documented" status. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1176/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
780153562 MDU6SXNzdWU3ODAxNTM1NjI= 1177 Ability to stream all rows as newline-delimited JSON simonw 9599 open 0   Datasette 1.0 3268330 1 2021-01-06T07:10:48Z 2022-03-21T15:08:52Z   OWNER   > Yet another use-case for this: I want to be able to stream newline-delimited JSON in order to better import into Pandas: > > pandas.read_json("https://latest.datasette.io/fixtures/compound_three_primary_keys.json?_shape=array&_nl=on", lines=True) _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1101#issuecomment-755128038_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1177/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
787098345 MDU6SXNzdWU3ODcwOTgzNDU= 1191 Ability for plugins to collaborate when adding extra HTML to blocks in default templates simonw 9599 open 0   Datasette 1.0 3268330 12 2021-01-15T18:18:51Z 2023-09-18T06:55:52Z   OWNER   Sometimes a plugin may want to add content to an existing default template - for example `datasette-search-all` adds a new search box at the top of `index.html`. I also want `datasette-upload-csvs` to add a CTA on the `database.html` page: https://github.com/simonw/datasette-upload-csvs/issues/18 Currently plugins can do this by providing a new version of the `index.html` template - but if multiple plugins try to do that only one of them will succeed. It would be better if there were known areas of those templates which plugins could add additional content to, such that multiple plugins can use the same spot. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1191/reactions", "total_count": 4, "+1": 4, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
793027837 MDU6SXNzdWU3OTMwMjc4Mzc= 1205 Rename /:memory: to /_memory simonw 9599 closed 0   Datasette 1.0 3268330 3 2021-01-25T05:04:56Z 2021-01-28T22:55:02Z 2021-01-28T22:51:42Z OWNER   For consistency with `/_internal` - and because then we don't need to escape the `:` characters. This change would need to be in before Datasette 1.0. I could land it earlier and set up redirects from the old URLs though. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1205/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
812704869 MDU6SXNzdWU4MTI3MDQ4Njk= 1237 ?_pretty=1 option for pretty-printing JSON output simonw 9599 open 0   Datasette 1.0 3268330 1 2021-02-20T20:54:40Z 2021-11-16T18:28:33Z   OWNER   Suggested by @frankieroberto in https://github.com/simonw/datasette/issues/782#issuecomment-782746755 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1237/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
957310278 MDU6SXNzdWU5NTczMTAyNzg= 1409 `default_allow_sql` setting (a re-imagining of the old `allow_sql` setting) simonw 9599 closed 0   Datasette 1.0 3268330 10 2021-07-31T19:48:56Z 2023-01-07T18:06:01Z 2023-01-05T00:51:31Z OWNER   In 49d6d2f7b0f6cb02e25022e1c9403811f1fa0a7c as part of #813 I removed the `allow_sql` setting - on the basis that users could disable the ability to execute custom SQL queries using the new permission system instead. I don't think this was the right decision. Disabling custom SQL is an important security capability, and explaining how to do it using permissions is significantly more complex than letting people know they can add `--setting allow_sql off`. So I want to bring that setting back - maybe with a different, better name - and have it modify the default for that option if the permissions system doesn't have an opinion. That way people can still use the setting but then use permissions to allow specific signed-in users access to execute SQL. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1409/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
957315684 MDU6SXNzdWU5NTczMTU2ODQ= 1410 Rename settings to `default_allow_facet` and `default_allow_download` and `default_allow_csv_stream` simonw 9599 open 0   Datasette 1.0 3268330 0 2021-07-31T20:27:12Z 2021-07-31T20:27:49Z   OWNER   > If I was prone to over-thinking (which I am) I'd note that `allow_facet` and `allow_download` and `allow_csv_stream` are all settings that do NOT have an equivalent in the newer permissions system, which is itself a little weird and inconsistent. > > So maybe there's a future task where I introduce those as both permissions and metadata `"allow_x"` blocks, then rename the settings themselves to be called `default_allow_facet` and `default_allow_download` and `default_allow_csv_stream`. > > If I was going to do that I should get it in before Datasette 1.0. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1409#issuecomment-890400425_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1410/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
973139047 MDU6SXNzdWU5NzMxMzkwNDc= 1439 Rethink how .ext formats (v.s. ?_format=) works before 1.0 simonw 9599 closed 0   Datasette 1.0 3268330 48 2021-08-17T23:32:51Z 2022-03-15T20:51:26Z 2022-03-15T20:51:26Z OWNER   Datasette currently has surprising special behaviour for if a table name ends in `.csv` - which can happen when a tool like `csvs-to-sqlite` creates tables that match the filename that they were imported from. https://latest.datasette.io/fixtures/table%2Fwith%2Fslashes.csv illustrates this behaviour: it links to `.csv` and `.json` that look like this: - https://latest.datasette.io/fixtures/table%2Fwith%2Fslashes.csv?_format=json - https://latest.datasette.io/fixtures/table%2Fwith%2Fslashes.csv?_format=csv&_size=max Where normally Datasette would add the `.csv` or `.json` extension to the path component of the URL (as seen on other pages such as https://latest.datasette.io/fixtures/facet_cities) here the [path_with_format() function](https://github.com/simonw/datasette/blob/adb5b70de5cec3c3dd37184defe606a082c232cf/datasette/utils/__init__.py#L710) notices that there is already a `.` in the path and instead adds `?_format=csv` to the query string instead. The problem with this mechanism is that it's pretty surprising. Anyone writing external code to Datasette who wants to get back the `.csv` or `.json` version giving the URL to a table page will need to know about and implement this behaviour themselves. That's likely to cause all kinds of bugs in the future. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1439/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1054243511 I_kwDOBm6k_c4-1nq3 1509 Datasette 1.0 JSON API (and documentation) simonw 9599 open 0   Datasette 1.0 3268330 3 2021-11-15T23:22:45Z 2022-03-15T20:38:56Z   OWNER   The new JSON API in a stable, documented form. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1509/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1054244712 I_kwDOBm6k_c4-1n9o 1510 Datasette 1.0 documented template context (maybe via API docs) simonw 9599 open 0   Datasette 1.0 3268330 3 2021-11-15T23:23:58Z 2023-06-28T02:05:21Z   OWNER   Documented context plus protective unit tests. Goal is that custom templates built for 1.x will not break without a 2.x release. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1510/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1054246919 I_kwDOBm6k_c4-1ogH 1511 Review plugin hooks for Datasette 1.0 simonw 9599 open 0   Datasette 1.0 3268330 1 2021-11-15T23:26:05Z 2021-11-16T01:20:14Z   OWNER   I need to perform a detailed review of the plugin interface - especially the plugin hooks like [register_facet_classes()](https://docs.datasette.io/en/stable/plugin_hooks.html#register-facet-classes) which I don't yet have complete confidence in. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1511/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1057996111 I_kwDOBm6k_c4_D71P 1517 Let `register_routes()` over-ride default routes within Datasette simonw 9599 closed 0   Datasette 1.0 3268330 2 2021-11-19T00:22:15Z 2021-11-19T03:20:00Z 2021-11-19T03:07:27Z OWNER   See https://github.com/simonw/datasette/issues/878#issuecomment-973554024_ - right now `register_routes()` can't replace default Datasette routes. It would be neat if plugins could do this - especially if there was a neat documented way for them to then re-dispatch to the original route code after making some kind of modification. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1517/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1058072543 I_kwDOBm6k_c4_EOff 1518 Complete refactor of TableView and table.html template simonw 9599 open 0   Datasette 1.0 3268330 45 2021-11-19T02:55:16Z 2022-03-15T18:35:49Z   OWNER   Split from #878. The current `TableView` class is by far the most complex part of Datasette, and the most difficult to work on: https://github.com/simonw/datasette/blob/0.59.2/datasette/views/table.py In #878 I started exploring a new pattern for building views. In doing so it became clear that `TableView` is the first beast that I need to slay - if I can refactor that into something neat the pattern for building other views will emerge as a natural consequence. I've been trying to build this as a `register_routes()` plugin, as originally suggested in #870 - though unfortunately it looks like those plugins can't replace existing Datasette default views at the moment, see #1517. [UPDATE: I was wrong about this, plugins can over-ride default views just fine] I also know that I want to have a fully documented template context for `table.html` as a major step on the way to Datasette 1.0, see #1510. All of this adds up to the `TableView` factor being a major project that will unblock a whole flurry of other things - so I'm going to work on that in this separate issue. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1518/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1065429936 I_kwDOBm6k_c4_gSuw 1532 Use datasette-table Web Component to guide the design of the JSON API for 1.0 simonw 9599 open 0   Datasette 1.0 3268330 4 2021-11-28T20:37:18Z 2022-03-16T20:13:34Z   OWNER   I realized that one of the reasons I'm having trouble committing to nailing down the JSON API for 1.0 is that I don't use it much myself - I use the `?_shape=array` one quite often, but I don't have any projects that are using the default, more fully-featured API. As an experiment I built a Web Component for embedding Datasette tables on pages - https://github.com/simonw/datasette-table - and I think it's actually going to be a really useful tool for helping me dog food the v1.0 API design. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1532/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1065431383 I_kwDOBm6k_c4_gTFX 1533 Add `Link: rel="alternate"` header pointing to JSON for a table/query simonw 9599 closed 0   Datasette 1.0 3268330 4 2021-11-28T20:43:25Z 2022-02-02T07:56:51Z 2022-02-02T07:49:33Z OWNER   Originally explored in https://github.com/simonw/datasette-notebook/issues/2#issuecomment-980789406 - I wanted an efficient way to scan a list of URLs and figure out which if any of those corresponded to Datasette tables, canned queries or SQL output that could be represented as a table on a page. It looks like a neat way to do that is with ` Link:` header like this: `Link: http://127.0.0.1:8058/fixtures/compound_three_primary_keys.json; rel="alternate"; type="application/datasette+json"` I can put a `<link href=...` in the page header too. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1533/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1077620955 I_kwDOBm6k_c5AOzDb 1549 Redesign CSV export to improve usability fgregg 536941 open 0   Datasette 1.0 3268330 5 2021-12-11T19:02:12Z 2022-04-04T11:17:13Z   CONTRIBUTOR   *Original title: Set content type for CSV so that browsers will attempt to download instead opening in the browser* Right now, if the user clicks on the CSV related to a <s>table or a</s> query, the response header for the content type is "content-type: text/plain; charset=utf-8" Most browsers will try to open a file with this content-type in the browser. This is not what most people want to do, and lots of folks don't know that if they want to download the CSV and open it in the a spreadsheet program they next need to save the page through their browser. It would be great if the response header could be something like ``` 'Content-type: text/csv'); 'Content-disposition: attachment;filename=MyVerySpecial.csv'); ``` which would lead browsers to open a download dialog. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1549/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1082584499 I_kwDOBm6k_c5Ahu2z 1558 Redesign `facet_results` JSON structure prior to Datasette 1.0 simonw 9599 open 0   Datasette 1.0 3268330 3 2021-12-16T19:45:10Z 2023-01-09T15:31:17Z   OWNER   > Decision: as an initial fix I'm going to de-duplicate those keys by using `tags__array` etc - with a `_2` on the end if that key is already used. > > I'll open a separate issue to redesign this better for Datasette 1.0. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/625#issuecomment-996130862_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1558/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1087181951 I_kwDOBm6k_c5AzRR_ 1576 Traces should include SQL executed by subtasks created with `asyncio.gather` simonw 9599 closed 0   Datasette 1.0 3268330 12 2021-12-22T20:52:02Z 2022-02-05T05:21:35Z 2022-02-05T05:19:53Z OWNER   I tried running some parallel SQL queries using `asyncio.gather()` but the SQL that was executed didn't show up in the trace rendered by https://datasette.io/plugins/datasette-pretty-traces I realized that was because traces are keyed against the current task ID, which changes when a sub-task is run using `asyncio.gather` or similar. The faceting and suggest faceting queries are missing from this trace: ![image](https://user-images.githubusercontent.com/9599/147153855-2d611f07-922a-4d18-9e6e-4be89e010dc4.png) > The reason they aren't showing up in the traces is that traces are stored just for the currently executing `asyncio` task ID: https://github.com/simonw/datasette/blob/ace86566b28280091b3844cf5fbecd20158e9004/datasette/tracer.py#L13-L25 > > This is so traces for other incoming requests don't end up mixed together. But there's no current mechanism to track async tasks that are effectively "child tasks" of the current request, and hence should be tracked the same. > > https://stackoverflow.com/a/69349501/6083 suggests that you pass the task ID as an argument to the child tasks that are executed using `asyncio.gather()` to work around this kind of problem. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1518#issuecomment-999870993_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1576/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1087913724 I_kwDOBm6k_c5A2D78 1577 Drop support for Python 3.6 simonw 9599 closed 0   Datasette 1.0 3268330 6 2021-12-23T18:17:03Z 2022-01-25T23:30:03Z 2022-01-20T04:31:41Z OWNER   *Original title: Decide when to drop support for Python 3.6* > `context_vars` can solve this but they were introduced in Python 3.7: https://www.python.org/dev/peps/pep-0567/ > > Python 3.6 support ends in a few days time, and it looks like Glitch has updated to 3.7 now - so maybe I can get away with Datasette needing 3.7 these days? > > Tweeted about that here: https://twitter.com/simonw/status/1473761478155010048 _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1576#issuecomment-999878907_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1577/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1108235694 I_kwDOBm6k_c5CDlWu 1603 A proper favicon simonw 9599 closed 0   Datasette 1.0 3268330 19 2022-01-19T15:24:55Z 2022-03-19T04:04:49Z 2022-01-20T06:07:31Z OWNER   Tips here: https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/ - I think a PNG served at `/favicon.ico` is the best option, since safari doesn't support SVG yet. Relevant code: https://github.com/simonw/datasette/blob/cb29119db9115b1f40de2fb45263ed77e3bfbb3e/datasette/app.py#L182-L183 I can reuse the icon for https://datasette.io/desktop datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1603/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1109783030 I_kwDOBm6k_c5CJfH2 1607 More detailed information about installed SpatiaLite version simonw 9599 closed 0   Datasette 1.0 3268330 2 2022-01-20T21:28:03Z 2022-02-09T06:42:02Z 2022-02-09T06:32:28Z OWNER   https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.0.0.html#version has a whole bunch of interesting functions for things like `freexl_version()` and `geos_version()` and `HasMathSQL()` and suchlike. These could be shown on the `/-/versions` page. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1607/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1114147905 I_kwDOBm6k_c5CaIxB 1612 Move canned queries closer to the SQL input area jsfenfen 639012 closed 0   Datasette 1.0 3268330 5 2022-01-25T17:06:39Z 2022-03-19T04:04:49Z 2022-01-25T18:34:21Z CONTRIBUTOR   *Original title: Consider placing example queries above the sql input?* Hi! Have been enjoying deploying ad hoc datasettes for collaborators to pick over! I keep finding myself manually "fixing" the database.html template so that the "example queries" (canned queries) appear directly *over* the sql box? So they are sorta more a suggestion for collaborators who aren't inclined to write their own queries? My sense is any time I go to the trouble of writing canned queries my users should see 'em? (( I have also considered a client-side reactive-ish option where selecting a query just places the raw SQL in the box and doesn't execute it, but this seems to end up being an inconvenience, rather than a teaching tool. )) datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1612/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1121618041 I_kwDOBm6k_c5C2oh5 1620 Link: rel="alternate" to JSON for queries too simonw 9599 closed 0   Datasette 1.0 3268330 3 2022-02-02T08:02:42Z 2022-02-02T21:53:02Z 2022-02-02T21:33:00Z OWNER   Following: - #1533 I implemented it for tables and rows but I should have done queries as well. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1620/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1122413719 I_kwDOBm6k_c5C5qyX 1621 Test against Python 3.11 dev version simonw 9599 closed 0   Datasette 1.0 3268330 0 2022-02-02T21:38:57Z 2022-03-19T04:04:49Z 2022-02-02T21:58:54Z OWNER   To avoid another surprise like we got with 3.10: https://simonwillison.net/2021/Oct/9/finding-and-reporting-a-bug/ From a quick GitHub code search it looks like `3.11-dev` should work: https://cs.github.com/urllib3/urllib3/blob/7bec77e81aa0a194c98381053225813f5347c9d2/.github/workflows/ci.yml#L60 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1621/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1122416919 I_kwDOBm6k_c5C5rkX 1623 /-/patterns returns link: alternate JSON header to 404 simonw 9599 closed 0   Datasette 1.0 3268330 2 2022-02-02T21:42:49Z 2022-03-19T04:04:49Z 2022-02-02T21:48:56Z OWNER   Bug from: - #1620 ``` % curl -s -I 'https://latest.datasette.io/-/patterns' | grep link link: https://latest.datasette.io/-/patterns.json; rel="alternate"; type="application/json+datasette" ``` datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1623/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1125576543 I_kwDOBm6k_c5DFu9f 1630 Review datasette.utils and decide which functions should be documented for 1.0 simonw 9599 open 0   Datasette 1.0 3268330 0 2022-02-07T06:39:52Z 2022-02-07T06:39:52Z   OWNER   Follows: - #1176 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1630/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1126604194 I_kwDOBm6k_c5DJp2i 1632 datasette one.db one.db opens database twice, as one and one_2 simonw 9599 closed 0   Datasette 1.0 3268330 6 2022-02-07T23:14:47Z 2022-03-19T04:04:49Z 2022-02-07T23:50:01Z OWNER   > ``` > % mkdir /tmp/data > % cp ~/Dropbox/Development/datasette/fixtures.db /tmp/data > % datasette /tmp/data/*.db /tmp/data/created.db --create -p 8852 > ... > INFO: Uvicorn running on http://127.0.0.1:8852 (Press CTRL+C to quit) > ^CINFO: Shutting down > % datasette /tmp/data/*.db /tmp/data/created.db --create -p 8852 > ... > INFO: 127.0.0.1:49533 - "GET / HTTP/1.1" 200 OK > ``` > The first time I ran Datasette I got two databases - `fixtures` and `created` > > BUT... when I ran Datasette the second time it looked like this: > > <img width="697" alt="image" src="https://user-images.githubusercontent.com/9599/152887735-5e2b4f21-001d-4e7a-a23a-16a32fdcf554.png"> > > This is the same result you get if you run: > > datasette /tmp/data/fixtures.db /tmp/data/created.db /tmp/data/created.db > > This is caused by this Datasette issue: > - https://github.com/simonw/datasette/issues/509 > > So... either I teach Datasette to de-duplicate multiple identical file paths passed to the command, or I can't use `/data/*.db` in the `Dockerfile` here and I need to go back to other solutions for the challenge described in this comment: https://github.com/simonw/datasette-publish-fly/pull/12#issuecomment-1031971831 _Originally posted by @simonw in https://github.com/simonw/datasette-publish-fly/pull/12#issuecomment-1032029874_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1632/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1131295060 I_kwDOBm6k_c5DbjFU 1634 Update Dockerfile generated by `datasette publish` simonw 9599 open 0   Datasette 1.0 3268330 4 2022-02-11T00:07:26Z 2022-03-11T17:38:08Z   OWNER   The generated `Dockerfile` currently looks something like this: ```Dockerfile FROM python:3.8 COPY . /app WORKDIR /app ENV DATASETTE_SECRET 'edab49cbc5d5f6f33238f54852037e3fee710821960b73edd2ce743454182ae2' RUN pip install -U datasette datasette-auth-passwords datasette-tiddlywiki datasette-graphql RUN datasette inspect fixtures.db other.db --inspect-file inspect-data.json ENV PORT 8080 EXPOSE 8080 CMD datasette serve --host 0.0.0.0 -i fixtures.db -i other.db --cors --inspect-file inspect-data.json --metadata metadata.json --create --port $PORT /data/*.db ``` This is still on Python 3.8, and it generates a pretty large image compared to the `Dockerfile` used for https://hub.docker.com/datasetteproject/datasette - https://github.com/simonw/datasette/blob/0.60.2/Dockerfile Here's the code that generates it: https://github.com/simonw/datasette/blob/7d24fd405f3c60e4c852c5d746c91aa2ba23cf5b/datasette/utils/__init__.py#L389-L400 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1634/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 2, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1154399841 I_kwDOBm6k_c5Ezr5h 1645 Sensible `cache-control` headers for static assets, including those served by plugins curiousleo 697092 open 0   Datasette 1.0 3268330 4 2022-02-28T18:12:03Z 2022-03-08T02:59:29Z   NONE   ## What I'm seeing With `default_cache_ttl = 86400`, I see the following: A table view returns `Cache-control: max-age=86400`: ![Screenshot_20220228_190000](https://user-images.githubusercontent.com/697092/156034352-4d64683e-39c8-49af-81df-0217a5957bbd.png) A static asset returns no `Cache-control` header: ![Screenshot_20220228_185933](https://user-images.githubusercontent.com/697092/156034363-d0b03cc2-5889-4ed2-b601-8c1846b8469a.png) ## What I expected to see I expected the static asset to return a `Cache-control` header indicating that this response can be cached. ## Why this matters I'm productionising a Datasette deployment right now and was looking into putting it behind a Varnish instance. I was surprised to see requests for static assets being served from Datasette rather than Varnish, this is what led me to look more closely at the response headers. While Datasette serves those static assets pretty quickly, I don't see why Datasette should serve them. By their nature, static assets like images and JS files are very cacheable, so it should be easy to serve them from a cache like Varnish. (Note that Varnish can easily be configured to override this header, enabling caching for static assets. But it would be better if this override was not necessary.) ## Discussion It seems clear to me that serving static assets without a `Cache-control` header is not ideal. I see two options here: A. Static assets use the same logic as table / SQL views to set the `Cache-control` header based on `default_cache_ttl`. B. An additional setting for static assets is introduced (`default_static_cache_ttl`, say). datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1645/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1160750713 I_kwDOBm6k_c5FL6Z5 1650 Implement redirects from old % encoding to new dash encoding simonw 9599 closed 0   Datasette 1.0 3268330 5 2022-03-06T23:40:02Z 2022-03-07T19:26:15Z 2022-03-07T19:26:14Z OWNER   > One big advantage to this scheme is that redirecting old links to `%2F` pages (e.g. https://fivethirtyeight.datasettes.com/fivethirtyeight/twitter-ratio%2Fsenators) is easy - if you see a `%` in the `raw_path`, redirect to that page with the `%` replaced by `-`. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1439#issuecomment-1060044007_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1650/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1161584460 I_kwDOBm6k_c5FPF9M 1651 Get rid of the no-longer necessary ?_format=json hack for tables called x.json simonw 9599 closed 0   Datasette 1.0 3268330 8 2022-03-07T15:40:42Z 2022-03-19T04:04:50Z 2022-03-15T18:25:42Z OWNER   Tidy up from: - #1439 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1651/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1168995756 I_kwDOBm6k_c5FrXWs 1657 Tilde encoding: use ~ instead of - for dash-encoding simonw 9599 closed 0   Datasette 1.0 3268330 12 2022-03-14T22:55:17Z 2022-03-15T18:25:11Z 2022-03-15T18:01:58Z OWNER   Refs #1439 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1657/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1169840669 I_kwDOBm6k_c5Fulod 1658 Revert main to version that passes tests simonw 9599 closed 0   Datasette 1.0 3268330 1 2022-03-15T15:37:02Z 2022-03-19T04:04:50Z 2022-03-15T15:42:58Z OWNER   > I've made a real mess of this. I'm going to revert Datasette`main` back to the last commit that passed the tests and try this again in a branch. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1657#issuecomment-1068125636_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1658/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1170144879 I_kwDOBm6k_c5Fvv5v 1660 Refactor and simplify Datasette routing and views simonw 9599 closed 0   Datasette 1.0 3268330 8 2022-03-15T19:56:56Z 2022-03-21T19:19:12Z 2022-03-21T19:19:01Z OWNER   While working on: - https://github.com/simonw/datasette/issues/1657 - https://github.com/simonw/datasette/issues/1439 It became very clear that the least maintainable part of Datasette at the moment is the way routing to the database, table and row views work - in particular the subclassing mechanism with BaseView and DataView, but also the complex variety of ways in which the URL routes capture different named regular expression groups. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1660/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1170355774 I_kwDOBm6k_c5FwjY- 1661 Remove Hashed URL mode simonw 9599 closed 0   Datasette 1.0 3268330 10 2022-03-15T23:13:56Z 2022-03-19T00:37:37Z 2022-03-19T00:37:36Z OWNER   It's now handled by a plugin instead: - #647 - https://github.com/simonw/datasette-hashed-urls/issues/3 https://github.com/simonw/datasette-hashed-urls Sub-tasks: - [x] Remove hashed URL mode implementation - [x] Update documentation - [x] Ensure `--setting hash_urls 1` shows a useful message datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1661/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1170554975 I_kwDOBm6k_c5FxUBf 1663 Document the internals that were used in datasette-hashed-urls simonw 9599 closed 0   Datasette 1.0 3268330 2 2022-03-16T05:17:08Z 2022-03-19T04:04:50Z 2022-03-17T21:32:38Z OWNER   The https://github.com/simonw/datasette-hashed-urls used a couple of currently undocumented features: - `db.hash` - `Datasette(..., immutables=[...])` datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1663/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1174162781 I_kwDOBm6k_c5F_E1d 1666 Refactor URL routing to enable testing simonw 9599 closed 0   Datasette 1.0 3268330 3 2022-03-19T03:52:29Z 2022-03-19T16:32:03Z 2022-03-19T16:32:03Z OWNER   I ran into some bugs earlier with URL routing - having more robust testing around this (especially since they are defined using regular expressions) would be really useful. - A utility function that resolves a path against a list of reflexes and returns the match - Make the routes and regular expressions available from a private Datasette method - Add tests that exercise them Related: - #1660 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1666/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1174302994 I_kwDOBm6k_c5F_nES 1667 Make route matched pattern groups more consistent simonw 9599 closed 0   Datasette 1.0 3268330 3 2022-03-19T16:32:35Z 2022-03-19T20:37:42Z 2022-03-19T20:37:41Z OWNER   > ... highlights how inconsistent the way the capturing works is. Especially `as_format` which can be `None` or `""` or `.json` or `json` or not used at all in the case of `TableView`. https://github.com/simonw/datasette/blob/764738dfcb16cd98b0987d443f59d5baa9d3c332/tests/test_routes.py#L12-L36 _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1666#issuecomment-1073039670_ Part of: - #1660 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1667/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1174306154 I_kwDOBm6k_c5F_n1q 1668 Introduce concept of a database `route`, separate from its name simonw 9599 closed 0   Datasette 1.0 3268330 20 2022-03-19T16:48:28Z 2022-03-20T16:43:16Z 2022-03-20T16:43:16Z OWNER   Some issues came up in the new `datasette-hashed-urls` plugin relating to the way it renames databases on startup to achieve unique URLs that depend on the database SHA-256 content: - https://github.com/simonw/datasette-hashed-urls/issues/10 - https://github.com/simonw/datasette-hashed-urls/issues/9 - https://github.com/simonw/datasette-hashed-urls/issues/8 All three of these could be addressed by making the "path" concept for a database (the `/foo` bit where it is served) work independently of the database's name, which would be used for default display and also as the alias when configuring cross-database aliases. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1668/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1174697144 I_kwDOBm6k_c5GBHS4 1672 Refactor CSV handling code out of DataView simonw 9599 open 0   Datasette 1.0 3268330 1 2022-03-20T21:47:00Z 2022-03-20T21:52:39Z   OWNER   > I think the way to get rid of most of the remaining complexity in `DataView` is to refactor how CSV stuff works - pulling it in line with other export factors and extracting the streaming mechanism. Opening a fresh issue for that. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1660#issuecomment-1073355032_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1672/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1174717287 I_kwDOBm6k_c5GBMNn 1674 Tweak design of /.json simonw 9599 open 0   Datasette 1.0 3268330 1 2022-03-20T22:58:01Z 2022-03-20T22:58:40Z   OWNER   https://latest.datasette.io/.json Currently: ```json { "_memory": { "name": "_memory", "hash": null, "color": "a6c7b9", "path": "/_memory", "tables_and_views_truncated": [], "tables_and_views_more": false, "tables_count": 0, "table_rows_sum": 0, "show_table_row_counts": false, "hidden_table_rows_sum": 0, "hidden_tables_count": 0, "views_count": 0, "private": false }, "fixtures": { "name": "fixtures", "hash": "645005884646eb941c89997fbd1c0dd6be517cb1b493df9816ae497c0c5afbaa", "color": "645005", "path": "/fixtures", "tables_and_views_truncated": [ { "name": "compound_three_primary_keys", "columns": [ "pk1", "pk2", "pk3", "content" ], "primary_keys": [ "pk1", "pk2", "pk3" ], "count": 1001, "hidden": false, "fts_table": null, "num_relationships_for_sorting": 0, "private": false }, ``` As-of this issue the `"path"` key is confusing, it doesn't match what https://latest.datasette.io/-/databases returns: - #1668 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1674/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1175690070 I_kwDOBm6k_c5GE5tW 1676 Reconsider ensure_permissions() logic, can it be less confusing? simonw 9599 open 0   Datasette 1.0 3268330 3 2022-03-21T17:14:57Z 2022-12-02T01:23:40Z   OWNER   > Updated documentation: https://github.com/simonw/datasette/blob/e627510b760198ccedba9e5af47a771e847785c9/docs/internals.rst#await-ensure_permissionsactor-permissions > >> This method allows multiple permissions to be checked at onced. It raises a `datasette.Forbidden` exception if any of the checks are denied before one of them is explicitly granted. >> >> This is useful when you need to check multiple permissions at once. For example, an actor should be able to view a table if either one of the following checks returns `True` or not a single one of them returns `False`: > > That's pretty hard to understand! I'm going to open a separate issue to reconsider if this is a useful enough abstraction given how confusing it is. _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1675#issuecomment-1074177827_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1676/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1175694248 I_kwDOBm6k_c5GE6uo 1677 Remove `check_permission()` from `BaseView` simonw 9599 closed 0   Datasette 1.0 3268330 1 2022-03-21T17:18:18Z 2022-03-21T18:45:04Z 2022-03-21T18:45:03Z OWNER   Follow-on from: - #1675 Refs: - #1660 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1677/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1175715988 I_kwDOBm6k_c5GFACU 1678 Make `check_visibility()` a documented API simonw 9599 closed 0   Datasette 1.0 3268330 1 2022-03-21T17:30:34Z 2022-03-21T19:04:03Z 2022-03-21T19:01:46Z OWNER   Spotted this while working on: - #1677 https://github.com/simonw/datasette/blob/e627510b760198ccedba9e5af47a771e847785c9/datasette/utils/__init__.py#L1005-L1021 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1678/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1175854982 I_kwDOBm6k_c5GFh-G 1679 Research: how much overhead does the n=1 time limit have? simonw 9599 closed 0   Datasette 1.0 3268330 11 2022-03-21T19:27:46Z 2022-03-21T21:55:57Z 2022-03-21T21:55:56Z OWNER   https://github.com/simonw/datasette/blob/1a7750eb29fd15dd2eea3b9f6e33028ce441b143/datasette/utils/__init__.py#L181-L200 ```python @contextmanager def sqlite_timelimit(conn, ms): deadline = time.perf_counter() + (ms / 1000) # n is the number of SQLite virtual machine instructions that will be # executed between each check. It's hard to know what to pick here. # After some experimentation, I've decided to go with 1000 by default and # 1 for time limits that are less than 50ms n = 1000 if ms < 50: n = 1 def handler(): if time.perf_counter() >= deadline: return 1 conn.set_progress_handler(handler, n) try: yield finally: conn.set_progress_handler(None, n) ``` How often do I set a time limit of 50 or less? How much slower does it go thanks to this code? datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1679/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1175894898 I_kwDOBm6k_c5GFrty 1680 Consider simplifying permissions for 1.0 simonw 9599 open 0   Datasette 1.0 3268330 0 2022-03-21T20:17:29Z 2022-03-21T20:17:29Z   OWNER   Permission checks right now can express one of three opinions: - `False` means "so not grant this permisson" - `True` means "grant this permission" - `None` means "I have no opinion" But... there's also a concept of a "default" for a given permission check, which might be `False` or `True`. I worry this is too complicated. Could this be simplified before 1.0? In particular the default concept. See also: - #1676 datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1680/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1189113609 I_kwDOBm6k_c5G4G8J 1697 `Request.fake(..., url_vars={})` simonw 9599 closed 0   Datasette 1.0 3268330 1 2022-04-01T01:48:40Z 2022-04-01T02:02:18Z 2022-04-01T02:02:10Z OWNER   I just created an alternative `.fake()` method because I wanted to fake the `url_vars` captured in the route as well: ```python from datasette.utils.asgi import Request class Request(Request): @classmethod def fake(cls, path_with_query_string, method="GET", scheme="http", url_vars=None): """Useful for constructing Request objects for tests""" path, _, query_string = path_with_query_string.partition("?") scope = { "http_version": "1.1", "method": method, "path": path, "raw_path": path_with_query_string.encode("latin-1"), "query_string": query_string.encode("latin-1"), "scheme": scheme, "type": "http", } if url_vars: scope["url_route"] = { "kwargs": url_vars } return cls(scope, None) ``` datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1697/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1194790504 I_kwDOBm6k_c5HNw5o 1701 Use + for spaces instead of ~20 simonw 9599 closed 0   Datasette 1.0 3268330 0 2022-04-06T15:40:48Z 2022-04-06T15:55:10Z 2022-04-06T15:55:05Z OWNER   Tilde encoding introduced in #1657 means that database files with spaces in the name - e.g. the Apple Mail `Envelope Index` database - end up with URLs like this: http://127.0.0.1:8001/Envelope~20Index I think this would be prettier: http://127.0.0.1:9933/Envelope+Index datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1701/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}   completed
1197925865 I_kwDOBm6k_c5HZuXp 1704 File PRs against incompatible plugins pinning to datasette<1.0 simonw 9599 open 0   Datasette 1.0 3268330 0 2022-04-08T23:15:30Z 2022-04-08T23:15:30Z   OWNER   As part of the preparation for the 1.0 release, test all existing known plugins against the alpha. For any that break, submit a PR suggesting they pin to a version <1.0 - and include a link to the documentation on how to upgrade the plugin for 1.0. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1704/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1386854246 I_kwDOBm6k_c5Sqbdm 1822 Switch to keyword-only arguments for a bunch of internal methods simonw 9599 open 0   Datasette 1.0 3268330 3 2022-09-26T23:20:38Z 2022-09-27T00:44:04Z   OWNER   This is a good idea, and one that needs to happen before Datasette 1.0: > While you are adding features, would you be future-proofing your APIs if you switched over some arguments over to keyword-only arguments or would that be too disruptive? > > Thinking out loud: > > ``` > async def render_template( > self, templates, *, context=None, plugin_context=None, request=None, view_name=None > ): > ``` _Originally posted by @jefftriplett in https://github.com/simonw/datasette/issues/1817#issuecomment-1256781274_ datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1822/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    
1454532488 I_kwDOBm6k_c5WsmeI 1902 Document {% block crumbs %} for plugin authors simonw 9599 open 0   Datasette 1.0 3268330 0 2022-11-18T06:16:30Z 2022-11-18T06:16:39Z   OWNER   > For `datasette-copyable` I want to show breadcrumbs that take database/instance permissions into account, so I'm removing `{% block nav %}` entirely and replacing it with this: > > ```html+jinja > {% block crumbs %} > {{ crumbs.nav(request=request, database=database, table=table) }} > {% endblock %} > ``` _Originally posted by @simonw in https://github.com/simonw/datasette/issues/1901#issuecomment-1319588163_ I should document this. datasette 107914493 issue     {"url": "https://api.github.com/repos/simonw/datasette/issues/1902/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}    

Next page

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 55.393ms · About: simonw/datasette-graphql