{"html_url": "https://github.com/simonw/datasette/issues/262#issuecomment-1480355670", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/262", "id": 1480355670, "node_id": "IC_kwDOBm6k_c5YPG9W", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T22:50:30Z", "updated_at": "2023-03-22T22:50:30Z", "author_association": "OWNER", "body": "I just landed this PR so this feature is now in `main`:\r\n- #1999\r\n\r\nStill needs documentation and maybe some extra tests too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323658641, "label": "Add ?_extra= mechanism for requesting extra properties in JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480349156", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480349156, "node_id": "IC_kwDOBm6k_c5YPFXk", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2023-03-22T22:40:58Z", "updated_at": "2023-03-22T22:48:57Z", "author_association": "NONE", "body": "## [Codecov](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nPatch coverage: **`87.89`**% and project coverage change: **`-4.43`** :warning:\n> Comparison is base [(`56b0758`)](https://codecov.io/gh/simonw/datasette/commit/56b0758a5fbf85d01ff80a40c9b028469d7bb65f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 92.15% compared to head [(`921faae`)](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 87.73%.\n\n> :exclamation: Current head 921faae differs from pull request most recent head 69a31cd. Consider uploading reports for the commit 69a31cd to get more accurate results\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #1999 +/- ##\n==========================================\n- Coverage 92.15% 87.73% -4.43% \n==========================================\n Files 38 38 \n Lines 5560 6066 +506 \n==========================================\n+ Hits 5124 5322 +198 \n- Misses 436 744 +308 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1999?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/views/database.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2RhdGFiYXNlLnB5) | `96.61% <\u00f8> (\u00f8)` | |\n| [datasette/views/row.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3Jvdy5weQ==) | `87.82% <\u00f8> (\u00f8)` | |\n| [datasette/views/table.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3RhYmxlLnB5) | `69.11% <86.76%> (-23.46%)` | :arrow_down: |\n| [datasette/renderer.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3JlbmRlcmVyLnB5) | `93.33% <90.90%> (-0.87%)` | :arrow_down: |\n| [datasette/views/base.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2Jhc2UucHk=) | `92.78% <91.66%> (-2.39%)` | :arrow_down: |\n| [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.48% <100.00%> (-0.01%)` | :arrow_down: |\n| [datasette/cli.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2NsaS5weQ==) | `79.93% <100.00%> (\u00f8)` | |\n| [datasette/hookspecs.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2hvb2tzcGVjcy5weQ==) | `100.00% <100.00%> (\u00f8)` | |\n| [datasette/publish/cloudrun.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3B1Ymxpc2gvY2xvdWRydW4ucHk=) | `97.29% <100.00%> (\u00f8)` | |\n| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1999?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.59% <100.00%> (-0.27%)` | :arrow_down: |\n\n... and [2 files with indirect coverage changes](https://codecov.io/gh/simonw/datasette/pull/1999/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\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 in Codecov by Sentry](https://codecov.io/gh/simonw/datasette/pull/1999?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": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480343044", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480343044, "node_id": "IC_kwDOBm6k_c5YPD4E", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T22:33:15Z", "updated_at": "2023-03-22T22:33:15Z", "author_association": "OWNER", "body": "This still needs documentation, but now the tests are passing I'm going to merge it into `main`!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480339527", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480339527, "node_id": "IC_kwDOBm6k_c5YPDBH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T22:28:54Z", "updated_at": "2023-03-22T22:28:54Z", "author_association": "OWNER", "body": "I hacked at the CSV stuff until it worked.\r\n\r\nI need to clean it up though, but I can do that in this separate task:\r\n- #1101", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480299765", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480299765, "node_id": "IC_kwDOBm6k_c5YO5T1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T21:44:03Z", "updated_at": "2023-03-22T21:45:10Z", "author_association": "OWNER", "body": "Oh this is a bit tricky.\r\n\r\nI have a failing test because a plugin that uses the `extra_css_urls` hook can't see the columns for the page.\r\n\r\nTurns out that bit comes from here:\r\n\r\nhttps://github.com/simonw/datasette/blob/56b0758a5fbf85d01ff80a40c9b028469d7bb65f/datasette/app.py#L1203-L1217\r\n\r\nWhich assumes the context has `\"columns\"` - but that's only now available if `?_extra=columns` was passed.\r\n\r\nActually I think I can cheat here, since it's still getting the HTML context in order to render the template.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480179217", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480179217, "node_id": "IC_kwDOBm6k_c5YOb4R", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T19:55:31Z", "updated_at": "2023-03-22T21:34:02Z", "author_association": "OWNER", "body": "I rebased from `main`. Now:\r\n\r\n```\r\nFAILED tests/test_csv.py::test_table_csv - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_cors_headers - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_no_header - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_with_labels - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_with_nullable_labels - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_blob_columns - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_download - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_stream - assert 1 == 101\r\nFAILED tests/test_csv.py::test_csv_trace - AttributeError: 'NoneType' object has no attribute 'text'\r\nFAILED tests/test_plugins.py::test_hook_extra_css_urls[/fixtures/sortable-expected_decoded_object2] - AssertionError: assert {'added': 15,...ortable', ...} == {'added': 15,...ortable', ...}\r\nFAILED tests/test_plugins.py::test_hook_render_cell_demo - AttributeError: 'NoneType' object has no attribute 'string'\r\nFAILED tests/test_plugins.py::test_hook_render_cell_async[/fixtures/simple_primary_key] - assert b'RENDER_CELL_ASYNC_RESULT' in b'\\n\\n\\n Error 500\\n details.open = false);\\n});\\n\\n\\n\\n\\n\\n', ...} == {'1+1': 2, 'c... 0xXXX>', ...}\r\nFAILED tests/test_permissions.py::test_permissions_checked[/fixtures/simple_primary_key-permissions3] - assert 500 in (200, 403)\r\nFAILED tests/test_table_html.py::test_table_csv_json_export_interface - assert 500 == 200\r\nFAILED tests/test_table_html.py::test_table_metadata - assert 500 == 200\r\nFAILED tests/test_html.py::test_css_classes_on_body[/fixtures/simple_primary_key-expected_classes3] - assert 500 == 200\r\nFAILED tests/test_html.py::test_templates_considered[/fixtures/simple_primary_key-table-fixtures-simple_primary_key.html, *table.html] - assert 500 == 200\r\nFAILED tests/test_plugins.py::test_hook_table_actions[simple_view] - AssertionError: assert [] == [{'href': '/'...simple_view'}]\r\nERROR tests/test_internals_database.py::test_execute_write_fn_connection_exception - Failed: Timeout >1.0s\r\nERROR tests/test_internals_database.py::test_mtime_ns - Failed: Timeout >1.0s\r\nERROR tests/test_internals_database.py::test_mtime_ns_is_none_for_memory - Failed: Timeout >1.0s\r\nERROR tests/test_internals_database.py::test_is_mutable - Failed: Timeout >1.0s\r\nERROR tests/test_internals_database.py::test_database_memory_name - Failed: Timeout >1.0s\r\nERROR tests/test_internals_database.py::test_in_memory_databases_forbid_writes - Failed: Timeout >1.0s\r\n=============== 21 failed, 1275 passed, 2 skipped, 1 xfailed, 6 errors in 59.18s ================\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480163485", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480163485, "node_id": "IC_kwDOBm6k_c5YOYCd", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T19:48:00Z", "updated_at": "2023-03-22T19:48:00Z", "author_association": "OWNER", "body": "Getting close now! Only 13 failures left, mostly relating to CSV.\r\n```\r\nFAILED tests/test_csv.py::test_table_csv - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_cors_headers - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_no_header - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_with_labels - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_with_nullable_labels - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_blob_columns - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_download - assert 500 == 200\r\nFAILED tests/test_csv.py::test_table_csv_stream - assert 1 == 101\r\nFAILED tests/test_plugins.py::test_hook_extra_css_urls[/fixtures/sortable-expected_decoded_object2] - AssertionError: assert {'added': 15,...ortable', ...} == {'added': 15,...ortable', ...}\r\nFAILED tests/test_plugins.py::test_hook_register_facet_classes - KeyError: 'suggested_facets'\r\nFAILED tests/test_csv.py::test_csv_trace - AttributeError: 'NoneType' object has no attribute 'text'\r\nFAILED tests/test_plugins.py::test_hook_extra_body_script[/fixtures/sortable-expected_extra_body_script2] - AssertionError: assert {'added': 15,...ixtures', ...} == {'added': 15,...ixtures', ...}\r\nFAILED tests/test_plugins.py::test_hook_register_output_renderer_all_parameters - assert {'1+1': 2, 'c... 0xXXX>', ...} == {'1+1': 2, 'c... 0xXXX>', ...}\r\n=============== 13 failed, 1287 passed, 2 skipped, 1 xfailed in 61.57s (0:01:01) ================\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": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1999#issuecomment-1480154453", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1999", "id": 1480154453, "node_id": "IC_kwDOBm6k_c5YOV1V", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-22T19:41:39Z", "updated_at": "2023-03-22T19:43:04Z", "author_association": "OWNER", "body": "To replace this code: https://github.com/simonw/datasette/blob/56b0758a5fbf85d01ff80a40c9b028469d7bb65f/datasette/views/base.py#L110-L122\r\n\r\nMaybe `datasette.render_template()` should optionally accept a list of templates.\r\n\r\nhttps://docs.datasette.io/en/stable/internals.html#await-render-template-template-context-none-request-none - turns out it does already:\r\n\r\n> If this is a list of template file names then the first one that exists will be loaded and rendered.\r\n\r\nIt doesn't have an easy way to populate that `select_templates` debug template variable though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1551694938, "label": "?_extra= support (draft)"}, "performed_via_github_app": null}