issue_comments
9,947 rows
This data as json, CSV (advanced)
id ▼ | html_url | issue_url | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
379588602 | https://github.com/simonw/datasette/issues/195#issuecomment-379588602 | https://api.github.com/repos/simonw/datasette/issues/195 | MDEyOklzc3VlQ29tbWVudDM3OTU4ODYwMg== | simonw 9599 | 2018-04-08T22:40:16Z | 2018-04-08T22:40:16Z | OWNER | Could also identify all views for that database, which would save on these queries: https://github.com/simonw/datasette/blob/b2188f044265c95f7e54860e28107c17d2a6ed2e/datasette/app.py#L543-L545 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Run pks_for_table in inspect, executing once at build time rather than constantly 312313496 | |
379591062 | https://github.com/simonw/datasette/issues/189#issuecomment-379591062 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTU5MTA2Mg== | simonw 9599 | 2018-04-08T23:23:12Z | 2018-04-08T23:23:12Z | OWNER | To break this up into smaller units, the first implementation of this will only support a single `_sort` or `_sort_desc` querystring parameter. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379592393 | https://github.com/simonw/datasette/issues/189#issuecomment-379592393 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTU5MjM5Mw== | simonw 9599 | 2018-04-08T23:45:42Z | 2018-04-08T23:46:31Z | OWNER | Actually next page SQL when sorting looks more like this: ``` select rowid, * from [alcohol-consumption/drinks] where "country" like :p0 and ( beer_servings > 111 or (beer_servings = 111 and rowid > 190) ) order by beer_servings, rowid limit 101 ``` The next page after row 190 with sortable value 111 should show either records that are greater than 111 or records that match 111 but have a greater primary key than the last one seen. https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9?sql=select+rowid%2C+*+from+%5Balcohol-consumption%2Fdrinks%5D%0D%0Awhere+%22country%22+like+%3Ap0%0D%0Aand+%28%0D%0A++++beer_servings+%3E+111%0D%0A++++or+%28beer_servings+%3D+111+and+rowid+%3E+190%29%0D%0A%29%0D%0Aorder+by+beer_servings%2C+rowid+limit+101&p0=%25a%25 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379594529 | https://github.com/simonw/datasette/issues/189#issuecomment-379594529 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTU5NDUyOQ== | simonw 9599 | 2018-04-09T00:15:03Z | 2018-04-09T00:15:03Z | OWNER | Demo: senator tweets ordered by number of replies: https://datasette-issue-189-demo.now.sh/fivethirtyeight-2628db9/twitter-ratio%2Fsenators?_sort_desc=replies Page 2 (note that since Senators retweet things there are tweets with the same text/number-of-replies but retweeted by different senators that span the page break): https://datasette-issue-189-demo.now.sh/fivethirtyeight-2628db9/twitter-ratio%2Fsenators?_next=8556%2C121799&_sort_desc=replies | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379595253 | https://github.com/simonw/datasette/issues/185#issuecomment-379595253 | https://api.github.com/repos/simonw/datasette/issues/185 | MDEyOklzc3VlQ29tbWVudDM3OTU5NTI1Mw== | simonw 9599 | 2018-04-09T00:24:10Z | 2018-04-09T00:24:10Z | OWNER | @carlmjohnson in case you aren't following along with #189 I've shipped the first working prototype of sort-by-column - you can try it out here: https://datasette-issue-189-demo-2.now.sh/salaries-7859114-7859114/2017+Maryland+state+salaries?_search=university&_sort_desc=annual_salary | {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Metadata should be a nested arbitrary KV store 299760684 | |
379595274 | https://github.com/simonw/datasette/issues/189#issuecomment-379595274 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTU5NTI3NA== | simonw 9599 | 2018-04-09T00:24:37Z | 2018-04-09T00:29:46Z | OWNER | Another demo: https://datasette-issue-189-demo-2.now.sh/salaries-7859114-7859114/2017+Maryland+state+salaries?_search=university&_sort_desc=annual_salary https://datasette-issue-189-demo-2.now.sh/salaries-7859114-7859114/2017+Maryland+state+salaries?_search=university&last_name__exact=JOHNSON&_sort_desc=annual_salary | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379602339 | https://github.com/simonw/datasette/issues/189#issuecomment-379602339 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTYwMjMzOQ== | simonw 9599 | 2018-04-09T01:33:26Z | 2018-04-09T01:33:26Z | OWNER | Small bug: "201 rows where sorted by sortable_with_nulls" shouldn't have the word "where" in it. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379602690 | https://github.com/simonw/datasette/issues/189#issuecomment-379602690 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTYwMjY5MA== | simonw 9599 | 2018-04-09T01:37:03Z | 2018-04-09T01:37:03Z | OWNER | I'm going to split the following out into separate tickets: * Ability to sort by multiple columns e.g. `?_sort=name&sort_desc=age&_sort=height` * Ability to specify nulls last e.g. `?_sort_desc_nulls_last=age` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379603156 | https://github.com/simonw/datasette/issues/189#issuecomment-379603156 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTYwMzE1Ng== | simonw 9599 | 2018-04-09T01:41:22Z | 2018-04-09T01:41:22Z | OWNER | Actually I think I always want nulls last when ordering asc, nulls first when ordering desc. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379608977 | https://github.com/simonw/datasette/issues/189#issuecomment-379608977 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTYwODk3Nw== | simonw 9599 | 2018-04-09T02:22:59Z | 2018-04-09T02:22:59Z | OWNER | Here's a demo of the new clickable column headers: https://datasette-issue-189-demo-3.now.sh/salaries-7859114-7859114/2017+Maryland+state+salaries?_search=university&_sort_desc=last_name ![2018-04-08 at 7 22 pm](https://user-images.githubusercontent.com/9599/38476370-3e62a60e-3b62-11e8-9d30-8dc6608133dd.png) | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379624163 | https://github.com/simonw/datasette/issues/193#issuecomment-379624163 | https://api.github.com/repos/simonw/datasette/issues/193 | MDEyOklzc3VlQ29tbWVudDM3OTYyNDE2Mw== | simonw 9599 | 2018-04-09T04:03:49Z | 2018-04-09T04:03:49Z | OWNER | This is harder than I thought, because the `_shape=` logic actually runs AFTER the main block of code which is set up to catch exceptions - this code here: https://github.com/simonw/datasette/blob/0abd3abacb309a2bd5913a7a2df4e9256585b1bb/datasette/app.py#L200-L216 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Cleaner mechanism for handling custom errors 310882100 | |
379634425 | https://github.com/simonw/datasette/issues/189#issuecomment-379634425 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTYzNDQyNQ== | simonw 9599 | 2018-04-09T05:16:02Z | 2018-04-09T05:16:02Z | OWNER | I've merged this into master. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379636068 | https://github.com/simonw/datasette/issues/184#issuecomment-379636068 | https://api.github.com/repos/simonw/datasette/issues/184 | MDEyOklzc3VlQ29tbWVudDM3OTYzNjA2OA== | simonw 9599 | 2018-04-09T05:26:21Z | 2018-04-09T05:26:21Z | OWNER | Do you have steps to reproduce here - ideally a small example SQLite database that exhibits the error? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 from missing table name 292011379 | |
379636695 | https://github.com/simonw/datasette/pull/181#issuecomment-379636695 | https://api.github.com/repos/simonw/datasette/issues/181 | MDEyOklzc3VlQ29tbWVudDM3OTYzNjY5NQ== | simonw 9599 | 2018-04-09T05:30:16Z | 2018-04-09T05:30:16Z | OWNER | I'd prefer to have the JavaScript actually manipulate the DOM to add the button - something like this: var button = document.createElement('button'); button.value = 'Format SQL'; button.addEventListener( 'click', format, false ); document.getElementById('run-sql').parentNode.appendChild(button); | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | add "format sql" button to query page, uses sql-formatter 289425975 | |
379759875 | https://github.com/simonw/datasette/pull/181#issuecomment-379759875 | https://api.github.com/repos/simonw/datasette/issues/181 | MDEyOklzc3VlQ29tbWVudDM3OTc1OTg3NQ== | bsmithgall 1957344 | 2018-04-09T13:53:14Z | 2018-04-09T13:53:14Z | NONE | I've implemented that approach in 86ac746. It does cause the button to pop in only after Codemirror is finished rendering which is a bit awkward. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | add "format sql" button to query page, uses sql-formatter 289425975 | |
379788103 | https://github.com/simonw/datasette/issues/184#issuecomment-379788103 | https://api.github.com/repos/simonw/datasette/issues/184 | MDEyOklzc3VlQ29tbWVudDM3OTc4ODEwMw== | carlmjohnson 222245 | 2018-04-09T15:15:11Z | 2018-04-09T15:15:11Z | NONE | Visit https://salaries.news.baltimoresun.com/salaries/bad-table. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 from missing table name 292011379 | |
379791047 | https://github.com/simonw/datasette/issues/189#issuecomment-379791047 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTc5MTA0Nw== | carlmjohnson 222245 | 2018-04-09T15:23:45Z | 2018-04-09T15:23:45Z | NONE | Awesome! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379803864 | https://github.com/simonw/datasette/issues/189#issuecomment-379803864 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTgwMzg2NA== | simonw 9599 | 2018-04-09T16:02:09Z | 2018-04-09T16:02:09Z | OWNER | This is now released in Datasette 0.15 https://github.com/simonw/datasette/releases/tag/0.15 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379830529 | https://github.com/simonw/datasette/issues/189#issuecomment-379830529 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM3OTgzMDUyOQ== | simonw 9599 | 2018-04-09T17:28:47Z | 2018-04-09T17:28:47Z | OWNER | Another demo: https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9/congress-age%2Fcongress-terms | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
379833216 | https://github.com/simonw/datasette/issues/199#issuecomment-379833216 | https://api.github.com/repos/simonw/datasette/issues/199 | MDEyOklzc3VlQ29tbWVudDM3OTgzMzIxNg== | simonw 9599 | 2018-04-09T17:37:47Z | 2018-04-09T17:37:47Z | OWNER | I may do this by adding select boxes for _sort and _sort_desc to the filters UI. This would allow sorting in mobile portrait mode but would also ensure that the existing sort order is persisted if the user edits the current filters (right now sort resets when filters are applied). | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to apply sort on mobile in portrait mode 312620566 | |
379833481 | https://github.com/simonw/datasette/issues/199#issuecomment-379833481 | https://api.github.com/repos/simonw/datasette/issues/199 | MDEyOklzc3VlQ29tbWVudDM3OTgzMzQ4MQ== | simonw 9599 | 2018-04-09T17:38:39Z | 2018-04-09T17:38:39Z | OWNER | Since you can't apply `_sort` and `_sort_desc` at the same time, maybe just one select box for picking the column to sort by and a boolean checkbox for "sort descending" - which then redirects to the `_sort_desc=` URL variant. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to apply sort on mobile in portrait mode 312620566 | |
379936068 | https://github.com/simonw/datasette/issues/199#issuecomment-379936068 | https://api.github.com/repos/simonw/datasette/issues/199 | MDEyOklzc3VlQ29tbWVudDM3OTkzNjA2OA== | simonw 9599 | 2018-04-10T00:32:37Z | 2018-04-10T00:32:37Z | OWNER | ![2018-04-09 at 5 32 pm](https://user-images.githubusercontent.com/9599/38529802-fd2a7e68-3c1b-11e8-974a-bf5438fec701.png) | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to apply sort on mobile in portrait mode 312620566 | |
379936832 | https://github.com/simonw/datasette/issues/199#issuecomment-379936832 | https://api.github.com/repos/simonw/datasette/issues/199 | MDEyOklzc3VlQ29tbWVudDM3OTkzNjgzMg== | simonw 9599 | 2018-04-10T00:37:52Z | 2018-04-10T00:37:52Z | OWNER | Demo: https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9/twitter-ratio%2Fsenators?_sort_desc=replies&text__contains=bipartisan | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to apply sort on mobile in portrait mode 312620566 | |
380606998 | https://github.com/simonw/datasette/pull/200#issuecomment-380606998 | https://api.github.com/repos/simonw/datasette/issues/200 | MDEyOklzc3VlQ29tbWVudDM4MDYwNjk5OA== | simonw 9599 | 2018-04-11T21:50:14Z | 2018-04-11T21:50:14Z | OWNER | We should only do this if we're certain the spatialite module has been loaded. I could imagine someone having a `sql_statements_log` table of their own without using spatialite for example. I think the most reliable way to detect spatialite is to run `SELECT AddGeometryColumn(1, 2, 3, 4, 5);` against a `:memory:` database and see if it throws an exception - similar to how we detect FTS. We could add this as a `detect_spatialite()` function in `utils.py` and call it once on startup. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Hide Spatialite system tables 313494458 | |
380608340 | https://github.com/simonw/datasette/issues/184#issuecomment-380608340 | https://api.github.com/repos/simonw/datasette/issues/184 | MDEyOklzc3VlQ29tbWVudDM4MDYwODM0MA== | simonw 9599 | 2018-04-11T21:55:41Z | 2018-04-11T21:55:41Z | OWNER | Yuck, nasty - OK I get it, this happens with ANY non-existent table name. Let's fix that - these should clearly return an HTTP 404. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 500 from missing table name 292011379 | |
380608372 | https://github.com/simonw/datasette/pull/200#issuecomment-380608372 | https://api.github.com/repos/simonw/datasette/issues/200 | MDEyOklzc3VlQ29tbWVudDM4MDYwODM3Mg== | russss 45057 | 2018-04-11T21:55:46Z | 2018-04-11T21:55:46Z | CONTRIBUTOR | > I think the most reliable way to detect spatialite is to run `SELECT AddGeometryColumn(1, 2, 3, 4, 5);` against a `:memory:` database and see if it throws an exception Or just see if there's a `geometry_columns` table? I think that's quite unlikely to be added by accident (and it's an OGC standard). It also tells you if Spatialite is installed in the database rather than just loaded. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Hide Spatialite system tables 313494458 | |
380619851 | https://github.com/simonw/datasette/issues/193#issuecomment-380619851 | https://api.github.com/repos/simonw/datasette/issues/193 | MDEyOklzc3VlQ29tbWVudDM4MDYxOTg1MQ== | simonw 9599 | 2018-04-11T22:48:19Z | 2018-04-11T22:48:19Z | OWNER | I can clean this up further with the mechanism I'm using for #184 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Cleaner mechanism for handling custom errors 310882100 | |
380951474 | https://github.com/simonw/datasette/pull/200#issuecomment-380951474 | https://api.github.com/repos/simonw/datasette/issues/200 | MDEyOklzc3VlQ29tbWVudDM4MDk1MTQ3NA== | simonw 9599 | 2018-04-12T21:34:39Z | 2018-04-12T21:34:39Z | OWNER | Nice, thanks very much. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Hide Spatialite system tables 313494458 | |
380951815 | https://github.com/simonw/datasette/issues/203#issuecomment-380951815 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MDk1MTgxNQ== | simonw 9599 | 2018-04-12T21:36:10Z | 2018-04-12T21:36:10Z | OWNER | I like this. I'd like to be able to attach a full description to a column as well. We could support these in `metadata.json` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
380951920 | https://github.com/simonw/datasette/issues/203#issuecomment-380951920 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MDk1MTkyMA== | simonw 9599 | 2018-04-12T21:36:38Z | 2018-04-12T21:36:38Z | OWNER | This also feeds into the visualization features I want to add - we could use this kind of metadata to automatically apply meaningful labels to graphs. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
380966565 | https://github.com/simonw/datasette/issues/203#issuecomment-380966565 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MDk2NjU2NQ== | russss 45057 | 2018-04-12T22:43:08Z | 2018-04-12T22:43:08Z | CONTRIBUTOR | Looks like [pint](https://pint.readthedocs.io/en/latest/tutorial.html) is pretty good at this. ```python In [1]: import pint In [2]: ureg = pint.UnitRegistry() In [3]: q = 3e6 * ureg('Hz') In [4]: '{:~P}'.format(q.to_compact()) Out[4]: '3.0 MHz' In [5]: q = 0.3 * ureg('m') In [5]: '{:~P}'.format(q.to_compact()) Out[5]: '300.0 mm' In [6]: q = 5 * ureg('') In [7]: '{:~P}'.format(q.to_compact()) Out[7]: '5' ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381220441 | https://github.com/simonw/datasette/pull/202#issuecomment-381220441 | https://api.github.com/repos/simonw/datasette/issues/202 | MDEyOklzc3VlQ29tbWVudDM4MTIyMDQ0MQ== | simonw 9599 | 2018-04-13T18:19:15Z | 2018-04-13T18:19:15Z | OWNER | I'm afraid I've just made this obsolete with 9f28bbe43dc277a3963a12aaae37b5ee3c277207 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Raise 404 on nonexistent table URLs 313785206 | |
381237440 | https://github.com/simonw/datasette/pull/202#issuecomment-381237440 | https://api.github.com/repos/simonw/datasette/issues/202 | MDEyOklzc3VlQ29tbWVudDM4MTIzNzQ0MA== | russss 45057 | 2018-04-13T19:22:53Z | 2018-04-13T19:22:53Z | CONTRIBUTOR | I spotted you'd mentioned that in #184 but only after I'd written the patch! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Raise 404 on nonexistent table URLs 313785206 | |
381262824 | https://github.com/simonw/datasette/issues/201#issuecomment-381262824 | https://api.github.com/repos/simonw/datasette/issues/201 | MDEyOklzc3VlQ29tbWVudDM4MTI2MjgyNA== | simonw 9599 | 2018-04-13T21:17:14Z | 2018-04-13T21:17:14Z | OWNER | Demo: https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9?sql=explain+query+plan+select+*+from+%5Bmost-common-name%2Fsurnames%5D+order+by+rank+desc https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9?sql=explain+select+*+from+%5Bmost-common-name%2Fsurnames%5D+order+by+rank+desc | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support explain select / explain query plan select 313512748 | |
381300336 | https://github.com/simonw/datasette/issues/203#issuecomment-381300336 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTMwMDMzNg== | simonw 9599 | 2018-04-14T03:35:02Z | 2018-04-14T03:35:02Z | OWNER | This is really cool - I'm very impressed by pint. I'd like to figure out a sensible opt-in way to expose this in the JSON output as well. Maybe with a `&_units=true` parameter? We should definitely expose the units section from the table metadata in the output of https://wtr-api.herokuapp.com/wtr-663ea99/license_frequency.json | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381300386 | https://github.com/simonw/datasette/issues/203#issuecomment-381300386 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTMwMDM4Ng== | simonw 9599 | 2018-04-14T03:35:56Z | 2018-04-14T03:35:56Z | OWNER | In #204 you said "I'd like to add support for using units when querying but this is PR is pretty usable as-is." - I'm fascinated to hear more about how this could work. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381315675 | https://github.com/simonw/datasette/issues/203#issuecomment-381315675 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTMxNTY3NQ== | russss 45057 | 2018-04-14T09:14:45Z | 2018-04-14T09:27:30Z | CONTRIBUTOR | > I'd like to figure out a sensible opt-in way to expose this in the JSON output as well. Maybe with a &_units=true parameter? <s>From a machine-readable perspective I'm not sure why it would be useful to decorate the values with units</s>. Edit: Should have had some coffee first. It's clearly useful for stuff like map rendering! I agree that the unit metadata should definitely be exposed in the JSON. > In #204 you said "I'd like to add support for using units when querying but this is PR is pretty usable as-is." - I'm fascinated to hear more about how this could work. I'm thinking about a couple of approaches here. I think the simplest one is: if the column has a unit attached, optionally accept units in query fields: ```python column_units = ureg("Hz") # Create a unit object for the column's unit query_variable = ureg("4 GHz") # Supplied query variable # Now we can convert the query units into column units before querying supplied_value.to(column_units).magnitude > 4000000000.0 # If the user doesn't supply units, pint just returns the plain # number and we can query as usual assuming it's the base unit query_variable = ureg("50") query_variable > 50 isinstance(query_variable, numbers.Number) > True ``` This also lets us do some nice unit conversion on querying: ```python column_units = ureg("m") query_variable = ureg("50 ft") supplied_value.to(column_units) > <Quantity(15.239999999999998, 'meter')> ``` The alternative would be to provide a dropdown of units next to the query field (so a "Hz" field would give you "kHz", "MHz", "GHz"). Although this would be clearer to the user, it isn't so easy - we'd need to know more about the context of the field to give you sensible SI prefixes (I'm not so interested in nanoHertz, for example). You also lose the bonus of being able to convert - although pint will happily show you all the compatible units, it again suffers from a lack of context: ```python ureg("m").compatible_units() > frozenset({<Unit('angstrom')>, … | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381330075 | https://github.com/simonw/datasette/issues/203#issuecomment-381330075 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTMzMDA3NQ== | simonw 9599 | 2018-04-14T13:41:53Z | 2018-04-14T13:41:53Z | OWNER | Presumably units only work for numeric fields? If that's the case then automatically processing them if the incoming query string argument has a unit suffix makes total sense to me. Here's a pretty crazy idea: what if we exposed unit conversion to SQL as a custom SQLite function? That way it would be possible to optionally use units in actual custom SQL queries. I'd have to think quite carefully about performance implications here - wouldn't want a poorly considered unit calculation over a 500,000 row table to lock up the server. But I think the 1s query time limit might still prevent that. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381330220 | https://github.com/simonw/datasette/pull/205#issuecomment-381330220 | https://api.github.com/repos/simonw/datasette/issues/205 | MDEyOklzc3VlQ29tbWVudDM4MTMzMDIyMA== | simonw 9599 | 2018-04-14T13:44:15Z | 2018-04-14T13:44:15Z | OWNER | This looks great so far - love the new documentation. Let's throw in a unit test or two for the basic unit filters (mainly as a protection against accidental regressions in the future). | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support filtering with units and more 314319372 | |
381332222 | https://github.com/simonw/datasette/pull/205#issuecomment-381332222 | https://api.github.com/repos/simonw/datasette/issues/205 | MDEyOklzc3VlQ29tbWVudDM4MTMzMjIyMg== | russss 45057 | 2018-04-14T14:16:35Z | 2018-04-14T14:16:35Z | CONTRIBUTOR | I've added some tests and that docs link. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support filtering with units and more 314319372 | |
381334973 | https://github.com/simonw/datasette/pull/207#issuecomment-381334973 | https://api.github.com/repos/simonw/datasette/issues/207 | MDEyOklzc3VlQ29tbWVudDM4MTMzNDk3Mw== | simonw 9599 | 2018-04-14T14:59:52Z | 2018-04-14T14:59:52Z | OWNER | I'm going to merge this and then add a unit test. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Link foreign keys which don't have labels 314329002 | |
381336696 | https://github.com/simonw/datasette/pull/205#issuecomment-381336696 | https://api.github.com/repos/simonw/datasette/issues/205 | MDEyOklzc3VlQ29tbWVudDM4MTMzNjY5Ng== | simonw 9599 | 2018-04-14T15:24:04Z | 2018-04-14T15:24:04Z | OWNER | I merged this to master in c857608738d6b6c3e4f3248304a22f8b2648dd3e - thanks @russss! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support filtering with units and more 314319372 | |
381348849 | https://github.com/simonw/datasette/issues/203#issuecomment-381348849 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTM0ODg0OQ== | simonw 9599 | 2018-04-14T18:12:52Z | 2018-04-14T18:12:52Z | OWNER | I think I'm going to hold on to the custom sql function idea for the moment and implement it as an example plugin. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381361734 | https://github.com/simonw/datasette/issues/125#issuecomment-381361734 | https://api.github.com/repos/simonw/datasette/issues/125 | MDEyOklzc3VlQ29tbWVudDM4MTM2MTczNA== | russss 45057 | 2018-04-14T21:26:30Z | 2018-04-14T21:26:30Z | CONTRIBUTOR | FWIW I am now doing this on my WTR app (instead of silently limiting maps to 1000). [Telefonica](https://wtr-api.herokuapp.com/wtr-663ea99/licensee/18325) now has about 4000 markers and good old [BT](https://wtr-api.herokuapp.com/wtr-663ea99/licensee/8412) has 22,000 or so. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Plot rows on a map with Leaflet and Leaflet.markercluster 275135393 | |
381429213 | https://github.com/simonw/datasette/issues/189#issuecomment-381429213 | https://api.github.com/repos/simonw/datasette/issues/189 | MDEyOklzc3VlQ29tbWVudDM4MTQyOTIxMw== | carlmjohnson 222245 | 2018-04-15T18:54:22Z | 2018-04-15T18:54:22Z | NONE | I think I found a bug. I tried to sort by middle initial in my salaries set, and many middle initials are null. The next_url gets set by Datasette to: http://localhost:8001/salaries-d3a5631/2017+Maryland+state+salaries?_next=None%2C391&_sort=middle_initial But then `None` is interpreted literally and it tries to find a name with the middle initial "None" and ends up skipping ahead to O on page 2. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability to sort (and paginate) by column 309471814 | |
381441392 | https://github.com/simonw/datasette/pull/209#issuecomment-381441392 | https://api.github.com/repos/simonw/datasette/issues/209 | MDEyOklzc3VlQ29tbWVudDM4MTQ0MTM5Mg== | russss 45057 | 2018-04-15T21:59:15Z | 2018-04-15T21:59:15Z | CONTRIBUTOR | I suspected this would cause some test failures, but I'll wait for opinions before attempting to fix them. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Don't duplicate simple primary keys in the link column 314455877 | |
381442233 | https://github.com/simonw/datasette/issues/14#issuecomment-381442233 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ0MjIzMw== | simonw 9599 | 2018-04-15T22:13:06Z | 2018-04-15T22:13:06Z | OWNER | I started a thread on Twitter asking people for good examples of Python projects with a strong plugin ecosystem: https://twitter.com/simonw/status/985377670388105216 The most impressive example that came back was pytest - which now has nearly 400 plugins: https://plugincompat.herokuapp.com/ The pytest plugin infrastructure is available as an independent package called pluggy - which appears to offer everything I need for Datasette. I'm going to give that a go and see how well it works: https://pluggy.readthedocs.io/en/latest/ | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381442494 | https://github.com/simonw/datasette/issues/14#issuecomment-381442494 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ0MjQ5NA== | simonw 9599 | 2018-04-15T22:17:59Z | 2018-04-15T22:17:59Z | OWNER | Datasette 1.0 will be the release of Datasette that attempts to provide a stable plugin API: https://github.com/simonw/datasette/milestone/7 There's a lot of work to be done before then, but as a starting point I'm going to support two very simple extension mechanisms: * Template system plugins - where the hook gets passed the Jinja environment and can freely register new template tags and filters * SQLite connection plugins - where the hook gets passed a new SQLite connection and can register custom SQLite functions The template system hook will go near here: https://github.com/simonw/datasette/blob/efbb4e83374a2c795e436c72fa79f70da72309b8/datasette/app.py#L1225-L1228 The SQLite connection hook will go near here: https://github.com/simonw/datasette/blob/efbb4e83374a2c795e436c72fa79f70da72309b8/datasette/app.py#L1094-L1098 These two feel simple enough that I'm not worried that I might design an API that I later regret. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381443728 | https://github.com/simonw/datasette/issues/14#issuecomment-381443728 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ0MzcyOA== | simonw 9599 | 2018-04-15T22:39:00Z | 2018-04-15T22:39:00Z | OWNER | Tox is a good example of a project that uses pluggy in the way I want to use it (function hooks rather than classes): https://github.com/tox-dev/tox/blob/master/tox/hookspecs.py | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381446392 | https://github.com/simonw/datasette/issues/14#issuecomment-381446392 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ0NjM5Mg== | simonw 9599 | 2018-04-15T23:22:40Z | 2018-04-16T05:25:57Z | OWNER | OK, from that prototype in f2720b0c6b7172ebe8820 it looks like pluggy provides a solid path forward. Next steps: - [x] Build a demo plugin that uses setuptools entrypoints to register with the `datasette` plugin manager via pluggy - [x] Figure out a mechanism for registering plugins without first needing to publish them to PyPI. Can I load plugins from a special `plugins/` directory similar to the `--template-dir=templates/` option already supported by Datasette? #211 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381446511 | https://github.com/simonw/datasette/issues/14#issuecomment-381446511 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ0NjUxMQ== | simonw 9599 | 2018-04-15T23:25:04Z | 2018-04-15T23:25:04Z | OWNER | Here's a demo of the `convert_units()` SQL function I prototyped in f2720b0c6b7172ebe88 ![2018-04-15 at 4 23 pm](https://user-images.githubusercontent.com/9599/38784633-8c43821e-40c9-11e8-97dd-697755a0f858.png) | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381446554 | https://github.com/simonw/datasette/issues/203#issuecomment-381446554 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTQ0NjU1NA== | simonw 9599 | 2018-04-15T23:25:54Z | 2018-04-15T23:26:03Z | OWNER | I built a prototype of the `convert_units()` custom SQL function as a plugin over in https://github.com/simonw/datasette/issues/14#issuecomment-381446511 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381446906 | https://github.com/simonw/datasette/issues/14#issuecomment-381446906 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ0NjkwNg== | simonw 9599 | 2018-04-15T23:31:58Z | 2018-04-15T23:34:10Z | OWNER | Once I've got the plugins mechanism stable and people start releasing plugins it would be useful to have a dedicated Trove classifier on PyPI for Datasette plugins - `Framework :: Datasette` for example. This would help me build a Datasette equivalent of the http://plugincompat.herokuapp.com/ site, which works by scanning PyPI for items with the ``Framework :: Pytest`` classifier: https://github.com/pytest-dev/plugincompat/blob/8bdf1a6fb82807091ece0c68c196103ee8270194/update_index.py#L52-L53 It looks like the mechanism for requesting new PyPI classifiers is to file a ticket against warehouse, like these ones: https://github.com/pypa/warehouse/issues/3570 and https://github.com/pypa/warehouse/issues/2881 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381450394 | https://github.com/simonw/datasette/issues/14#issuecomment-381450394 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ1MDM5NA== | simonw 9599 | 2018-04-16T00:27:23Z | 2018-04-16T00:27:23Z | OWNER | I created https://github.com/simonw/datasette-plugin-demos which is now published to PyPI and can be installed with `pip install datasette-plugin-demos` - I've confirmed that if you DO install it my Datasette `plugins` branch picks up the plugins, and `select random_integer(1, 4)` works as it should. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381450591 | https://github.com/simonw/datasette/issues/14#issuecomment-381450591 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTQ1MDU5MQ== | simonw 9599 | 2018-04-16T00:30:22Z | 2018-04-16T00:34:42Z | OWNER | Slight code design problem... when I tried installing my branch in a fresh virtual environment I got this error, because `setup.py` now depends on `pluggy` (from importing `__version__`): ``` File "/private/var/folders/jj/fngnv0810tn2lt_kd3911pdc0000gp/T/pip-req-build-dftqdezt/setup.py", line 2, in <module> from datasette import __version__ File "/private/var/folders/jj/fngnv0810tn2lt_kd3911pdc0000gp/T/pip-req-build-dftqdezt/datasette/__init__.py", line 2, in <module> from .hookspecs import hookimpl # noqa File "/private/var/folders/jj/fngnv0810tn2lt_kd3911pdc0000gp/T/pip-req-build-dftqdezt/datasette/hookspecs.py", line 1, in <module> from pluggy import HookimplMarker ModuleNotFoundError: No module named 'pluggy' ``` Looks like I've run into point 6 on https://packaging.python.org/guides/single-sourcing-package-version/ : ![2018-04-15 at 5 34 pm](https://user-images.githubusercontent.com/9599/38785314-403ce86a-40d3-11e8-8542-ba426eddf4ac.png) | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381455054 | https://github.com/simonw/datasette/issues/139#issuecomment-381455054 | https://api.github.com/repos/simonw/datasette/issues/139 | MDEyOklzc3VlQ29tbWVudDM4MTQ1NTA1NA== | simonw 9599 | 2018-04-16T01:24:13Z | 2018-04-16T01:24:13Z | OWNER | I think Vega-Lite is the way to go here: https://vega.github.io/vega-lite/ I've been playing around with it and Datasette with some really positive initial results: https://vega.github.io/editor/#/gist/vega-lite/simonw/89100ce80573d062d70f780d10e5e609/decada131575825875c0a076e418c661c2adb014/vice-shootings-gender-race-by-department.vl.json https://vega.github.io/editor/#/gist/vega-lite/simonw/5f69fbe29380b0d5d95f31a385f49ee4/7087b64df03cf9dba44a5258a606f29182cb8619/trees-san-francisco.vl.json | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Build a visualization plugin for Vega 275493851 | |
381456434 | https://github.com/simonw/datasette/issues/211#issuecomment-381456434 | https://api.github.com/repos/simonw/datasette/issues/211 | MDEyOklzc3VlQ29tbWVudDM4MTQ1NjQzNA== | simonw 9599 | 2018-04-16T01:36:16Z | 2018-04-16T01:37:44Z | OWNER | The easiest way to implement this in Python 2 would be `execfile(...)` - but that was removed in Python 3. According to https://stackoverflow.com/a/437857/6083 `2to3` replaces that with this, which ensures the filename is associated with the code for debugging purposes: ``` with open("somefile.py") as f: code = compile(f.read(), "somefile.py", 'exec') exec(code, global_vars, local_vars) ``` Implementing it this way would force this kind of plugin to be self-contained in a single file. I think that's OK: if you want a more complex plugin you can use the standard pluggy-powered setuptools mechanism to build it. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Load plugins from a `--plugins-dir=plugins/` directory 314471743 | |
381462005 | https://github.com/simonw/datasette/issues/211#issuecomment-381462005 | https://api.github.com/repos/simonw/datasette/issues/211 | MDEyOklzc3VlQ29tbWVudDM4MTQ2MjAwNQ== | simonw 9599 | 2018-04-16T02:23:07Z | 2018-04-16T02:23:07Z | OWNER | This needs unit tests. I also need to manually test the `datasette package` and `datesette publish` commands. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Load plugins from a `--plugins-dir=plugins/` directory 314471743 | |
381478217 | https://github.com/simonw/datasette/issues/211#issuecomment-381478217 | https://api.github.com/repos/simonw/datasette/issues/211 | MDEyOklzc3VlQ29tbWVudDM4MTQ3ODIxNw== | simonw 9599 | 2018-04-16T04:41:38Z | 2018-04-16T04:41:38Z | OWNER | Here's the result of running: datasette publish now fivethirtyeight.db \ --plugins-dir=plugins/ --title="FiveThirtyEight" --branch=plugins-dir https://datasette-phjtvzwwzl.now.sh/fivethirtyeight-2628db9?sql=select+convert_units%28100%2C+%27m%27%2C+%27ft%27%29 Where `plugins/pint_plugin.py` contains the following: ``` from datasette import hookimpl import pint ureg = pint.UnitRegistry() @hookimpl def prepare_connection(conn): def convert_units(amount, from_, to_): "select convert_units(100, 'm', 'ft');" return (amount * ureg(from_)).to(to_).to_tuple()[0] conn.create_function('convert_units', 3, convert_units) ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Load plugins from a `--plugins-dir=plugins/` directory 314471743 | |
381478253 | https://github.com/simonw/datasette/issues/211#issuecomment-381478253 | https://api.github.com/repos/simonw/datasette/issues/211 | MDEyOklzc3VlQ29tbWVudDM4MTQ3ODI1Mw== | simonw 9599 | 2018-04-16T04:42:02Z | 2018-04-16T04:42:02Z | OWNER | This worked as well: datasette package fivethirtyeight.db \ --plugins-dir=plugins/ --title="FiveThirtyEight" --branch=plugins-dir | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Load plugins from a `--plugins-dir=plugins/` directory 314471743 | |
381481990 | https://github.com/simonw/datasette/issues/211#issuecomment-381481990 | https://api.github.com/repos/simonw/datasette/issues/211 | MDEyOklzc3VlQ29tbWVudDM4MTQ4MTk5MA== | simonw 9599 | 2018-04-16T05:14:57Z | 2018-04-16T05:14:57Z | OWNER | Added unit tests in 33c6bcadb962457be6b0c7f369826b404e2bcef5 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Load plugins from a `--plugins-dir=plugins/` directory 314471743 | |
381482407 | https://github.com/simonw/datasette/issues/211#issuecomment-381482407 | https://api.github.com/repos/simonw/datasette/issues/211 | MDEyOklzc3VlQ29tbWVudDM4MTQ4MjQwNw== | simonw 9599 | 2018-04-16T05:18:29Z | 2018-04-16T05:18:29Z | OWNER | Here's the result of running this: datasette publish heroku fivethirtyeight.db \ --plugins-dir=plugins/ --title="FiveThirtyEight" --branch=plugins-dir https://intense-river-24599.herokuapp.com/fivethirtyeight-2628db9?sql=select+convert_units%28100%2C+%27m%27%2C+%27ft%27%29 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Load plugins from a `--plugins-dir=plugins/` directory 314471743 | |
381483301 | https://github.com/simonw/datasette/pull/209#issuecomment-381483301 | https://api.github.com/repos/simonw/datasette/issues/209 | MDEyOklzc3VlQ29tbWVudDM4MTQ4MzMwMQ== | simonw 9599 | 2018-04-16T05:25:08Z | 2018-04-16T05:25:08Z | OWNER | I think this is a good improvement. If you fix the tests I'll merge it. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Don't duplicate simple primary keys in the link column 314455877 | |
381488049 | https://github.com/simonw/datasette/issues/191#issuecomment-381488049 | https://api.github.com/repos/simonw/datasette/issues/191 | MDEyOklzc3VlQ29tbWVudDM4MTQ4ODA0OQ== | simonw 9599 | 2018-04-16T05:58:15Z | 2018-04-16T05:58:15Z | OWNER | I think this is pretty hard. @coleifer has done some work in this direction, including https://github.com/coleifer/pysqlite3 which ports the standalone pysqlite module to Python 3. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Figure out how to bundle a more up-to-date SQLite 310533258 | |
381490361 | https://github.com/simonw/datasette/issues/214#issuecomment-381490361 | https://api.github.com/repos/simonw/datasette/issues/214 | MDEyOklzc3VlQ29tbWVudDM4MTQ5MDM2MQ== | simonw 9599 | 2018-04-16T06:13:02Z | 2018-04-16T06:13:02Z | OWNER | Packaging JS and CSS in a pip installable wheel is fiddly but possible. http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources from pkg_resources import resource_string foo_config = resource_string(__name__, 'foo.conf') | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability for plugins to define extra JavaScript and CSS 314506446 | |
381491707 | https://github.com/simonw/datasette/issues/214#issuecomment-381491707 | https://api.github.com/repos/simonw/datasette/issues/214 | MDEyOklzc3VlQ29tbWVudDM4MTQ5MTcwNw== | simonw 9599 | 2018-04-16T06:21:23Z | 2018-04-16T06:21:23Z | OWNER | This looks like a good example: https://github.com/funkey/nyroglancer/commit/d4438ab42171360b2b8e9020f672846dd70c8d80 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability for plugins to define extra JavaScript and CSS 314506446 | |
381602005 | https://github.com/simonw/datasette/issues/191#issuecomment-381602005 | https://api.github.com/repos/simonw/datasette/issues/191 | MDEyOklzc3VlQ29tbWVudDM4MTYwMjAwNQ== | coleifer 119974 | 2018-04-16T13:37:32Z | 2018-04-16T13:37:32Z | NONE | I don't think it should be too difficult... you can look at what @ghaering did with pysqlite (and similarly what I copied for pysqlite3). You would theoretically take an amalgamation build of Sqlite (all code in a single .c and .h file). The `AmalgamationLibSqliteBuilder` class detects the presence of this amalgamated source file and builds a statically-linked pysqlite. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Figure out how to bundle a more up-to-date SQLite 310533258 | |
381611738 | https://github.com/simonw/datasette/issues/14#issuecomment-381611738 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTYxMTczOA== | simonw 9599 | 2018-04-16T14:07:30Z | 2018-04-16T14:07:30Z | OWNER | I should check if it's possible to have two template registration function plugins in a single plugin module. If it isn't maybe I should use class plugins instead of module plugins. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381612585 | https://github.com/simonw/datasette/issues/214#issuecomment-381612585 | https://api.github.com/repos/simonw/datasette/issues/214 | MDEyOklzc3VlQ29tbWVudDM4MTYxMjU4NQ== | simonw 9599 | 2018-04-16T14:10:16Z | 2018-04-16T14:10:16Z | OWNER | `resource_stream` returns a file-like object which may be better for serving from Sanic. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Ability for plugins to define extra JavaScript and CSS 314506446 | |
381621338 | https://github.com/simonw/datasette/issues/14#issuecomment-381621338 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTYyMTMzOA== | simonw 9599 | 2018-04-16T14:36:27Z | 2018-04-16T14:36:27Z | OWNER | Annoyingly, the following only results in the last of the two `prepare_connection` hooks being registered: ``` from datasette import hookimpl import pint import random ureg = pint.UnitRegistry() @hookimpl def prepare_connection(conn): def convert_units(amount, from_, to_): "select convert_units(100, 'm', 'ft');" return (amount * ureg(from_)).to(to_).to_tuple()[0] conn.create_function('convert_units', 3, convert_units) @hookimpl def prepare_connection(conn): conn.create_function('random_integer', 2, random.randint) ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381622793 | https://github.com/simonw/datasette/issues/14#issuecomment-381622793 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTYyMjc5Mw== | simonw 9599 | 2018-04-16T14:40:39Z | 2018-04-17T01:47:15Z | OWNER | I think that's OK. The two plugins I've implemented so far (`prepare_connection` and `prepare_jinja2_environment`) both make sense if they can only be defined once-per-plugin. For the moment I'll assume I can define future hooks to work well with the same limitation. The syntactic sugar idea in #220 can help here too. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Datasette Plugins 267707940 | |
381643173 | https://github.com/simonw/datasette/issues/216#issuecomment-381643173 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0MzE3Mw== | simonw 9599 | 2018-04-16T15:21:17Z | 2018-04-16T15:21:17Z | OWNER | Yikes, definitely a bug. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381644355 | https://github.com/simonw/datasette/issues/216#issuecomment-381644355 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0NDM1NQ== | simonw 9599 | 2018-04-16T15:24:38Z | 2018-04-16T15:24:38Z | OWNER | So there are two tricky problems to solve here: * I need a way of encoding `null` into that `_next=` that is unambiguous from the string `None` or `null`. This means introducing some kind of escaping mechanism in those strings. I already use URL encoding as part of the construction of those components here, maybe that can help here? * I need to figure out what the SQL should be for the "next" set of results if the previous value was null. Thankfully we use the primary key as a tie-breaker so this shouldn't be impossible. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381645274 | https://github.com/simonw/datasette/issues/216#issuecomment-381645274 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0NTI3NA== | simonw 9599 | 2018-04-16T15:27:16Z | 2018-04-16T15:27:16Z | OWNER | Relevant code: https://github.com/simonw/datasette/blob/904f1c75a3c17671d25c53b91e177c249d14ab3b/datasette/app.py#L828-L832 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381645973 | https://github.com/simonw/datasette/issues/216#issuecomment-381645973 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0NTk3Mw== | simonw 9599 | 2018-04-16T15:29:11Z | 2018-04-16T15:29:11Z | OWNER | I could use `$null` as a magic value that means None. Since I'm applying `quote_plus()` to actual values, any legit strings that look like this will be encoded as `%24null`: ``` >>> urllib.parse.quote_plus('$null') '%24null' ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381648053 | https://github.com/simonw/datasette/issues/216#issuecomment-381648053 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0ODA1Mw== | simonw 9599 | 2018-04-16T15:35:17Z | 2018-04-16T15:35:17Z | OWNER | I think the correct SQL is this: https://datasette-issue-189-demo-3.now.sh/salaries-7859114-7859114?sql=select+rowid%2C+*+from+%5B2017+Maryland+state+salaries%5D%0D%0Awhere+%28middle_initial+is+not+null+or+%28middle_initial+is+null+and+rowid+%3E+%3Ap0%29%29%0D%0Aorder+by+middle_initial+limit+101&p0=391 ``` select rowid, * from [2017 Maryland state salaries] where (middle_initial is not null or (middle_initial is null and rowid > :p0)) order by middle_initial limit 101 ``` Though this will also need to be taken into account for #198 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381649140 | https://github.com/simonw/datasette/issues/216#issuecomment-381649140 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0OTE0MA== | simonw 9599 | 2018-04-16T15:38:29Z | 2018-04-16T15:38:29Z | OWNER | But what would that SQL look like for `_sort_desc`? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381649437 | https://github.com/simonw/datasette/issues/216#issuecomment-381649437 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTY0OTQzNw== | simonw 9599 | 2018-04-16T15:39:21Z | 2018-04-16T15:39:21Z | OWNER | Here's where that SQL gets constructed at the moment: https://github.com/simonw/datasette/blob/10a34f995c70daa37a8a2aa02c3135a4b023a24c/datasette/app.py#L761-L771 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381738137 | https://github.com/simonw/datasette/pull/209#issuecomment-381738137 | https://api.github.com/repos/simonw/datasette/issues/209 | MDEyOklzc3VlQ29tbWVudDM4MTczODEzNw== | russss 45057 | 2018-04-16T20:27:43Z | 2018-04-16T20:27:43Z | CONTRIBUTOR | Tests now fixed, honest. The failing test on Travis looks like an intermittent sqlite failure which should resolve itself on a retry... | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Don't duplicate simple primary keys in the link column 314455877 | |
381763651 | https://github.com/simonw/datasette/issues/203#issuecomment-381763651 | https://api.github.com/repos/simonw/datasette/issues/203 | MDEyOklzc3VlQ29tbWVudDM4MTc2MzY1MQ== | russss 45057 | 2018-04-16T21:59:17Z | 2018-04-16T21:59:17Z | CONTRIBUTOR | Ah, I had no idea you could bind python functions into sqlite! I think the primary purpose of this issue has been served now - I'm going to close this and create a new issue for the only bit of this that hasn't been touched yet, which is (optionally) exposing units in the JSON API. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Support for units 313837303 | |
381777108 | https://github.com/simonw/datasette/issues/220#issuecomment-381777108 | https://api.github.com/repos/simonw/datasette/issues/220 | MDEyOklzc3VlQ29tbWVudDM4MTc3NzEwOA== | simonw 9599 | 2018-04-16T23:04:04Z | 2018-04-16T23:04:04Z | OWNER | This could also help workaround the current predicament that a single plugin can only define one prepare_connection hook. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Investigate syntactic sugar for plugins 314847571 | |
381786522 | https://github.com/simonw/datasette/issues/216#issuecomment-381786522 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTc4NjUyMg== | simonw 9599 | 2018-04-16T23:58:45Z | 2018-04-16T23:59:13Z | OWNER | Weird... tests are failing in Travis, despite passing on my local machine. https://travis-ci.org/simonw/datasette/builds/367423706 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381788051 | https://github.com/simonw/datasette/issues/216#issuecomment-381788051 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTc4ODA1MQ== | simonw 9599 | 2018-04-17T00:07:48Z | 2018-04-17T00:07:48Z | OWNER | Still failing. This is very odd. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381794744 | https://github.com/simonw/datasette/issues/216#issuecomment-381794744 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTc5NDc0NA== | simonw 9599 | 2018-04-17T00:51:41Z | 2018-04-17T00:51:41Z | OWNER | I'm reverting this out of master until I can figure out why the tests are failing. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381798786 | https://github.com/simonw/datasette/issues/216#issuecomment-381798786 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTc5ODc4Ng== | simonw 9599 | 2018-04-17T01:18:25Z | 2018-04-17T01:18:25Z | OWNER | Here's the test that's failing: https://github.com/simonw/datasette/blob/59a3aa859c0e782aeda9a515b1b52c358e8458a2/tests/test_api.py#L437-L470 I got Travis to spit out the `fetched` and `expected` variables. `expected` has 201 items in it and is identical to what I get on my local laptop. `fetched` has 250 items in it, so it's clearly different from my local environment. I've managed to replicate the bug in production! I created a test database like this: python tests/fixtures.py sortable.db Then deployed that database like so: datasette publish now sortable.db \ --extra-options="--page_size=50" --branch=debug-travis-issue-216 And... if you click "next" on this page https://datasette-issue-216-pagination.now.sh/sortable-5679797/sortable?_sort_desc=sortable_with_nulls five times you get back 250 results, when you should only get back 201. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381799267 | https://github.com/simonw/datasette/issues/216#issuecomment-381799267 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTc5OTI2Nw== | simonw 9599 | 2018-04-17T01:21:35Z | 2018-04-17T01:21:35Z | OWNER | The version that I deployed which exhibits the bug is running SQLite `3.8.7.1` - https://datasette-issue-216-pagination.now.sh/sortable-5679797?sql=select+sqlite_version%28%29 The version that I have running locally which does NOT exhibit the bug is running SQLite `3.23.0` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381799408 | https://github.com/simonw/datasette/issues/216#issuecomment-381799408 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTc5OTQwOA== | simonw 9599 | 2018-04-17T01:22:30Z | 2018-04-17T01:22:30Z | OWNER | ... which is VERY surprising, because `3.23.0` only came out on 2nd April this year: https://www.sqlite.org/changes.html - I have no idea how I came to be running that version on my laptop. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381801302 | https://github.com/simonw/datasette/issues/216#issuecomment-381801302 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTgwMTMwMg== | simonw 9599 | 2018-04-17T01:33:43Z | 2018-04-17T01:33:43Z | OWNER | This is the SQL that returns differing results in production and on my laptop: https://datasette-issue-216-pagination.now.sh/sortable-5679797?sql=select+%2A+from+sortable+where+%28sortable_with_nulls+is+null+and+%28%28pk1+%3E+%3Ap0%29%0A++or%0A%28pk1+%3D+%3Ap0+and+pk2+%3E+%3Ap1%29%29%29+order+by+sortable_with_nulls+desc+limit+51&p0=b&p1=t ``` select * from sortable where (sortable_with_nulls is null and ((pk1 > :p0) or (pk1 = :p0 and pk2 > :p1))) order by sortable_with_nulls desc limit 51 ``` I think that `order by sortable_with_nulls desc` bit is at fault - the primary keys should be included in that order by as well. Sure enough, changing the query to this one returns the same results across both environments: ``` select * from sortable where (sortable_with_nulls is null and ((pk1 > :p0) or (pk1 = :p0 and pk2 > :p1))) order by sortable_with_nulls desc, pk1, pk2 limit 51 ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381803157 | https://github.com/simonw/datasette/issues/216#issuecomment-381803157 | https://api.github.com/repos/simonw/datasette/issues/216 | MDEyOklzc3VlQ29tbWVudDM4MTgwMzE1Nw== | simonw 9599 | 2018-04-17T01:45:24Z | 2018-04-17T01:45:24Z | OWNER | Fixed! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Bug: Sort by column with NULL in next_page URL 314665147 | |
381809998 | https://github.com/simonw/datasette/issues/14#issuecomment-381809998 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MTgwOTk5OA== | simonw 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} | Datasette Plugins 267707940 | |
381905593 | https://github.com/simonw/datasette/pull/209#issuecomment-381905593 | https://api.github.com/repos/simonw/datasette/issues/209 | MDEyOklzc3VlQ29tbWVudDM4MTkwNTU5Mw== | russss 45057 | 2018-04-17T08:50:28Z | 2018-04-17T08:50:28Z | CONTRIBUTOR | I've added another commit which puts classes a class on each `<td>` by default with its column name, and I've also made the PK column bold. Unfortunately the tests are still failing on 3.6, which is weird. I can't reproduce locally... | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Don't duplicate simple primary keys in the link column 314455877 | |
382038613 | https://github.com/simonw/datasette/issues/214#issuecomment-382038613 | https://api.github.com/repos/simonw/datasette/issues/214 | MDEyOklzc3VlQ29tbWVudDM4MjAzODYxMw== | simonw 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} | Ability for plugins to define extra JavaScript and CSS 314506446 | |
382048582 | https://github.com/simonw/datasette/issues/214#issuecomment-382048582 | https://api.github.com/repos/simonw/datasette/issues/214 | MDEyOklzc3VlQ29tbWVudDM4MjA0ODU4Mg== | simonw 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} | Ability for plugins to define extra JavaScript and CSS 314506446 | |
382069980 | https://github.com/simonw/datasette/issues/214#issuecomment-382069980 | https://api.github.com/repos/simonw/datasette/issues/214 | MDEyOklzc3VlQ29tbWVudDM4MjA2OTk4MA== | simonw 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} | Ability for plugins to define extra JavaScript and CSS 314506446 | |
382205189 | https://github.com/simonw/datasette/pull/209#issuecomment-382205189 | https://api.github.com/repos/simonw/datasette/issues/209 | MDEyOklzc3VlQ29tbWVudDM4MjIwNTE4OQ== | simonw 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} | Don't duplicate simple primary keys in the link column 314455877 | |
382210976 | https://github.com/simonw/datasette/pull/209#issuecomment-382210976 | https://api.github.com/repos/simonw/datasette/issues/209 | MDEyOklzc3VlQ29tbWVudDM4MjIxMDk3Ng== | simonw 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} | Don't duplicate simple primary keys in the link column 314455877 | |
382256729 | https://github.com/simonw/datasette/issues/14#issuecomment-382256729 | https://api.github.com/repos/simonw/datasette/issues/14 | MDEyOklzc3VlQ29tbWVudDM4MjI1NjcyOQ== | simonw 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} | Datasette Plugins 267707940 | |
382408128 | https://github.com/simonw/datasette/issues/223#issuecomment-382408128 | https://api.github.com/repos/simonw/datasette/issues/223 | MDEyOklzc3VlQ29tbWVudDM4MjQwODEyOA== | simonw 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} | datasette publish --install=name-of-plugin 315327860 | |
382409989 | https://github.com/simonw/datasette/issues/223#issuecomment-382409989 | https://api.github.com/repos/simonw/datasette/issues/223 | MDEyOklzc3VlQ29tbWVudDM4MjQwOTk4OQ== | simonw 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} | datasette publish --install=name-of-plugin 315327860 | |
382413121 | https://github.com/simonw/datasette/issues/223#issuecomment-382413121 | https://api.github.com/repos/simonw/datasette/issues/223 | MDEyOklzc3VlQ29tbWVudDM4MjQxMzEyMQ== | simonw 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} | datasette publish --install=name-of-plugin 315327860 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);