{"html_url": "https://github.com/simonw/sqlite-utils/issues/348#issuecomment-1011855133", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/348", "id": 1011855133, "node_id": "IC_kwDOCGYnMM48T68d", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T07:06:59Z", "updated_at": "2022-01-13T07:06:59Z", "author_association": "OWNER", "body": "Wrote a lot more about this feature here: https://simonwillison.net/2022/Jan/12/how-i-build-a-feature/", "reactions": "{\"total_count\": 3, \"+1\": 3, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1067771698, "label": "Command for creating an empty database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1593#issuecomment-1012128696", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1593", "id": 1012128696, "node_id": "IC_kwDOBm6k_c48U9u4", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-01-13T13:18:35Z", "updated_at": "2022-01-13T13:18:35Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1593?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1593](https://codecov.io/gh/simonw/datasette/pull/1593?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (df73ebb) into [main](https://codecov.io/gh/simonw/datasette/commit/8c401ee0f054de2f568c3a8302c9223555146407?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (8c401ee) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1593/graphs/tree.svg?width=650&height=150&src=pr&token=eSahVY7kw1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/datasette/pull/1593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n```diff\n@@ Coverage Diff @@\n## main #1593 +/- ##\n=======================================\n Coverage 92.09% 92.09% \n=======================================\n Files 34 34 \n Lines 4516 4516 \n=======================================\n Hits 4159 4159 \n Misses 357 357 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1593?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1593?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [8c401ee...df73ebb](https://codecov.io/gh/simonw/datasette/pull/1593?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1101705012, "label": "Update pytest-asyncio requirement from <0.17,>=0.10 to >=0.10,<0.18"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/79#issuecomment-1012158895", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/79", "id": 1012158895, "node_id": "IC_kwDOCGYnMM48VFGv", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2022-01-13T13:55:59Z", "updated_at": "2022-01-13T13:55:59Z", "author_association": "CONTRIBUTOR", "body": "Came here to add this. I might pick it up.\r\n\r\nWould also add a utility to create (and update and delete?) a spatial index. It's not much code but I have to look it up every time.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 557842245, "label": "Helper methods for working with SpatiaLite"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/79#issuecomment-1012230212", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/79", "id": 1012230212, "node_id": "IC_kwDOCGYnMM48VWhE", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2022-01-13T15:15:13Z", "updated_at": "2022-01-13T15:15:13Z", "author_association": "CONTRIBUTOR", "body": "Some proposals I'd add to sqlite-utils:\r\n\r\nSome version of this, from [geojson-to-sqlite](https://github.com/simonw/geojson-to-sqlite/blob/main/geojson_to_sqlite/utils.py#L124-L130):\r\n\r\n```python\r\ndef init_spatialite(db, lib):\r\n db.conn.enable_load_extension(True)\r\n db.conn.load_extension(lib)\r\n # Initialize SpatiaLite if not yet initialized\r\n if \"spatial_ref_sys\" in db.table_names():\r\n return\r\n db.conn.execute(\"select InitSpatialMetadata(1)\")\r\n```\r\n\r\nAlso a function for creating a spatial index:\r\n\r\n```python\r\ndb.conn.execute(\"select CreateSpatialIndex(?, ?)\", [table, \"geometry\"])\r\n```\r\n\r\nI don't know the nuances of updating a spatial index, or checking if one already exists. This could be a CLI method like:\r\n\r\n```sh\r\nsqlite-utils spatial-index spatial.db table-name column-name\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 557842245, "label": "Helper methods for working with SpatiaLite"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/79#issuecomment-1012253198", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/79", "id": 1012253198, "node_id": "IC_kwDOCGYnMM48VcIO", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2022-01-13T15:39:14Z", "updated_at": "2022-01-13T15:39:14Z", "author_association": "CONTRIBUTOR", "body": "Other thing: If there get to be enough utils, I think it's worth moving all the spatialite stuff into its own file (`gis.py` or something) just so it's easier to find later.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 557842245, "label": "Helper methods for working with SpatiaLite"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/79#issuecomment-1012413729", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/79", "id": 1012413729, "node_id": "IC_kwDOCGYnMM48WDUh", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2022-01-13T18:50:00Z", "updated_at": "2022-01-13T18:50:00Z", "author_association": "CONTRIBUTOR", "body": "One more thing I'm going to add: A method to add a geometry column, which I'll need to do to create a spatial index on a table.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 557842245, "label": "Helper methods for working with SpatiaLite"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1591#issuecomment-1012504251", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1591", "id": 1012504251, "node_id": "IC_kwDOBm6k_c48WZa7", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T20:49:19Z", "updated_at": "2022-01-13T20:49:59Z", "author_association": "OWNER", "body": "I try to stick pretty closely to what [Click](https://click.palletsprojects.com/en/8.0.x/) supports, and Click likes you to define options explicitly so that it can display them in the output of `--help`.\r\n\r\nBut... that makes me think that actually showing these options in `--help` is likely a better idea. My `--plugin-setting` concept would have help that looks something like this:\r\n```\r\n% datasette serve --help\r\n ...\r\n --plugin-setting ... Setting for a specified plugin.\r\n```\r\nThat's not great help!\r\n\r\nThe alternative would be to allow plugins to register their extra options with the command - which would mean the help output could look like this instead:\r\n```\r\n% datasette serve --help\r\n ...\r\n --tiddlywiki-db Name of database to use for datasette-tiddlywiki\r\n```\r\nThis feels like a good argument to me for plugins to explicitly register their settings. I'm not sure if I should enforce the `name-of-plugin-` prefix, or if I should allow plugins to define any setting they like. I'm still nervous about plugins over-riding existing or future default options to that command.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1100015398, "label": "Maybe let plugins define custom serve options?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1591#issuecomment-1012505706", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1591", "id": 1012505706, "node_id": "IC_kwDOBm6k_c48WZxq", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T20:51:30Z", "updated_at": "2022-01-13T20:51:30Z", "author_association": "OWNER", "body": "Another option: if I make plugin settings a higher level concept in Datasette than they are at the moment, I could allow them to be set either using `--options` OR using the existing `metadata.yml/json` mechanism. https://docs.datasette.io/en/stable/plugins.html#plugin-configuration\r\n\r\nI want to make changes to that anyway, because I'm increasingly uncomfortable with plugin settings ending up in the \"metadata\" mechanism.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1100015398, "label": "Maybe let plugins define custom serve options?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1591#issuecomment-1012506595", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1591", "id": 1012506595, "node_id": "IC_kwDOBm6k_c48WZ_j", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T20:52:56Z", "updated_at": "2022-01-13T20:52:56Z", "author_association": "OWNER", "body": "You can already run `datasette --help-settings` to see detailed help on available settings. Maybe `datasette --help-plugin-settings` could do the same thing for plugin settings?\r\n\r\nOr I could even have available plugin settings show up as a list at the bottom of the `datasette --help-settings` output - which currently looks like this:\r\n\r\n```\r\n% datasette --help-settings\r\nSettings:\r\n default_page_size Default page size for the table view\r\n (default=100)\r\n max_returned_rows Maximum rows that can be returned from a table\r\n or custom query (default=1000)\r\n num_sql_threads Number of threads in the thread pool for\r\n executing SQLite queries (default=3)\r\n sql_time_limit_ms Time limit for a SQL query in milliseconds\r\n (default=1000)\r\n default_facet_size Number of values to return for requested facets\r\n (default=30)\r\n facet_time_limit_ms Time limit for calculating a requested facet\r\n (default=200)\r\n facet_suggest_time_limit_ms Time limit for calculating a suggested facet\r\n (default=50)\r\n hash_urls Include DB file contents hash in URLs, for far-\r\n future caching (default=False)\r\n allow_facet Allow users to specify columns to facet using\r\n ?_facet= parameter (default=True)\r\n allow_download Allow users to download the original SQLite\r\n database files (default=True)\r\n suggest_facets Calculate and display suggested facets\r\n (default=True)\r\n default_cache_ttl Default HTTP cache TTL (used in Cache-Control:\r\n max-age= header) (default=5)\r\n default_cache_ttl_hashed Default HTTP cache TTL for hashed URL pages\r\n (default=31536000)\r\n cache_size_kb SQLite cache size in KB (0 == use SQLite\r\n default) (default=0)\r\n allow_csv_stream Allow .csv?_stream=1 to download all rows\r\n (ignoring max_returned_rows) (default=True)\r\n max_csv_mb Maximum size allowed for CSV export in MB - set\r\n 0 to disable this limit (default=100)\r\n truncate_cells_html Truncate cells longer than this in HTML table\r\n view - set 0 to disable (default=2048)\r\n force_https_urls Force URLs in API output to always use https://\r\n protocol (default=False)\r\n template_debug Allow display of template debug information\r\n with ?_context=1 (default=False)\r\n trace_debug Allow display of SQL trace debug information\r\n with ?_trace=1 (default=False)\r\n base_url Datasette URLs should use this base path\r\n (default=/)\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1100015398, "label": "Maybe let plugins define custom serve options?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1594#issuecomment-1012508787", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1594", "id": 1012508787, "node_id": "IC_kwDOBm6k_c48Wahz", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T20:56:14Z", "updated_at": "2022-01-13T20:56:34Z", "author_association": "OWNER", "body": "The implementation can be _almost_ exactly the same as this: https://github.com/simonw/sqlite-utils/blame/74586d3cb26fa3cc3412721985ecdc1864c2a31d/docs/cli-reference.rst#L11-L76\r\n\r\nI need to do something extra to ensure the output of `datasette --help-settings` is shown too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102359726, "label": "Add a CLI reference page to the docs, inspired by sqlite-utils"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1594#issuecomment-1012535024", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1594", "id": 1012535024, "node_id": "IC_kwDOBm6k_c48Wg7w", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T21:36:53Z", "updated_at": "2022-01-13T21:36:53Z", "author_association": "OWNER", "body": "I went with a simpler pattern that `sqlite-utils` because Datasette has a lot less commands: https://github.com/simonw/datasette/blob/4b23f01f3e668c8f2a2f1a294be49f49b4073969/docs/cli-reference.rst#L9-L35", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102359726, "label": "Add a CLI reference page to the docs, inspired by sqlite-utils"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1594#issuecomment-1012536257", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1594", "id": 1012536257, "node_id": "IC_kwDOBm6k_c48WhPB", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T21:38:48Z", "updated_at": "2022-01-13T21:38:48Z", "author_association": "OWNER", "body": "https://docs.datasette.io/en/latest/cli-reference.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102359726, "label": "Add a CLI reference page to the docs, inspired by sqlite-utils"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1466#issuecomment-1012546223", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1466", "id": 1012546223, "node_id": "IC_kwDOBm6k_c48Wjqv", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T21:54:51Z", "updated_at": "2022-01-13T21:54:51Z", "author_association": "OWNER", "body": "Going with this for the copy:\r\n\r\n> [Datasette Desktop](https://datasette.io/desktop) is a packaged Mac application which bundles Datasette together with Python and allows you to install and run Datasette directly on your laptop. This is the best option for local installation if you are not comfortable using the command line.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 991467558, "label": "Add Datasette Desktop to installation documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1336#issuecomment-1012546924", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1336", "id": 1012546924, "node_id": "IC_kwDOBm6k_c48Wj1s", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T21:55:58Z", "updated_at": "2022-01-13T21:55:58Z", "author_association": "OWNER", "body": "See also:\r\n- #1412", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 895686039, "label": "Document turning on WAL for live served SQLite databases"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/650#issuecomment-1012552760", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/650", "id": 1012552760, "node_id": "IC_kwDOBm6k_c48WlQ4", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T22:04:56Z", "updated_at": "2022-01-13T22:04:56Z", "author_association": "OWNER", "body": "Challenge: explain the difference between view as in SQL view, and view as in the code that serves `TableView` / `DatabaseView` etc.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 534629631, "label": "Add a glossary to the documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1588#issuecomment-1012554208", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1588", "id": 1012554208, "node_id": "IC_kwDOBm6k_c48Wlng", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T22:07:15Z", "updated_at": "2022-01-13T22:07:15Z", "author_association": "OWNER", "body": "This works now: https://latest.datasette.io/fixtures?sql=explain+query+plan++select+*+from+facetable", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1097101917, "label": "`explain query plan select` is too strict about whitespace"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1595#issuecomment-1012575013", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1595", "id": 1012575013, "node_id": "IC_kwDOBm6k_c48Wqsl", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T22:29:22Z", "updated_at": "2022-01-13T22:29:22Z", "author_association": "OWNER", "body": "Most of these are already written for these two alpha releases:\r\n- https://github.com/simonw/datasette/releases/tag/0.60a0\r\n- https://github.com/simonw/datasette/releases/tag/0.60a1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102484126, "label": "Release notes for 0.60"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1590#issuecomment-1012583091", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1590", "id": 1012583091, "node_id": "IC_kwDOBm6k_c48Wsqz", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-13T22:41:15Z", "updated_at": "2022-01-13T22:41:15Z", "author_association": "OWNER", "body": "Seeing as this area of the code has produced so many bugs in the past, I think part of the fix may be to write comprehensive documentation about how routing works for the internals documentation. Doing so might help me figure this bug out!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1099723916, "label": "Table+query JSON and CSV links broken when using `base_url` setting"}, "performed_via_github_app": null}