{"html_url": "https://github.com/dogsheep/google-takeout-to-sqlite/pull/5#issuecomment-786925280", "issue_url": "https://api.github.com/repos/dogsheep/google-takeout-to-sqlite/issues/5", "id": 786925280, "node_id": "MDEyOklzc3VlQ29tbWVudDc4NjkyNTI4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T22:23:10Z", "updated_at": "2021-02-26T22:23:10Z", "author_association": "MEMBER", "body": "Thanks!\r\n\r\nI requested my Gmail export from takeout - once that arrives I'll test it against this and then merge the PR.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 813880401, "label": "WIP: Add Gmail takeout mbox import"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1238#issuecomment-786849095", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1238", "id": 786849095, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0OTA5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:29:38Z", "updated_at": "2021-02-26T19:29:38Z", "author_association": "OWNER", "body": "Here's the test I wrote:\r\n```diff\r\ngit diff tests/test_custom_pages.py\r\ndiff --git a/tests/test_custom_pages.py b/tests/test_custom_pages.py\r\nindex 6a23192..5a71f56 100644\r\n--- a/tests/test_custom_pages.py\r\n+++ b/tests/test_custom_pages.py\r\n@@ -2,11 +2,19 @@ import pathlib\r\n import pytest\r\n from .fixtures import make_app_client\r\n \r\n+TEST_TEMPLATE_DIRS = str(pathlib.Path(__file__).parent / \"test_templates\")\r\n+\r\n \r\n @pytest.fixture(scope=\"session\")\r\n def custom_pages_client():\r\n+ with make_app_client(template_dir=TEST_TEMPLATE_DIRS) as client:\r\n+ yield client\r\n+\r\n+\r\n+@pytest.fixture(scope=\"session\")\r\n+def custom_pages_client_with_base_url():\r\n with make_app_client(\r\n- template_dir=str(pathlib.Path(__file__).parent / \"test_templates\")\r\n+ template_dir=TEST_TEMPLATE_DIRS, config={\"base_url\": \"/prefix/\"}\r\n ) as client:\r\n yield client\r\n \r\n@@ -23,6 +31,12 @@ def test_request_is_available(custom_pages_client):\r\n assert \"path:/request\" == response.text\r\n \r\n \r\n+def test_custom_pages_with_base_url(custom_pages_client_with_base_url):\r\n+ response = custom_pages_client_with_base_url.get(\"/prefix/request\")\r\n+ assert 200 == response.status\r\n+ assert \"path:/prefix/request\" == response.text\r\n+\r\n+\r\n def test_custom_pages_nested(custom_pages_client):\r\n response = custom_pages_client.get(\"/nested/nest\")\r\n assert 200 == response.status\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 813899472, "label": "Custom pages don't work with base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1238#issuecomment-786848654", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1238", "id": 786848654, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0ODY1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:28:48Z", "updated_at": "2021-02-26T19:28:48Z", "author_association": "OWNER", "body": "I added a debug line just before `for regex, wildcard_template` here:\r\n\r\nhttps://github.com/simonw/datasette/blob/afed51b1e36cf275c39e71c7cb262d6c5bdbaa31/datasette/app.py#L1148-L1155\r\n\r\nAnd it showed that for some reason `request.path` is `/prefix/prefix/request` here - the prefix got doubled somehow.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 813899472, "label": "Custom pages don't work with base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1238#issuecomment-786841261", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1238", "id": 786841261, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0MTI2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:13:44Z", "updated_at": "2021-02-26T19:13:44Z", "author_association": "OWNER", "body": "Sounds like a bug - thanks for reporting this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 813899472, "label": "Custom pages don't work with base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1246#issuecomment-786840734", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1246", "id": 786840734, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0MDczNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:12:39Z", "updated_at": "2021-02-26T19:12:47Z", "author_association": "OWNER", "body": "Could I take this part:\r\n```python\r\n suggested_facet_sql = \"\"\" \r\n select distinct json_type({column}) \r\n from ({sql}) \r\n \"\"\".format( \r\n column=escape_sqlite(column), sql=self.sql \r\n ) \r\n```\r\nAnd add `where {column} is not null and {column} != ''` perhaps?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 817597268, "label": "Suggest for ArrayFacet possibly confused by blank values"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1246#issuecomment-786840425", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1246", "id": 786840425, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0MDQyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:11:56Z", "updated_at": "2021-02-26T19:11:56Z", "author_association": "OWNER", "body": "Relevant code: https://github.com/simonw/datasette/blob/afed51b1e36cf275c39e71c7cb262d6c5bdbaa31/datasette/facets.py#L271-L295", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 817597268, "label": "Suggest for ArrayFacet possibly confused by blank values"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/239#issuecomment-786830832", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/239", "id": 786830832, "node_id": "MDEyOklzc3VlQ29tbWVudDc4NjgzMDgzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T18:52:40Z", "updated_at": "2021-02-26T18:52:40Z", "author_association": "OWNER", "body": "Could this handle lists of objects too? That would be pretty amazing - if the column has a `[{...}, {...}]` list in it could turn that into a many-to-many.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 816526538, "label": "sqlite-utils extract could handle nested objects"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1240#issuecomment-786813506", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1240", "id": 786813506, "node_id": "MDEyOklzc3VlQ29tbWVudDc4NjgxMzUwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T18:19:46Z", "updated_at": "2021-02-26T18:19:46Z", "author_association": "OWNER", "body": "Linking to rows from custom queries is a lot harder - because given an arbitrary string of SQL it's difficult to analyze it and figure out which (if any) of the returned columns represent a primary key.\r\n\r\nIt's possible to manually write a SQL query that returns a column that will be treated as a link to another page using this plugin, but it's not particularly straight-forward: https://datasette.io/plugins/datasette-json-html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 814591962, "label": "Allow facetting on custom queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1240#issuecomment-786812716", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1240", "id": 786812716, "node_id": "MDEyOklzc3VlQ29tbWVudDc4NjgxMjcxNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T18:18:18Z", "updated_at": "2021-02-26T18:18:18Z", "author_association": "OWNER", "body": "Agreed, this would be extremely useful. I'd love to be able to facet against custom queries. It's a fair bit of work to implement but it's not impossible. Closing this as a duplicate of #972.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 1, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 814591962, "label": "Allow facetting on custom queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/239#issuecomment-786795132", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/239", "id": 786795132, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njc5NTEzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T17:45:53Z", "updated_at": "2021-02-26T17:45:53Z", "author_association": "OWNER", "body": "If there's no primary key in the JSON could use the `hash_id` mechanism.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 816526538, "label": "sqlite-utils extract could handle nested objects"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/239#issuecomment-786794435", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/239", "id": 786794435, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njc5NDQzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T17:44:38Z", "updated_at": "2021-02-26T17:44:38Z", "author_association": "OWNER", "body": "This came up in office hours!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 816526538, "label": "sqlite-utils extract could handle nested objects"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1244#issuecomment-786786645", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1244", "id": 786786645, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njc4NjY0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T17:30:38Z", "updated_at": "2021-02-26T17:30:38Z", "author_association": "OWNER", "body": "New paragraph at the top of https://docs.datasette.io/en/latest/writing_plugins.html\r\n\r\n> Want to start by looking at an example? The [Datasette plugins directory](https://datasette.io/plugins) lists more than 50 open source plugins with code you can explore. The [plugin hooks](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-hooks) page includes links to example plugins for each of the documented hooks.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 817528452, "label": "Plugin tip: look at the examples linked from the hooks page"}, "performed_via_github_app": null}