github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/243#issuecomment-391030083 | https://api.github.com/repos/simonw/datasette/issues/243 | 391030083 | MDEyOklzc3VlQ29tbWVudDM5MTAzMDA4Mw== | 9599 | 2018-05-22T15:17:10Z | 2018-05-22T15:17:10Z | OWNER | See also #278 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
318737808 | |
https://github.com/simonw/datasette/issues/276#issuecomment-391025841 | https://api.github.com/repos/simonw/datasette/issues/276 | 391025841 | MDEyOklzc3VlQ29tbWVudDM5MTAyNTg0MQ== | 9599 | 2018-05-22T15:06:36Z | 2018-05-22T15:06:36Z | OWNER | The other reason I mention plugins is that I have an idea to outlaw JavaScript entirely from Datasette core and instead encourage ALL JavaScript functionality to move into plugins.right now that just means CodeMirror. I may set up some of those plugins (like CodeMirror) as default dependencies so you get them from "pip install datasette". I like the neatness of saying that core Datasette is a very simple JSON + HTML application, then encouraging people to go completely wild with JavaScript in the plugins. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324835838 | |
https://github.com/simonw/datasette/issues/278#issuecomment-390993861 | https://api.github.com/repos/simonw/datasette/issues/278 | 390993861 | MDEyOklzc3VlQ29tbWVudDM5MDk5Mzg2MQ== | 9599 | 2018-05-22T13:40:14Z | 2018-05-22T14:38:05Z | OWNER | If we can't get `import sqlite3` to load the latest version but we can get `import pysqlite3` to work that's fine too - I can teach Datasette to import the best available version. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
325294102 | |
https://github.com/simonw/datasette/issues/272#issuecomment-391011268 | https://api.github.com/repos/simonw/datasette/issues/272 | 391011268 | MDEyOklzc3VlQ29tbWVudDM5MTAxMTI2OA== | 9599 | 2018-05-22T14:28:12Z | 2018-05-22T14:28:12Z | OWNER | I think I can do this almost entirely within my existing BaseView class structure. First, decouple the async data() methods by teaching them to take a querystring object as an argument instead of a Sanic request object. The get() method can then send that new object instead of a request. Next teach the base class how to obey the ASGI protocol. I should be able to get support for both Sanic and uvicorn/daphne working in the same codebase, which will make it easy to compare their performance. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324188953 | |
https://github.com/simonw/datasette/issues/273#issuecomment-391003285 | https://api.github.com/repos/simonw/datasette/issues/273 | 391003285 | MDEyOklzc3VlQ29tbWVudDM5MTAwMzI4NQ== | 9599 | 2018-05-22T14:06:40Z | 2018-05-22T14:06:40Z | OWNER | That looks great. I don't think it's possible to derive the current commit version from the .zip downloaded directly from GitHub, so needing to pip install via git+https feels reasonable to me. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324451322 | |
https://github.com/simonw/datasette/issues/276#issuecomment-391000659 | https://api.github.com/repos/simonw/datasette/issues/276 | 391000659 | MDEyOklzc3VlQ29tbWVudDM5MTAwMDY1OQ== | 9599 | 2018-05-22T13:59:27Z | 2018-05-22T13:59:27Z | OWNER | Right now the plugin stuff is early enough that I'd like to get as many potential plugin hooks as possible crafted out A much easier to judge if they should be added as actual hooks if we have a working branch prototype of them. Some kind of mechanism for custom column display is already needed - eg there are columns where I want to say "render this as markdown" or "URLify any links in this text" - or even "use this date format" or "add commas to this integer". You can do it with a custom template but a lower-level mechanism would be nicer. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324835838 | |
https://github.com/simonw/datasette/issues/255#issuecomment-390999055 | https://api.github.com/repos/simonw/datasette/issues/255 | 390999055 | MDEyOklzc3VlQ29tbWVudDM5MDk5OTA1NQ== | 9599 | 2018-05-22T13:54:55Z | 2018-05-22T13:54:55Z | OWNER | This shipped in Datasette 0.22. Here's my blog post about it: https://simonwillison.net/2018/May/20/datasette-facets/ | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/278#issuecomment-390993397 | https://api.github.com/repos/simonw/datasette/issues/278 | 390993397 | MDEyOklzc3VlQ29tbWVudDM5MDk5MzM5Nw== | 9599 | 2018-05-22T13:38:57Z | 2018-05-22T13:38:57Z | OWNER | Useful GitHub code search: https://github.com/search?utf8=✓&q=%22libspatialite-4.4.0%22+%22RC0%22&type=Code | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
325294102 | |
https://github.com/simonw/datasette/issues/278#issuecomment-390991640 | https://api.github.com/repos/simonw/datasette/issues/278 | 390991640 | MDEyOklzc3VlQ29tbWVudDM5MDk5MTY0MA== | 9599 | 2018-05-22T13:33:46Z | 2018-05-22T13:33:46Z | OWNER | For SpatiaLite this example may be useful - though it's building 4.3.0 and not 4.4.0: https://github.com/terranodo/spatialite-docker/blob/master/Dockerfile | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
325294102 | |
https://github.com/simonw/datasette/pull/277#issuecomment-390804333 | https://api.github.com/repos/simonw/datasette/issues/277 | 390804333 | MDEyOklzc3VlQ29tbWVudDM5MDgwNDMzMw== | 9599 | 2018-05-21T22:40:16Z | 2018-05-21T22:43:50Z | OWNER | We should merge this before refactoring the tests though, because that way we don't couple the new tests to the verification of this change. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324836533 | |
https://github.com/simonw/datasette/issues/276#issuecomment-390707760 | https://api.github.com/repos/simonw/datasette/issues/276 | 390707760 | MDEyOklzc3VlQ29tbWVudDM5MDcwNzc2MA== | 9599 | 2018-05-21T16:30:35Z | 2018-05-21T16:30:35Z | OWNER | This probably needs to be in a plugin simply because getting Spatialite compiled and installed is a bit of a pain. It's a great opportunity to expand the plugin hooks in useful ways though. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324835838 | |
https://github.com/simonw/datasette/pull/277#issuecomment-390707183 | https://api.github.com/repos/simonw/datasette/issues/277 | 390707183 | MDEyOklzc3VlQ29tbWVudDM5MDcwNzE4Mw== | 9599 | 2018-05-21T16:28:39Z | 2018-05-21T16:28:39Z | OWNER | This is definitely a big improvement. I'd like to refactor the unit tests that cover .inspect() too - currently they are a huge ugly blob at the top of test_api.py | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324836533 | |
https://github.com/simonw/datasette/issues/274#issuecomment-390496376 | https://api.github.com/repos/simonw/datasette/issues/274 | 390496376 | MDEyOklzc3VlQ29tbWVudDM5MDQ5NjM3Ng== | 9599 | 2018-05-20T17:04:55Z | 2018-05-20T17:04:55Z | OWNER | http://datasette.readthedocs.io/en/latest/config.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324652142 | |
https://github.com/simonw/datasette/issues/274#issuecomment-390433040 | https://api.github.com/repos/simonw/datasette/issues/274 | 390433040 | MDEyOklzc3VlQ29tbWVudDM5MDQzMzA0MA== | 9599 | 2018-05-19T21:12:42Z | 2018-05-20T16:01:03Z | OWNER | Could also support these as optional environment variables - `DATASETTE_NAMEOFSETTING` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324652142 | |
https://github.com/simonw/datasette/issues/264#issuecomment-390105943 | https://api.github.com/repos/simonw/datasette/issues/264 | 390105943 | MDEyOklzc3VlQ29tbWVudDM5MDEwNTk0Mw== | 9599 | 2018-05-18T06:18:00Z | 2018-05-18T06:18:00Z | OWNER | Docs: http://datasette.readthedocs.io/en/latest/limits.html#default-facet-size | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323673899 | |
https://github.com/simonw/datasette/issues/270#issuecomment-390105147 | https://api.github.com/repos/simonw/datasette/issues/270 | 390105147 | MDEyOklzc3VlQ29tbWVudDM5MDEwNTE0Nw== | 9599 | 2018-05-18T06:13:07Z | 2018-05-18T06:13:07Z | OWNER | I'm going to add a `/-/limits` page that shows the current limits. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323830051 | |
https://github.com/simonw/datasette/issues/271#issuecomment-389989615 | https://api.github.com/repos/simonw/datasette/issues/271 | 389989615 | MDEyOklzc3VlQ29tbWVudDM4OTk4OTYxNQ== | 9599 | 2018-05-17T19:56:13Z | 2018-05-17T19:56:13Z | OWNER | From https://www.sqlite.org/c3ref/open.html > **immutable**: The immutable parameter is a boolean query parameter that indicates that the database file is stored on read-only media. When immutable is set, SQLite assumes that the database file cannot be changed, even by a process with higher privilege, and so the database is opened read-only and all locking and change detection is disabled. Caution: Setting the immutable property on a database file that does in fact change can result in incorrect query results and/or SQLITE_CORRUPT errors. See also: SQLITE_IOCAP_IMMUTABLE. So this would probably have to be a new mode, `datasette serve --detect-db-changes`, which no longer opens in immutable mode. Or maybe current behavior becomes not-the-default and you opt into it with `datasette serve --immutable` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324162476 | |
https://github.com/simonw/datasette/issues/271#issuecomment-389989015 | https://api.github.com/repos/simonw/datasette/issues/271 | 389989015 | MDEyOklzc3VlQ29tbWVudDM4OTk4OTAxNQ== | 9599 | 2018-05-17T19:54:10Z | 2018-05-17T19:54:10Z | OWNER | This is a departure from how Datasette has been designed so far, and it may turn out that it's not feasible or it requires too many philosophical changes to be worthwhile. If we CAN do it though it would mean Datasette could stay running pointed at a directory on disk and new SQLite databases could be dropped into that directory by another process and served directly as they become available. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
324162476 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389894382 | https://api.github.com/repos/simonw/datasette/issues/266 | 389894382 | MDEyOklzc3VlQ29tbWVudDM4OTg5NDM4Mg== | 9599 | 2018-05-17T14:51:13Z | 2018-05-17T14:53:23Z | OWNER | I should definitely sanity check if the `_next=` route really is the most efficient way to build this. It may turn out that iterating over a SQLite cursor with a million rows in it is super-efficient and would provide much more reliable performance (plus solve the problem for retrieving full custom SQL queries where we can't do keyset pagination). Problem here is that we run SQL queries in a thread pool. A query that returns millions of rows would presumably tie up a SQL thread until it has finished, which could block the server. This may be a reason to stick with `_next=` keyset pagination - since it ensures each SQL thread yields back again after each 1,000 rows. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389893810 | https://api.github.com/repos/simonw/datasette/issues/266 | 389893810 | MDEyOklzc3VlQ29tbWVudDM4OTg5MzgxMA== | 9599 | 2018-05-17T14:49:35Z | 2018-05-17T14:49:35Z | OWNER | Idea: add a `supports_csv = False` property to `BaseView` and over-ride it to `True` just on the view classes that should support CSV (Table and Row). Slight subtlety: the `DatabaseView` class only supports CSV in the `custom_sql()` path. Maybe that needs to be refactored a bit. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389626715 | https://api.github.com/repos/simonw/datasette/issues/266 | 389626715 | MDEyOklzc3VlQ29tbWVudDM4OTYyNjcxNQ== | 9599 | 2018-05-16T18:50:46Z | 2018-05-16T18:50:46Z | OWNER | > I’d recommend using the Windows-1252 encoding for maximum compatibility, unless you have any characters not in that set, in which case use UTF8 with a byte order mark. Bit of a pain, but some progams (eg various versions of Excel) don’t read UTF8. **frankieroberto** https://twitter.com/frankieroberto/status/996823071947460616 > There is software that consumes CSV and doesn't speak UTF8!? Huh. Well I can't just use Windows-1252 because I need to support the full UTF8 range of potential data - maybe I should support an optional ?_encoding=windows-1252 argument **simonw** https://twitter.com/simonw/status/996824677245857793 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389608473 | https://api.github.com/repos/simonw/datasette/issues/266 | 389608473 | MDEyOklzc3VlQ29tbWVudDM4OTYwODQ3Mw== | 9599 | 2018-05-16T17:52:35Z | 2018-05-16T17:54:11Z | OWNER | There are some code examples in this issue which should help with the streaming part: https://github.com/channelcat/sanic/issues/1067 Also https://github.com/channelcat/sanic/blob/master/docs/sanic/streaming.md#response-streaming | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389592566 | https://api.github.com/repos/simonw/datasette/issues/266 | 389592566 | MDEyOklzc3VlQ29tbWVudDM4OTU5MjU2Ng== | 9599 | 2018-05-16T17:01:29Z | 2018-05-16T17:02:21Z | OWNER | Let's provide a CSV Dialect definition too: https://frictionlessdata.io/specs/csv-dialect/ - via https://twitter.com/drewdaraabrams/status/996794915680997382 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389579762 | https://api.github.com/repos/simonw/datasette/issues/266 | 389579762 | MDEyOklzc3VlQ29tbWVudDM4OTU3OTc2Mg== | 9599 | 2018-05-16T16:21:12Z | 2018-05-16T16:21:12Z | OWNER | > I basically want someone to tell me which arguments I can pass to Python's csv.writer() function that will result in the least complaints from people who try to parse the results :) https://twitter.com/simonw/status/996786815938977792 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389579363 | https://api.github.com/repos/simonw/datasette/issues/266 | 389579363 | MDEyOklzc3VlQ29tbWVudDM4OTU3OTM2Mw== | 9599 | 2018-05-16T16:20:06Z | 2018-05-16T16:20:06Z | OWNER | I started a thread on Twitter discussing various CSV output dialects: https://twitter.com/simonw/status/996783395504979968 - I want to pick defaults which will work as well as possible for whatever tools people might be using to consume the data. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/266#issuecomment-389572201 | https://api.github.com/repos/simonw/datasette/issues/266 | 389572201 | MDEyOklzc3VlQ29tbWVudDM4OTU3MjIwMQ== | 9599 | 2018-05-16T15:58:43Z | 2018-05-16T16:00:47Z | OWNER | This will likely be implemented in the `BaseView` class, which needs to know how to spot the `.csv` extension, call the underlying JSON generating function and then return the `columns` and `rows` as correctly formatted CSV. https://github.com/simonw/datasette/blob/9959a9e4deec8e3e178f919e8b494214d5faa7fd/datasette/views/base.py#L201-L207 This means it will take ALL arguments that are available to the `.json` view. It may ignore some (e.g. `_facet=` makes no sense since CSV tables don't have space to show the facet results). In streaming mode, things will behave a little bit differently - in particular, if `_stream=1` then `_next=` will be forbidden. It can't include a length header because we don't know how many bytes it will be CSV output will throw an error if the endpoint doesn't have rows and columns keys eg `/-/inspect.json` So the implementation... - looks for the `.csv` extension - internally fetches the `.json` data instead - If no `_stream` it just transposes that JSON to CSV with the correct content type header - If `_stream=1` - checks for `_next=` and throws an error if it was provided - Otherwise... fetch first page and emit CSV header and first set of rows - Then start async looping, emitting more CSV rows and following the `_next=` internal reference until done I like that this takes advantage of efficient pagination. It may not work so well for views which use offset/limit though. It won't work at all for custom SQL because custom SQL doesn't support _next= pagination. That's fine. For views... easiest fix is to cut off after first X000 records. That seems OK. View JSON would need to include a property that the mechanism can identify. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323681589 | |
https://github.com/simonw/datasette/issues/265#issuecomment-389566147 | https://api.github.com/repos/simonw/datasette/issues/265 | 389566147 | MDEyOklzc3VlQ29tbWVudDM4OTU2NjE0Nw== | 9599 | 2018-05-16T15:41:42Z | 2018-05-16T15:41:42Z | OWNER | An official demo instance of Datasette dedicated to this use-case would be useful, especially if it was automatically deployed by Travis for every commit to master that passes the tests. Maybe there should be a permanent version of it deployed for each released version too? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323677499 | |
https://github.com/simonw/datasette/issues/263#issuecomment-389563719 | https://api.github.com/repos/simonw/datasette/issues/263 | 389563719 | MDEyOklzc3VlQ29tbWVudDM4OTU2MzcxOQ== | 9599 | 2018-05-16T15:34:46Z | 2018-05-16T15:34:46Z | OWNER | The underlying mechanics for the `_extras` mechanism described in #262 may help with this. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
323671577 | |
https://github.com/simonw/datasette/issues/255#issuecomment-389562708 | https://api.github.com/repos/simonw/datasette/issues/255 | 389562708 | MDEyOklzc3VlQ29tbWVudDM4OTU2MjcwOA== | 9599 | 2018-05-16T15:32:12Z | 2018-05-16T15:32:12Z | OWNER | This is now landed in master, ready for the next release. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-389546040 | https://api.github.com/repos/simonw/datasette/issues/255 | 389546040 | MDEyOklzc3VlQ29tbWVudDM4OTU0NjA0MA== | 9599 | 2018-05-16T14:47:34Z | 2018-05-16T14:47:34Z | OWNER | Latest demo - now with multiple columns: https://datasette-suggested-facets-demo.now.sh/sf-trees-02c8ef1/Street_Tree_List?_facet=qCaretaker&_facet=qCareAssistant&_facet=qLegalStatus ![2018-05-16 at 7 47 am](https://user-images.githubusercontent.com/9599/40124418-63e680ba-58dd-11e8-8063-9686826abb8e.png) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/pull/258#issuecomment-389536870 | https://api.github.com/repos/simonw/datasette/issues/258 | 389536870 | MDEyOklzc3VlQ29tbWVudDM4OTUzNjg3MA== | 9599 | 2018-05-16T14:22:31Z | 2018-05-16T14:22:31Z | OWNER | The principle benefit provided by the hash URLs is that Datasette can set a far-future cache expiry header on every response. This is particularly useful for JavaScript API work as it makes fantastic use of the browser's cache. It also means that if you are serving your API from behind a caching proxy like Cloudflare you get a fantastic cache hit rate. An option to serve without persistent hashes would also need to turn off the cache headers. Maybe the option should support both? If you hit a page with the hash in the URL you still get the cache headers, but hits to the URL without the hash serve uncashed content directly. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322741659 | |
https://github.com/simonw/datasette/issues/255#issuecomment-389397457 | https://api.github.com/repos/simonw/datasette/issues/255 | 389397457 | MDEyOklzc3VlQ29tbWVudDM4OTM5NzQ1Nw== | 9599 | 2018-05-16T05:20:04Z | 2018-05-16T05:20:04Z | OWNER | Maybe `suggested_facets` should only be calculated for the HTML view. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-389386919 | https://api.github.com/repos/simonw/datasette/issues/255 | 389386919 | MDEyOklzc3VlQ29tbWVudDM4OTM4NjkxOQ== | 9599 | 2018-05-16T03:57:47Z | 2018-05-16T03:58:30Z | OWNER | I updated that demo to demonstrate the new foreign key label expansions: https://datasette-suggested-facets-demo.now.sh/sf-trees-02c8ef1/Street_Tree_List?_facet=qLegalStatus ![2018-05-15 at 8 58 pm](https://user-images.githubusercontent.com/9599/40095806-b645026a-5882-11e8-8100-76136df50212.png) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/pull/258#issuecomment-389386142 | https://api.github.com/repos/simonw/datasette/issues/258 | 389386142 | MDEyOklzc3VlQ29tbWVudDM4OTM4NjE0Mg== | 9599 | 2018-05-16T03:51:13Z | 2018-05-16T03:51:13Z | OWNER | The URL does persist across deployments already, in that you can use the URL without the hash and it will redirect to the current location. Here's an example of that: https://san-francisco.datasettes.com/sf-trees/Street_Tree_List.json This also works if you attempt to hit the incorrect hash, e.g. if you have deployed a new version of the database with an updated hash. The old hash will redirect, e.g. https://san-francisco.datasettes.com/sf-trees-c4b972c/Street_Tree_List.json If you serve Datasette from a HTTP/2 proxy (I've been using Cloudflare for this) you won't even have to pay the cost of the redirect - Datasette sends a `Link: <URL>; rel=preload` header with those redirects, which causes Cloudflare to push out the redirected source as part of that HTTP/2 request. You can fire up the Chrome DevTools to watch this happen. https://github.com/simonw/datasette/blob/2b79f2bdeb1efa86e0756e741292d625f91cb93d/datasette/views/base.py#L91 All of that said... I'm not at all opposed to this feature. For consistency with other Datasette options (e.g. `--cors`) I'd prefer to do this as an optional argument to the `datasette serve` command - something like this: datasette serve mydb.db --no-url-hash | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322741659 | |
https://github.com/simonw/datasette/issues/255#issuecomment-389147608 | https://api.github.com/repos/simonw/datasette/issues/255 | 389147608 | MDEyOklzc3VlQ29tbWVudDM4OTE0NzYwOA== | 9599 | 2018-05-15T12:24:46Z | 2018-05-15T12:24:46Z | OWNER | New demo (published with `datasette publish now --branch=suggested-facets fivethirtyeight.db sf-trees.db --name=datastte-suggested-facets-demo`): https://datasette-suggested-facets-demo.now.sh/fivethirtyeight-2628db9/comic-characters%2Fmarvel-wikia-data After turning on a couple of suggested facets... https://datasette-suggested-facets-demo.now.sh/fivethirtyeight-2628db9/comic-characters%2Fmarvel-wikia-data?_facet=SEX&_facet=ID ![2018-05-15 at 7 24 am](https://user-images.githubusercontent.com/9599/40056411-fa265d16-5810-11e8-89ec-e38fe29ffb2c.png) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-389145872 | https://api.github.com/repos/simonw/datasette/issues/255 | 389145872 | MDEyOklzc3VlQ29tbWVudDM4OTE0NTg3Mg== | 9599 | 2018-05-15T12:17:52Z | 2018-05-15T12:17:52Z | OWNER | Activity has now moved to this branch: https://github.com/simonw/datasette/commits/suggested-facets | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/251#issuecomment-388987044 | https://api.github.com/repos/simonw/datasette/issues/251 | 388987044 | MDEyOklzc3VlQ29tbWVudDM4ODk4NzA0NA== | 9599 | 2018-05-14T22:47:55Z | 2018-05-14T22:47:55Z | OWNER | This work is now happening in the facets branch. Closing this in favor of #255. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
320592643 | |
https://github.com/simonw/datasette/issues/259#issuecomment-388797919 | https://api.github.com/repos/simonw/datasette/issues/259 | 388797919 | MDEyOklzc3VlQ29tbWVudDM4ODc5NzkxOQ== | 9599 | 2018-05-14T12:23:11Z | 2018-05-14T12:23:11Z | OWNER | For M2M to work we will need a mechanism for applying IN queries to the table view, so you can select multiple M2M filters. Maybe this would work: ?_m2m_category=123&_m2m_category=865 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322787470 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388784787 | https://api.github.com/repos/simonw/datasette/issues/255 | 388784787 | MDEyOklzc3VlQ29tbWVudDM4ODc4NDc4Nw== | 9599 | 2018-05-14T11:28:05Z | 2018-05-14T11:28:05Z | OWNER | To decide which facets to suggest: for each column, is the unique value count less than the number of rows matching the current query or is it less than 20 (if we are showing more than 20 rows)? Maybe only do this if there are less than ten non-float columns. Or always try for foreign keys and booleans, then if there are none of those try indexed text and integer fields, then finally try non-indexed text and integer fields but only if there are less than ten. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388784063 | https://api.github.com/repos/simonw/datasette/issues/255 | 388784063 | MDEyOklzc3VlQ29tbWVudDM4ODc4NDA2Mw== | 9599 | 2018-05-14T11:25:00Z | 2018-05-14T11:25:15Z | OWNER | Can I get facets working across many2many relationships? This would be fiendishly useful, but the querystring and `metadata.json` syntax is non-obvious. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388686463 | https://api.github.com/repos/simonw/datasette/issues/255 | 388686463 | MDEyOklzc3VlQ29tbWVudDM4ODY4NjQ2Mw== | 9599 | 2018-05-14T03:23:44Z | 2018-05-14T03:25:22Z | OWNER | It would be neat if there was a mechanism for calculating aggregates per facet - e.g. calculating the sum() of specific columns against each facet result on https://datasette-facets-demo.now.sh/fivethirtyeight-2628db9/nba-elo%2Fnbaallelo?_facet=lg_id&_facet=fran_id&lg_id=ABA&_facet=team_id | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/256#issuecomment-388684356 | https://api.github.com/repos/simonw/datasette/issues/256 | 388684356 | MDEyOklzc3VlQ29tbWVudDM4ODY4NDM1Ng== | 9599 | 2018-05-14T03:05:37Z | 2018-05-14T03:05:37Z | OWNER | I just landed pull request #257 - I haven't refactored the tests, I may do that later if it looks worthwhile. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322551723 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388645828 | https://api.github.com/repos/simonw/datasette/issues/255 | 388645828 | MDEyOklzc3VlQ29tbWVudDM4ODY0NTgyOA== | 9599 | 2018-05-13T18:18:56Z | 2018-05-13T18:20:02Z | OWNER | I may be able to run the SQL for all of the facet counts in one go using a WITH CTE query - will have to microbenchmark this to make sure it is worthwhile: https://datasette-facets-demo.now.sh/fivethirtyeight-2628db9?sql=with+blah+as+%28select+*+from+%5Bcollege-majors%2Fall-ages%5D%29%0D%0Aselect+*+from+%28select+%22Major_category%22%2C+Major_category%2C+count%28*%29+as+n+from%0D%0Ablah+group+by+Major_category+order+by+n+desc+limit+10%29%0D%0Aunion+all%0D%0Aselect+*+from+%28select+%22Major_category2%22%2C+Major_category%2C+count%28*%29+as+n+from%0D%0Ablah+group+by+Major_category+order+by+n+desc+limit+10%29 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/pull/257#issuecomment-388628966 | https://api.github.com/repos/simonw/datasette/issues/257 | 388628966 | MDEyOklzc3VlQ29tbWVudDM4ODYyODk2Ng== | 9599 | 2018-05-13T14:00:47Z | 2018-05-13T14:06:35Z | OWNER | Running specific tests: ``` venv35/bin/pip install pytest beautifulsoup4 aiohttp venv35/bin/pytest tests/test_utils.py ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322591993 | |
https://github.com/simonw/datasette/pull/257#issuecomment-388627281 | https://api.github.com/repos/simonw/datasette/issues/257 | 388627281 | MDEyOklzc3VlQ29tbWVudDM4ODYyNzI4MQ== | 9599 | 2018-05-13T13:36:21Z | 2018-05-13T13:36:21Z | OWNER | https://github.com/rtfd/readthedocs.org/issues/3812#issuecomment-373780860 suggests Python 3.5.2 may have the fix. Yup, that worked: ``` pyenv install 3.5.2 rm -rf venv35 /Users/simonw/.pyenv/versions/3.5.2/bin/python -mvenv venv35 source venv35/bin/activate # Not sure why I need this in my local environment but I do: pip install datasette_plugin_demos python setup.py test ``` This is now giving me the same test failure locally that I am seeing in Travis. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322591993 | |
https://github.com/simonw/datasette/pull/257#issuecomment-388626804 | https://api.github.com/repos/simonw/datasette/issues/257 | 388626804 | MDEyOklzc3VlQ29tbWVudDM4ODYyNjgwNA== | 9599 | 2018-05-13T13:28:20Z | 2018-05-13T13:28:20Z | OWNER | Unfortunately, running `python setup.py test` on my laptop using Python 3.5.0 in that virtualenv results in a flow of weird Sanic-related errors: ``` File "/Users/simonw/Dropbox/Development/datasette/venv35/lib/python3.5/site-packages/sanic-0.7.0-py3.5.egg/sanic/testing.py", line 16, in _local_request import aiohttp File "/Users/simonw/Dropbox/Development/datasette/.eggs/aiohttp-2.3.2-py3.5-macosx-10.13-x86_64.egg/aiohttp/__init__.py", line 6, in <module> from .client import * # noqa File "/Users/simonw/Dropbox/Development/datasette/.eggs/aiohttp-2.3.2-py3.5-macosx-10.13-x86_64.egg/aiohttp/client.py", line 13, in <module> from yarl import URL File "/Users/simonw/Dropbox/Development/datasette/.eggs/yarl-1.2.4-py3.5-macosx-10.13-x86_64.egg/yarl/__init__.py", line 11, in <module> from .quoting import _Quoter, _Unquoter File "/Users/simonw/Dropbox/Development/datasette/.eggs/yarl-1.2.4-py3.5-macosx-10.13-x86_64.egg/yarl/quoting.py", line 3, in <module> from typing import Optional, TYPE_CHECKING, cast ImportError: cannot import name 'TYPE_CHECKING' ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322591993 | |
https://github.com/simonw/datasette/pull/257#issuecomment-388626721 | https://api.github.com/repos/simonw/datasette/issues/257 | 388626721 | MDEyOklzc3VlQ29tbWVudDM4ODYyNjcyMQ== | 9599 | 2018-05-13T13:27:04Z | 2018-05-13T13:27:04Z | OWNER | I managed to get Python 3.5.0 running on my laptop using [pyenv](https://github.com/pyenv/pyenv). Here's the incantation I used: ``` # Install pyenv using homebrew (turns out I already had it) brew install pyenv # Check which versions of Python I have installed pyenv versions # Install Python 3.5.0 pyenv install 3.5.0 # Figure out where pyenv has been installing things pyenv root # Check I can run my newly installed Python 3.5.0 /Users/simonw/.pyenv/versions/3.5.0/bin/python # Use it to create a new virtualenv /Users/simonw/.pyenv/versions/3.5.0/bin/python -mvenv venv35 source venv35/bin/activate # Install datasette into that virtualenv python setup.py install ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322591993 | |
https://github.com/simonw/datasette/pull/257#issuecomment-388625703 | https://api.github.com/repos/simonw/datasette/issues/257 | 388625703 | MDEyOklzc3VlQ29tbWVudDM4ODYyNTcwMw== | 9599 | 2018-05-13T13:10:09Z | 2018-05-13T13:10:09Z | OWNER | I'm still seeing intermittent Python 3.5 failures due to dictionary ordering differences. https://travis-ci.org/simonw/datasette/jobs/378356802 ``` > assert expected_facet_results == facet_results E AssertionError: assert {'city': [{'c...alue': 'MI'}]} == {'city': [{'co...alue': 'MI'}]} E Omitting 1 identical items, use -vv to show E Differing items: E {'city': [{'count': 4, 'toggle_url': '_facet=state&_facet=city&state=MI&city=Detroit', 'value': 'Detroit'}]} != {'city': [{'count': 4, 'toggle_url': 'state=MI&_facet=state&_facet=city&city=Detroit', 'value': 'Detroit'}]} E Use -v to get the full diff ``` To solve these cleanly I need to be able to run Python 3.5 on my local laptop rather than relying on Travis every time. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322591993 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388588998 | https://api.github.com/repos/simonw/datasette/issues/255 | 388588998 | MDEyOklzc3VlQ29tbWVudDM4ODU4ODk5OA== | 9599 | 2018-05-12T22:57:30Z | 2018-05-12T23:00:24Z | OWNER | A few demos: * https://datasette-facets-demo.now.sh/fivethirtyeight-2628db9/college-majors%2Fall-ages?_facet=Major_category * https://datasette-facets-demo.now.sh/fivethirtyeight-2628db9/congress-age%2Fcongress-terms?_facet=chamber&_facet=state&_facet=party&_facet=incumbent * https://datasette-facets-demo.now.sh/fivethirtyeight-2628db9/bechdel%2Fmovies?_facet=binary&_facet=test | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388589072 | https://api.github.com/repos/simonw/datasette/issues/255 | 388589072 | MDEyOklzc3VlQ29tbWVudDM4ODU4OTA3Mg== | 9599 | 2018-05-12T22:59:07Z | 2018-05-12T22:59:07Z | OWNER | I need to decide how to display these. They currently look like this: https://datasette-facets-demo.now.sh/fivethirtyeight-2628db9/congress-age%2Fcongress-terms?_facet=chamber&_facet=state&_facet=party&_facet=incumbent&state=MO ![2018-05-12 at 7 58 pm](https://user-images.githubusercontent.com/9599/39962230-e7bf9e10-561e-11e8-80a7-0941b8991318.png) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388588011 | https://api.github.com/repos/simonw/datasette/issues/255 | 388588011 | MDEyOklzc3VlQ29tbWVudDM4ODU4ODAxMQ== | 9599 | 2018-05-12T22:33:39Z | 2018-05-12T22:33:39Z | OWNER | Initial documentation: http://datasette.readthedocs.io/en/latest/facets.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388587855 | https://api.github.com/repos/simonw/datasette/issues/255 | 388587855 | MDEyOklzc3VlQ29tbWVudDM4ODU4Nzg1NQ== | 9599 | 2018-05-12T22:30:23Z | 2018-05-12T22:30:23Z | OWNER | Adding some TODOs to the original description (so they show up as a todo progress bar) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/253#issuecomment-388550742 | https://api.github.com/repos/simonw/datasette/issues/253 | 388550742 | MDEyOklzc3VlQ29tbWVudDM4ODU1MDc0Mg== | 9599 | 2018-05-12T12:09:02Z | 2018-05-12T12:09:02Z | OWNER | http://datasette.readthedocs.io/en/latest/full_text_search.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
321631020 | |
https://github.com/simonw/datasette/issues/255#issuecomment-388525357 | https://api.github.com/repos/simonw/datasette/issues/255 | 388525357 | MDEyOklzc3VlQ29tbWVudDM4ODUyNTM1Nw== | 9599 | 2018-05-12T03:01:14Z | 2018-05-12T03:01:14Z | OWNER | Facet counts will be generated by extra SQL queries with their own aggressive time limit. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322477187 | |
https://github.com/simonw/datasette/issues/254#issuecomment-388360255 | https://api.github.com/repos/simonw/datasette/issues/254 | 388360255 | MDEyOklzc3VlQ29tbWVudDM4ODM2MDI1NQ== | 9599 | 2018-05-11T13:16:09Z | 2018-05-11T22:45:31Z | OWNER | Do you have an example I can look at? I think I have a possible route for fixing this, but it's pretty tricky (it involves adding a full SQL statement parser, but that's needed for some other potential improvements as well). In the meantime, is this causing actual errors for you or is it more of an inconvenience (form fields being displayed that don't actually do anything)? Another potential solution here could be to allow canned queries to optionally declare their parameters in metadata.json | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322283067 | |
https://github.com/simonw/datasette/issues/254#issuecomment-388497467 | https://api.github.com/repos/simonw/datasette/issues/254 | 388497467 | MDEyOklzc3VlQ29tbWVudDM4ODQ5NzQ2Nw== | 9599 | 2018-05-11T22:06:00Z | 2018-05-11T22:06:34Z | OWNER | Got it, this seems to trigger the problem: https://datasette-zkcvlwdrhl.now.sh/simplestreams-270f20c?sql=select+*+from+cloudimage+where+%22content_id%22+%3D+%22com.ubuntu.cloud%3Areleased%3Adownload%22+order+by+id+limit+10 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
322283067 | |
https://github.com/simonw/datasette/issues/251#issuecomment-386879878 | https://api.github.com/repos/simonw/datasette/issues/251 | 386879878 | MDEyOklzc3VlQ29tbWVudDM4Njg3OTg3OA== | 9599 | 2018-05-06T13:34:57Z | 2018-05-06T13:34:57Z | OWNER | If I'm going to expand column introspection in this way it would be useful to also capture column type information. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
320592643 | |
https://github.com/simonw/datasette/issues/251#issuecomment-386879840 | https://api.github.com/repos/simonw/datasette/issues/251 | 386879840 | MDEyOklzc3VlQ29tbWVudDM4Njg3OTg0MA== | 9599 | 2018-05-06T13:34:24Z | 2018-05-06T13:34:24Z | OWNER | Here's a quick demo of that exploration: https://datasette-distinct-column-values.now.sh/-/inspect Example output: ``` { "antiquities-act/actions_under_antiquities_act": { "columns": [ "current_name", "states", "original_name", "current_agency", "action", "date", "year", "pres_or_congress", "acres_affected" ], "count": 344, "distinct_values_by_column": { "acres_affected": null, "action": null, "current_agency": [ "NPS", "State of Montana", "BLM", "State of Arizona", "USFS", "State of North Dakota", "NPS, BLM", "State of South Carolina", "State of New York", "FWS", "FWS, NOAA", "NPS, FWS", "NOAA", "BLM, USFS", "NOAA, FWS" ], "current_name": null, "date": null, "original_name": null, "pres_or_congress": null, "states": null, "year": null }, "foreign_keys": { "incoming": [], "outgoing": [] }, "fts_table": null, "hidden": false, "label_column": null, "name": "antiquities-act/actions_under_antiquities_act", "primary_keys": [] } } ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
320592643 | |
https://github.com/simonw/datasette/issues/251#issuecomment-386879509 | https://api.github.com/repos/simonw/datasette/issues/251 | 386879509 | MDEyOklzc3VlQ29tbWVudDM4Njg3OTUwOQ== | 9599 | 2018-05-06T13:29:26Z | 2018-05-06T13:29:26Z | OWNER | We can solve this using the `sqlite_timelimit(conn, 20)` helper, which can tell SQLite to give up after 20ms. We can wrap that around the following SQL: select distinct COLUMN from TABLE limit 21; Then we look at the number of rows returned. If it's 21 or more we know that this table had more than 21 distinct values, so we'll treat it as "unlimited". Likewise, if the SQL times out before 20ms is up we will skip this introspection. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
320592643 | |
https://github.com/simonw/datasette/issues/237#issuecomment-386840806 | https://api.github.com/repos/simonw/datasette/issues/237 | 386840806 | MDEyOklzc3VlQ29tbWVudDM4Njg0MDgwNg== | 9599 | 2018-05-05T22:56:42Z | 2018-05-05T22:56:42Z | OWNER | Demo: datasette publish now ../datasettes/san-francisco/sf-film-locations.db --branch=master --name datasette-column-search-demo https://datasette-column-search-demo.now.sh/sf-film-locations/Film_Locations_in_San_Francisco?_search_Locations=justin | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
317475156 | |
https://github.com/simonw/datasette/issues/237#issuecomment-386840307 | https://api.github.com/repos/simonw/datasette/issues/237 | 386840307 | MDEyOklzc3VlQ29tbWVudDM4Njg0MDMwNw== | 9599 | 2018-05-05T22:45:45Z | 2018-05-05T22:45:45Z | OWNER | Documented here: http://datasette.readthedocs.io/en/latest/json_api.html#special-table-arguments | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
317475156 | |
https://github.com/simonw/datasette/issues/249#issuecomment-386692534 | https://api.github.com/repos/simonw/datasette/issues/249 | 386692534 | MDEyOklzc3VlQ29tbWVudDM4NjY5MjUzNA== | 9599 | 2018-05-04T18:26:30Z | 2018-05-04T18:26:30Z | OWNER | Demo: https://datasette-plugins-and-max-size-demo.now.sh/sf-trees/Street_Tree_List.json?_size=max | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
320090329 | |
https://github.com/simonw/datasette/issues/248#issuecomment-386692333 | https://api.github.com/repos/simonw/datasette/issues/248 | 386692333 | MDEyOklzc3VlQ29tbWVudDM4NjY5MjMzMw== | 9599 | 2018-05-04T18:25:40Z | 2018-05-04T18:25:40Z | OWNER | Demo: https://datasette-plugins-and-max-size-demo.now.sh/-/plugins | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
319954545 | |
https://github.com/simonw/datasette/issues/248#issuecomment-386357645 | https://api.github.com/repos/simonw/datasette/issues/248 | 386357645 | MDEyOklzc3VlQ29tbWVudDM4NjM1NzY0NQ== | 9599 | 2018-05-03T16:36:59Z | 2018-05-03T16:36:59Z | OWNER | Even better: use `plugin_manager.list_plugin_distinfo()` from pluggy to get back a list of tuples, the second item in each tuple is a `pkg_resources.DistInfoDistribution` with a `.version` attribute. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
319954545 | |
https://github.com/simonw/datasette/issues/245#issuecomment-386310149 | https://api.github.com/repos/simonw/datasette/issues/245 | 386310149 | MDEyOklzc3VlQ29tbWVudDM4NjMxMDE0OQ== | 9599 | 2018-05-03T14:14:33Z | 2018-05-03T14:14:33Z | OWNER | Demos: * https://datasette-versions-and-shape-demo.now.sh/sf-trees-02c8ef1/qSpecies.json?_shape=array * https://datasette-versions-and-shape-demo.now.sh/sf-trees-02c8ef1/qSpecies.json?_shape=object * https://datasette-versions-and-shape-demo.now.sh/sf-trees-02c8ef1/qSpecies.json?_shape=arrays * https://datasette-versions-and-shape-demo.now.sh/sf-trees-02c8ef1/qSpecies.json?_shape=objects | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
319358200 | |
https://github.com/simonw/datasette/issues/244#issuecomment-386309928 | https://api.github.com/repos/simonw/datasette/issues/244 | 386309928 | MDEyOklzc3VlQ29tbWVudDM4NjMwOTkyOA== | 9599 | 2018-05-03T14:13:49Z | 2018-05-03T14:13:49Z | OWNER | Demo: https://datasette-versions-and-shape-demo.now.sh/-/versions | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
318738000 | |
https://github.com/simonw/datasette/issues/125#issuecomment-384678319 | https://api.github.com/repos/simonw/datasette/issues/125 | 384678319 | MDEyOklzc3VlQ29tbWVudDM4NDY3ODMxOQ== | 9599 | 2018-04-26T15:14:31Z | 2018-04-26T15:14:31Z | OWNER | I shipped this last week as the first plugin: https://simonwillison.net/2018/Apr/20/datasette-plugins/ Demo: https://datasette-cluster-map-demo.datasettes.com/polar-bears-455fe3a/USGS_WC_eartags_output_files_2009-2011-Status Plugin: https://github.com/simonw/datasette-cluster-map | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
275135393 | |
https://github.com/simonw/datasette/issues/44#issuecomment-384676488 | https://api.github.com/repos/simonw/datasette/issues/44 | 384676488 | MDEyOklzc3VlQ29tbWVudDM4NDY3NjQ4OA== | 9599 | 2018-04-26T15:09:57Z | 2018-04-26T15:09:57Z | OWNER | Remaining work for this is tracked in #150 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
269731374 | |
https://github.com/simonw/datasette/issues/79#issuecomment-384675792 | https://api.github.com/repos/simonw/datasette/issues/79 | 384675792 | MDEyOklzc3VlQ29tbWVudDM4NDY3NTc5Mg== | 9599 | 2018-04-26T15:08:13Z | 2018-04-26T15:08:13Z | OWNER | Docs now live at http://datasette.readthedocs.io/ I still need to document a few more parts of the API before closing this. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
273569068 | |
https://github.com/simonw/datasette/issues/229#issuecomment-384512192 | https://api.github.com/repos/simonw/datasette/issues/229 | 384512192 | MDEyOklzc3VlQ29tbWVudDM4NDUxMjE5Mg== | 9599 | 2018-04-26T04:49:46Z | 2018-04-26T04:49:46Z | OWNER | Documentation: http://datasette.readthedocs.io/en/latest/json_api.html#special-table-arguments | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316123256 | |
https://github.com/simonw/datasette/issues/239#issuecomment-384503873 | https://api.github.com/repos/simonw/datasette/issues/239 | 384503873 | MDEyOklzc3VlQ29tbWVudDM4NDUwMzg3Mw== | 9599 | 2018-04-26T03:45:11Z | 2018-04-26T03:45:11Z | OWNER | Documentation: http://datasette.readthedocs.io/en/latest/metadata.html#hiding-tables | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
317760361 | |
https://github.com/simonw/datasette/issues/239#issuecomment-384500327 | https://api.github.com/repos/simonw/datasette/issues/239 | 384500327 | MDEyOklzc3VlQ29tbWVudDM4NDUwMDMyNw== | 9599 | 2018-04-26T03:18:12Z | 2018-04-26T03:18:20Z | OWNER | ``` { "databases": { "database1": { "tables": { "example_table": { "hidden": true } } } } } ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
317760361 | |
https://github.com/simonw/datasette/issues/238#issuecomment-384362028 | https://api.github.com/repos/simonw/datasette/issues/238 | 384362028 | MDEyOklzc3VlQ29tbWVudDM4NDM2MjAyOA== | 9599 | 2018-04-25T17:07:11Z | 2018-04-25T17:07:11Z | OWNER | On further thought: this is actually only an issue for immutable deployments to platforms like Zeit Now and Heroku. As such, adding it to `datasette serve` feels clumsy. Maybe `datasette publish` should instead gain the ability to optionally install an extra mechanism that periodically pulls a fresh copy of `metadata.json` from a URL. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
317714268 | |
https://github.com/simonw/datasette/issues/235#issuecomment-383764533 | https://api.github.com/repos/simonw/datasette/issues/235 | 383764533 | MDEyOklzc3VlQ29tbWVudDM4Mzc2NDUzMw== | 9599 | 2018-04-24T00:30:02Z | 2018-04-24T00:30:02Z | OWNER | The `resource` module in he standard library has the ability to set limits on memory usage for the current process: https://pymotw.com/2/resource/ | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316621102 | |
https://github.com/simonw/datasette/issues/235#issuecomment-383727973 | https://api.github.com/repos/simonw/datasette/issues/235 | 383727973 | MDEyOklzc3VlQ29tbWVudDM4MzcyNzk3Mw== | 9599 | 2018-04-23T21:23:59Z | 2018-04-23T21:23:59Z | OWNER | There might also be something clever we can do here with PRAGMA statements: https://stackoverflow.com/questions/14146881/limit-the-maximum-amount-of-memory-sqlite3-uses And https://www.sqlite.org/pragma.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316621102 | |
https://github.com/simonw/datasette/issues/231#issuecomment-383315348 | https://api.github.com/repos/simonw/datasette/issues/231 | 383315348 | MDEyOklzc3VlQ29tbWVudDM4MzMxNTM0OA== | 9599 | 2018-04-21T17:37:50Z | 2018-04-22T23:06:04Z | OWNER | I could also have an `"autodetect": false` option for that plugin to turn off autodetecting entirely. Would be useful if the plugin didn't append its JavaScript in pages that it wasn't used for - that might require making the `extra_js_urls()` hook optionally aware of the columns and table and metadata. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316323336 | |
https://github.com/simonw/datasette/issues/234#issuecomment-383410146 | https://api.github.com/repos/simonw/datasette/issues/234 | 383410146 | MDEyOklzc3VlQ29tbWVudDM4MzQxMDE0Ng== | 9599 | 2018-04-22T20:32:30Z | 2018-04-22T20:47:02Z | OWNER | I built this wrong: my implementation is looking for the `label_column` on the table-being-displayed, but it should be looking for it on the table-the-foreign-key-links-to. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316526433 | |
https://github.com/simonw/datasette/issues/234#issuecomment-383399762 | https://api.github.com/repos/simonw/datasette/issues/234 | 383399762 | MDEyOklzc3VlQ29tbWVudDM4MzM5OTc2Mg== | 9599 | 2018-04-22T17:54:39Z | 2018-04-22T17:54:39Z | OWNER | Docs here: http://datasette.readthedocs.io/en/latest/metadata.html#specifying-the-label-column-for-a-table | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316526433 | |
https://github.com/simonw/datasette/issues/234#issuecomment-383398182 | https://api.github.com/repos/simonw/datasette/issues/234 | 383398182 | MDEyOklzc3VlQ29tbWVudDM4MzM5ODE4Mg== | 9599 | 2018-04-22T17:31:12Z | 2018-04-22T17:31:12Z | OWNER | ```{ "databases": { "database1": { "tables": { "example_table": { "label_column": "name" } } } } } ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316526433 | |
https://github.com/simonw/datasette/pull/232#issuecomment-383252624 | https://api.github.com/repos/simonw/datasette/issues/232 | 383252624 | MDEyOklzc3VlQ29tbWVudDM4MzI1MjYyNA== | 9599 | 2018-04-21T00:19:00Z | 2018-04-21T00:19:00Z | OWNER | Thanks! | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316365426 | |
https://github.com/simonw/datasette/issues/14#issuecomment-383140111 | https://api.github.com/repos/simonw/datasette/issues/14 | 383140111 | MDEyOklzc3VlQ29tbWVudDM4MzE0MDExMQ== | 9599 | 2018-04-20T15:52:33Z | 2018-04-20T15:52:33Z | OWNER | Here's a link demonstrating my new plugin: https://datasette-cluster-map-demo.now.sh/polar-bears-455fe3a/USGS_WC_eartags_output_files_2009-2011-Status | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
267707940 | |
https://github.com/simonw/datasette/issues/14#issuecomment-383139889 | https://api.github.com/repos/simonw/datasette/issues/14 | 383139889 | MDEyOklzc3VlQ29tbWVudDM4MzEzOTg4OQ== | 9599 | 2018-04-20T15:51:47Z | 2018-04-20T15:51:47Z | OWNER | I released everything we have so far in [Datasette 0.20](https://github.com/simonw/datasette/releases/tag/0.20) and built and released an example plugin, [datasette-cluster-map](https://pypi.org/project/datasette-cluster-map/). Here's my blog entry about it: https://simonwillison.net/2018/Apr/20/datasette-plugins/ | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
267707940 | |
https://github.com/simonw/datasette/issues/230#issuecomment-383109984 | https://api.github.com/repos/simonw/datasette/issues/230 | 383109984 | MDEyOklzc3VlQ29tbWVudDM4MzEwOTk4NA== | 9599 | 2018-04-20T14:15:39Z | 2018-04-20T14:15:39Z | OWNER | Refs #229 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316128955 | |
https://github.com/simonw/datasette/issues/227#issuecomment-382967238 | https://api.github.com/repos/simonw/datasette/issues/227 | 382967238 | MDEyOklzc3VlQ29tbWVudDM4Mjk2NzIzOA== | 9599 | 2018-04-20T03:58:09Z | 2018-04-20T03:58:09Z | OWNER | Maybe prepare_table_data() vs prepare_table_context() | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315960272 | |
https://github.com/simonw/datasette/issues/227#issuecomment-382966604 | https://api.github.com/repos/simonw/datasette/issues/227 | 382966604 | MDEyOklzc3VlQ29tbWVudDM4Mjk2NjYwNA== | 9599 | 2018-04-20T03:54:56Z | 2018-04-20T03:54:56Z | OWNER | Should this differentiate between preparing the data to be sent back as JSON and preparing the context for the template? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315960272 | |
https://github.com/simonw/datasette/issues/227#issuecomment-382964794 | https://api.github.com/repos/simonw/datasette/issues/227 | 382964794 | MDEyOklzc3VlQ29tbWVudDM4Mjk2NDc5NA== | 9599 | 2018-04-20T03:45:18Z | 2018-04-20T03:45:18Z | OWNER | What if the context needs to make await calls? One possible option: plugins can either manipulate the context in place OR they can return an awaitable. If they do that, the caller will await it. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315960272 | |
https://github.com/simonw/datasette/issues/227#issuecomment-382959857 | https://api.github.com/repos/simonw/datasette/issues/227 | 382959857 | MDEyOklzc3VlQ29tbWVudDM4Mjk1OTg1Nw== | 9599 | 2018-04-20T03:21:43Z | 2018-04-20T03:21:43Z | OWNER | Plus a generic prepare_context() hook called in the common render method. prepare_context_table(), prepare_context_row() etc Arguments are context, request, self (hence can access self.ds) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315960272 | |
https://github.com/simonw/datasette/issues/227#issuecomment-382958693 | https://api.github.com/repos/simonw/datasette/issues/227 | 382958693 | MDEyOklzc3VlQ29tbWVudDM4Mjk1ODY5Mw== | 9599 | 2018-04-20T03:15:52Z | 2018-04-20T03:15:52Z | OWNER | A better way to do this would be with many different plugin hooks, one for each view. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315960272 | |
https://github.com/simonw/datasette/issues/228#issuecomment-382924910 | https://api.github.com/repos/simonw/datasette/issues/228 | 382924910 | MDEyOklzc3VlQ29tbWVudDM4MjkyNDkxMA== | 9599 | 2018-04-20T00:35:48Z | 2018-04-20T00:35:48Z | OWNER | Hiding tables with the `idx_` prefix should be good enough here, since false positives aren't very harmful. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
316031566 | |
https://github.com/simonw/datasette/issues/227#issuecomment-382808266 | https://api.github.com/repos/simonw/datasette/issues/227 | 382808266 | MDEyOklzc3VlQ29tbWVudDM4MjgwODI2Ng== | 9599 | 2018-04-19T16:59:23Z | 2018-04-19T16:59:23Z | OWNER | Maybe this should have a second argument indicating which codepath was being handled. That way plugins could say "only inject this extra context variable on the row page". | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315960272 | |
https://github.com/simonw/datasette/issues/224#issuecomment-382616527 | https://api.github.com/repos/simonw/datasette/issues/224 | 382616527 | MDEyOklzc3VlQ29tbWVudDM4MjYxNjUyNw== | 9599 | 2018-04-19T05:40:28Z | 2018-04-19T05:40:28Z | OWNER | No need to use `PackageLoader` after all, we can use the same mechanism we used for the static path: https://github.com/simonw/datasette/blob/b55809a1e20986bb2e638b698815a77902e8708d/datasette/utils.py#L694-L695 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315517578 | |
https://github.com/simonw/datasette/issues/223#issuecomment-382413121 | https://api.github.com/repos/simonw/datasette/issues/223 | 382413121 | MDEyOklzc3VlQ29tbWVudDM4MjQxMzEyMQ== | 9599 | 2018-04-18T14:47:18Z | 2018-04-18T14:47:18Z | OWNER | And tested `datasette package` - this time exercising the ability to pass more than one `--install` option: ``` $ datasette package sortable.db --branch=master --install requests --install datasette-plugin-demos Sending build context to Docker daemon 125.4kB Step 1/7 : FROM python:3 ---> 79e1dc9af1c1 Step 2/7 : COPY . /app ---> 6e8e40bce378 Step 3/7 : WORKDIR /app Removing intermediate container 7cdc9ab20d09 ---> f42258c2211f Step 4/7 : RUN pip install https://github.com/simonw/datasette/archive/master.zip requests datasette-plugin-demos ---> Running in a0f17cec08a4 Collecting ... Removing intermediate container a0f17cec08a4 ---> beea84e73271 Step 5/7 : RUN datasette inspect sortable.db --inspect-file inspect-data.json ---> Running in 4daa28792348 Removing intermediate container 4daa28792348 ---> c60312d21b99 Step 6/7 : EXPOSE 8001 ---> Running in fa728468482d Removing intermediate container fa728468482d ---> 8f219a61fddc Step 7/7 : CMD ["datasette", "serve", "--host", "0.0.0.0", "sortable.db", "--cors", "--port", "8001", "--inspect-file", "inspect-data.json"] ---> Running in cd4eaeb2ce9e Removing intermediate container cd4eaeb2ce9e ---> 066e257c7c44 Successfully built 066e257c7c44 (venv) datasette $ docker run -p 8081:8001 066e257c7c44 Serve! files=('sortable.db',) on port 8001 [2018-04-18 14:40:18 +0000] [1] [INFO] Goin' Fast @ http://0.0.0.0:8001 [2018-04-18 14:40:18 +0000] [1] [INFO] Starting worker [1] [2018-04-18 14:46:01 +0000] - (sanic.access)[INFO][1:7]: GET http://localhost:8081/-/static-plugins/datasette_plugin_demos/plugin.js 200 16 ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315327860 | |
https://github.com/simonw/datasette/issues/223#issuecomment-382409989 | https://api.github.com/repos/simonw/datasette/issues/223 | 382409989 | MDEyOklzc3VlQ29tbWVudDM4MjQwOTk4OQ== | 9599 | 2018-04-18T14:38:08Z | 2018-04-18T14:38:08Z | OWNER | Tested on Heroku as well. datasette publish heroku sortable.db --install datasette-plugin-demos --branch=master https://morning-tor-45944.herokuapp.com/-/static-plugins/datasette_plugin_demos/plugin.js https://morning-tor-45944.herokuapp.com/sortable-4bbaa6f?sql=select+random_integer%280%2C+10%29 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315327860 | |
https://github.com/simonw/datasette/issues/223#issuecomment-382408128 | https://api.github.com/repos/simonw/datasette/issues/223 | 382408128 | MDEyOklzc3VlQ29tbWVudDM4MjQwODEyOA== | 9599 | 2018-04-18T14:33:09Z | 2018-04-18T14:33:09Z | OWNER | Demo: datasette publish now sortable.db --install datasette-plugin-demos --branch=master Produced this deployment, with both the `random_integer()` function and the static file from https://github.com/simonw/datasette-plugin-demos/tree/0.2 https://datasette-issue-223.now.sh/-/static-plugins/datasette_plugin_demos/plugin.js https://datasette-issue-223.now.sh/sortable-4bbaa6f?sql=select+random_integer%280%2C+10%29 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
315327860 | |
https://github.com/simonw/datasette/issues/14#issuecomment-382256729 | https://api.github.com/repos/simonw/datasette/issues/14 | 382256729 | MDEyOklzc3VlQ29tbWVudDM4MjI1NjcyOQ== | 9599 | 2018-04-18T04:29:29Z | 2018-04-18T04:30:14Z | OWNER | I added a mechanism for plugins to serve static files and define custom CSS and JS URLs in #214 - see new documentation on http://datasette.readthedocs.io/en/latest/plugins.html#static-assets and http://datasette.readthedocs.io/en/latest/plugins.html#extra-css-urls | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
267707940 | |
https://github.com/simonw/datasette/issues/214#issuecomment-382048582 | https://api.github.com/repos/simonw/datasette/issues/214 | 382048582 | MDEyOklzc3VlQ29tbWVudDM4MjA0ODU4Mg== | 9599 | 2018-04-17T16:04:42Z | 2018-04-18T02:24:46Z | OWNER | One possible option: let plugins bundle their own `static/` directory and then register themselves with Datasette, then have `/-/static-plugins/name-of-plugin/...` serve files from that directory. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314506446 | |
https://github.com/simonw/datasette/pull/209#issuecomment-382210976 | https://api.github.com/repos/simonw/datasette/issues/209 | 382210976 | MDEyOklzc3VlQ29tbWVudDM4MjIxMDk3Ng== | 9599 | 2018-04-18T01:12:26Z | 2018-04-18T01:12:26Z | OWNER | OK, aaf59db570ab7688af72c08bb5bc1edc145e3e07 should mean that the tests pass when I merge that. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314455877 | |
https://github.com/simonw/datasette/pull/209#issuecomment-382205189 | https://api.github.com/repos/simonw/datasette/issues/209 | 382205189 | MDEyOklzc3VlQ29tbWVudDM4MjIwNTE4OQ== | 9599 | 2018-04-18T00:42:44Z | 2018-04-18T00:43:02Z | OWNER | I managed to get a better error message out of that test. The server is returning this (but only on Python 3.6, not on Python 3.5 - and only in Travis, not in my local environment): ```{'error': 'interrupted', 'ok': False, 'status': 400, 'title': 'Invalid SQL'}``` https://travis-ci.org/simonw/datasette/jobs/367929134 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314455877 | |
https://github.com/simonw/datasette/issues/214#issuecomment-382069980 | https://api.github.com/repos/simonw/datasette/issues/214 | 382069980 | MDEyOklzc3VlQ29tbWVudDM4MjA2OTk4MA== | 9599 | 2018-04-17T17:08:28Z | 2018-04-17T17:08:28Z | OWNER | Even if we automatically serve ALL `static/` content from installed plugins, we'll still need them to register which files need to be linked to from `extra_css_urls` and `extra_js_urls` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314506446 | |
https://github.com/simonw/datasette/issues/214#issuecomment-382038613 | https://api.github.com/repos/simonw/datasette/issues/214 | 382038613 | MDEyOklzc3VlQ29tbWVudDM4MjAzODYxMw== | 9599 | 2018-04-17T15:38:23Z | 2018-04-17T15:38:23Z | OWNER | I figured out the recipe for bundling static assets in a plugin: https://github.com/simonw/datasette-plugin-demos/commit/26c5548f4ab7c6cc6d398df17767950be50d0edf (and then `python3 setup.py bdist_wheel`) Having done that, I ran `pip install ../datasette-plugin-demos/dist/datasette_plugin_demos-0.2-py3-none-any.whl` from my Datasette virtual environment and then did the following: ``` >>> import pkg_resources >>> pkg_resources.resource_stream( ... 'datasette_plugin_demos', 'static/plugin.js' ... ).read() b"alert('hello');\n" >>> pkg_resources.resource_filename( ... 'datasette_plugin_demos', 'static/plugin.js' ... ) '..../venv/lib/python3.6/site-packages/datasette_plugin_demos/static/plugin.js' >>> pkg_resources.resource_string( ... 'datasette_plugin_demos', 'static/plugin.js' ... ) b"alert('hello');\n" ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
314506446 | |
https://github.com/simonw/datasette/issues/14#issuecomment-381809998 | https://api.github.com/repos/simonw/datasette/issues/14 | 381809998 | MDEyOklzc3VlQ29tbWVudDM4MTgwOTk5OA== | 9599 | 2018-04-17T02:23:39Z | 2018-04-17T02:23:39Z | OWNER | I just shipped Datasette 0.19 with where I'm at so far: https://github.com/simonw/datasette/releases/tag/0.19 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
267707940 |