{"html_url": "https://github.com/simonw/datasette/issues/1802#issuecomment-1237537205", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1802", "id": 1237537205, "node_id": "IC_kwDOBm6k_c5Jw1G1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:08:03Z", "updated_at": "2022-09-06T00:08:46Z", "author_association": "OWNER", "body": "I'm suspicious that this hack here may be hurting me:\r\n\r\nhttps://github.com/simonw/datasette/blob/b91e17280c05bbb9cf97432081bdcea8665879f9/tests/test_cli.py#L25-L29\r\n\r\nI added that two years ago in https://github.com/simonw/datasette/commit/3159263f05ac4baf968929d59384d9223a539071", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1362402998, "label": "Tests reliably failing on Python 3.7"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1802#issuecomment-1237540231", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1802", "id": 1237540231, "node_id": "IC_kwDOBm6k_c5Jw12H", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:16:10Z", "updated_at": "2022-09-06T00:16:10Z", "author_association": "OWNER", "body": "Removing the `ensure_eventloop()` hack produced the exact same test failure: https://github.com/simonw/datasette/runs/8197570109?check_suite_focus=true", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1362402998, "label": "Tests reliably failing on Python 3.7"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1802#issuecomment-1237542508", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1802", "id": 1237542508, "node_id": "IC_kwDOBm6k_c5Jw2Zs", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:22:37Z", "updated_at": "2022-09-06T00:22:37Z", "author_association": "OWNER", "body": "The code that I control that shows up in the trace is this:\r\n\r\nhttps://github.com/simonw/datasette/blob/fd1086c6867f3e3582b1eca456e4ea95f6cecf8b/datasette/app.py#L234", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1362402998, "label": "Tests reliably failing on Python 3.7"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1802#issuecomment-1237542803", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1802", "id": 1237542803, "node_id": "IC_kwDOBm6k_c5Jw2eT", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:23:27Z", "updated_at": "2022-09-06T00:23:27Z", "author_association": "OWNER", "body": "Trying this fix:\r\n```diff\r\ndiff --git a/datasette/app.py b/datasette/app.py\r\nindex f2a6763a5..b17888a07 100644\r\n--- a/datasette/app.py\r\n+++ b/datasette/app.py\r\n@@ -231,7 +231,13 @@ def __init__(\r\n self.inspect_data = inspect_data\r\n self.immutables = set(immutables or [])\r\n self.databases = collections.OrderedDict()\r\n- self._refresh_schemas_lock = asyncio.Lock()\r\n+ try:\r\n+ self._refresh_schemas_lock = asyncio.Lock()\r\n+ except RuntimeError as rex:\r\n+ if \"There is no current event loop in thread\" in str(rex):\r\n+ loop = asyncio.new_event_loop()\r\n+ asyncio.set_event_loop(loop)\r\n+ self._refresh_schemas_lock = asyncio.Lock()\r\n self.crossdb = crossdb\r\n self.nolock = nolock\r\n if memory or crossdb or not self.files:\r\n```\r\nThis is mainly superstition at this point! I found that recipe on https://techoverflow.net/2020/10/01/how-to-fix-python-asyncio-runtimeerror-there-is-no-current-event-loop-in-thread/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1362402998, "label": "Tests reliably failing on Python 3.7"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1802#issuecomment-1237545794", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1802", "id": 1237545794, "node_id": "IC_kwDOBm6k_c5Jw3NC", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:31:31Z", "updated_at": "2022-09-06T00:31:31Z", "author_association": "OWNER", "body": "Well I'm not proud of it, but that did seem to do the trick!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1362402998, "label": "Tests reliably failing on Python 3.7"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1793#issuecomment-1237549678", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1793", "id": 1237549678, "node_id": "IC_kwDOBm6k_c5Jw4Ju", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:41:24Z", "updated_at": "2022-09-06T00:41:24Z", "author_association": "OWNER", "body": "I don't agree with the pros and cons listed in that article.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1351949898, "label": "Added a useful resource"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1794#issuecomment-1237551309", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1794", "id": 1237551309, "node_id": "IC_kwDOBm6k_c5Jw4jN", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:45:26Z", "updated_at": "2022-09-06T00:45:26Z", "author_association": "OWNER", "body": "Thanks for this - I've seen this issue too. Good fix.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1352931076, "label": "fix word break in facets by adding ul.tight-bullets li word-break: break-all"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1757#issuecomment-1237553237", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1757", "id": 1237553237, "node_id": "IC_kwDOBm6k_c5Jw5BV", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T00:51:21Z", "updated_at": "2022-09-06T00:51:21Z", "author_association": "OWNER", "body": "Interesting feature idea.\r\n\r\nIt's a weird edge-case, but it's the kind of thing I worry about: what if the user has a column called `*`? This is technically allowed in SQLite, even though it's vastly unlikely.\r\n\r\nOn that basis, I think `?_json_all=1` would be a better design here than `?_json=*` - since it removes any possible ambiguity.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1268121674, "label": "feat: add a wildcard for _json columns"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1804#issuecomment-1238308213", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1804", "id": 1238308213, "node_id": "IC_kwDOBm6k_c5JzxV1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T15:27:31Z", "updated_at": "2022-09-06T15:27:31Z", "author_association": "OWNER", "body": "Relevant example from https://docs.datasette.io/en/stable/metadata.html#per-database-and-per-table-metadata\r\n```json\r\n{\r\n \"databases\": {\r\n \"database1\": {\r\n \"tables\": {\r\n \"example_table\": {\r\n \"sortable_columns\": [\r\n \"height\",\r\n \"weight\"\r\n ]\r\n }\r\n }\r\n }\r\n }\r\n}\r\n```\r\nI think this becomes `\"facet_size\": \"...\"` at the table level, to match the name of the `?_facet_size=100` querystring parameter.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363440999, "label": "Ability to set a custom facet_size per table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1804#issuecomment-1238309481", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1804", "id": 1238309481, "node_id": "IC_kwDOBm6k_c5Jzxpp", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T15:28:35Z", "updated_at": "2022-09-06T15:28:35Z", "author_association": "OWNER", "body": "I'm going to do this just at the table level - if you want it at the database level I would imagine usually you would be OK running `--setting default_facet_size 10` instead, since most Datasette instances only expose a single database.\r\n\r\nI may reconsider this in the future.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363440999, "label": "Ability to set a custom facet_size per table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1804#issuecomment-1238311565", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1804", "id": 1238311565, "node_id": "IC_kwDOBm6k_c5JzyKN", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T15:30:19Z", "updated_at": "2022-09-06T15:30:19Z", "author_association": "OWNER", "body": "Relevant code: https://github.com/simonw/datasette/blob/c9d1943aede436fa3413fd49bc56335cbda4ad07/datasette/facets.py#L102-L110", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363440999, "label": "Ability to set a custom facet_size per table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1804#issuecomment-1238313314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1804", "id": 1238313314, "node_id": "IC_kwDOBm6k_c5Jzyli", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T15:31:36Z", "updated_at": "2022-09-06T15:31:36Z", "author_association": "OWNER", "body": "In that code `self.table` is the name of the current table, but can also be `None` if the faceting is being run against a custom SQL query instead (a future feature). `self.database` is the name of the current database.\r\n\r\nSo reading metadata via `self.ds` should work fine.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363440999, "label": "Ability to set a custom facet_size per table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1804#issuecomment-1238347451", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1804", "id": 1238347451, "node_id": "IC_kwDOBm6k_c5Jz667", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T15:59:26Z", "updated_at": "2022-09-06T15:59:26Z", "author_association": "OWNER", "body": "Still needs documentation.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363440999, "label": "Ability to set a custom facet_size per table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1805#issuecomment-1238491632", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1805", "id": 1238491632, "node_id": "IC_kwDOBm6k_c5J0eHw", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T18:10:14Z", "updated_at": "2022-09-06T18:10:14Z", "author_association": "OWNER", "body": "I like the idea of defaulting this to the `truncate_cells_html` setting. It could be alternatively customized using a custom Render Cell plugin, but having Datasette do this by default makes sense to me.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363552780, "label": "truncate_cells_html does not work for links?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/484#issuecomment-1238607591", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/484", "id": 1238607591, "node_id": "IC_kwDOCGYnMM5J06bn", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T20:16:39Z", "updated_at": "2022-09-06T20:16:39Z", "author_association": "OWNER", "body": "Here's the implementation for recipes at the moment: https://github.com/simonw/sqlite-utils/blob/5b969273f1244b1bcf3e4dc071cdf17dab35d5f8/sqlite_utils/utils.py#L434-L441\r\n\r\nAnd here's the `--functions` implementation that doesn't expose them: https://github.com/simonw/sqlite-utils/blob/5b969273f1244b1bcf3e4dc071cdf17dab35d5f8/sqlite_utils/cli.py#L3029-L3040", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363766973, "label": "Expose convert recipes to `sqlite-utils --functions`"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/477#issuecomment-1238608921", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/477", "id": 1238608921, "node_id": "IC_kwDOCGYnMM5J06wZ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T20:18:12Z", "updated_at": "2022-09-06T20:18:12Z", "author_association": "OWNER", "body": "Hi @thewchan - thanks for that! Yes I'm interested, can you invite `swillison` @ Google's email provider please?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1353441389, "label": "Conda Forge"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1805#issuecomment-1238760255", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1805", "id": 1238760255, "node_id": "IC_kwDOBm6k_c5J1fs_", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-06T23:55:37Z", "updated_at": "2022-09-06T23:55:37Z", "author_association": "OWNER", "body": "While working on this I noticed that the arbitrary query page doesn't currently obey truncation, when it should do.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363552780, "label": "truncate_cells_html does not work for links?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/596#issuecomment-1238383171", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/596", "id": 1238383171, "node_id": "IC_kwDOBm6k_c5J0DpD", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-09-06T16:27:25Z", "updated_at": "2022-09-06T16:27:25Z", "author_association": "NONE", "body": "Perhaps some ways to address this.\r\n\r\n1. Add a **horizontal scrollbar at the top of the table**. There are some solutions here: https://stackoverflow.com/questions/3934271/horizontal-scrollbar-on-top-and-bottom-of-table\r\n2. Use a **fixed table header**. It would be useful when you're lost in the middle of a very big table. Pure CSS solutions seem to exist: https://stackoverflow.com/questions/21168521/table-fixed-header-and-scrollable-body\r\n3. Maybe a possibility to resize columns. Not sure about that because it would more work not to lose it after each reload.\r\n4. A way to keep **favorite views for each user**. The process would be: I select the column I want or not (with existing \"settings\" icon of each column); then I select a \"favoritize view\" option somewhere; then I can recall all my favorite views from a menu. These data could be hosted on the browser.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 507454958, "label": "Handle really wide tables better"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/pull/76#issuecomment-1238190601", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/76", "id": 1238190601, "node_id": "IC_kwDODFdgUs5JzUoJ", "user": {"value": 2757699, "label": "OverkillGuy"}, "created_at": "2022-09-06T13:58:20Z", "updated_at": "2022-09-06T13:59:08Z", "author_association": "NONE", "body": "Tested PR just now in private org, fetched >2k repos infos flawlessly!\r\n\r\n poetry run github-to-sqlite repos --organization github.db MYORG", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363280254, "label": "Add organization support to repos command"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1803#issuecomment-1237548400", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1803", "id": 1237548400, "node_id": "IC_kwDOBm6k_c5Jw31w", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-09-06T00:38:18Z", "updated_at": "2022-09-06T00:38:18Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1803?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nBase: **91.66**% // Head: **91.67**% // Increases project coverage by **`+0.01%`** :tada:\n> Coverage data is based on head [(`2db6f9c`)](https://codecov.io/gh/simonw/datasette/pull/1803?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) compared to base [(`51030df`)](https://codecov.io/gh/simonw/datasette/commit/51030df1869b3b574dd3584d1563415776b9cd4e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> Patch coverage: 100.00% of modified lines in pull request are covered.\n\n> :exclamation: Current head 2db6f9c differs from pull request most recent head 7b6a2b4. Consider uploading reports for the commit 7b6a2b4 to get more accurate results\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #1803 +/- ##\n==========================================\n+ Coverage 91.66% 91.67% +0.01% \n==========================================\n Files 38 38 \n Lines 4705 4711 +6 \n==========================================\n+ Hits 4313 4319 +6 \n Misses 392 392 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1803?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage \u0394 | |\n|---|---|---|\n| [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1803/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.23% <100.00%> (+0.04%)` | :arrow_up: |\n\nHelp us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n
\n\n[:umbrella: View full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1803?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). \n:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?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": 1362567197, "label": "Workaround for test failure: RuntimeError: There is no current event loop"}, "performed_via_github_app": null}