github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/pull/1931#issuecomment-1339906241 | https://api.github.com/repos/simonw/datasette/issues/1931 | 1339906241 | IC_kwDOBm6k_c5P3VjB | 22429695 | 2022-12-06T19:33:32Z | 2022-12-08T01:04:56Z | NONE | # [Codecov](https://codecov.io/gh/simonw/datasette/pull/1931?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report Base: **90.42**% // Head: **91.77**% // Increases project coverage by **`+1.34%`** :tada: > Coverage data is based on head [(`645be0f`)](https://codecov.io/gh/simonw/datasette/pull/1931?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) compared to base [(`cab5b60`)](https://codecov.io/gh/simonw/datasette/commit/cab5b60e09e94aca820dbec5308446a88c99ea3d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). > Patch coverage: 95.55% of modified lines in pull request are covered. > :exclamation: Current head 645be0f differs from pull request most recent head 7cd6fd9. Consider uploading reports for the commit 7cd6fd9 to get more accurate results <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## main #1931 +/- ## ========================================== + Coverage 90.42% 91.77% +1.34% ========================================== Files 36 36 Lines 5057 5019 -38 ========================================== + Hits 4573 4606 +33 + Misses 484 413 -71 ``` | [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1931?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [datasette/views/special.py](https://codecov.io/gh/simonw/datasette/pull/1931/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3NwZWNpYWwucHk=) | `79.41% <0.00%> (ø)` | | | [datasette/views/table.py](https://codecov.io/gh/simonw/data… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1473814539 | |
https://github.com/simonw/datasette/pull/1938#issuecomment-1343449918 | https://api.github.com/repos/simonw/datasette/issues/1938 | 1343449918 | IC_kwDOBm6k_c5QE2s- | 22429695 | 2022-12-08T22:20:10Z | 2022-12-08T22:54:08Z | NONE | # [Codecov](https://codecov.io/gh/simonw/datasette/pull/1938?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report Base: **92.00**% // Head: **92.01**% // Increases project coverage by **`+0.01%`** :tada: > Coverage data is based on head [(`6e35a6b`)](https://codecov.io/gh/simonw/datasette/pull/1938?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) compared to base [(`e539c1c`)](https://codecov.io/gh/simonw/datasette/commit/e539c1c024bc62d88df91d9107cbe37e7f0fe55f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). > Patch coverage: 100.00% of modified lines in pull request are covered. <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## main #1938 +/- ## ========================================== + Coverage 92.00% 92.01% +0.01% ========================================== Files 38 38 Lines 5378 5386 +8 ========================================== + Hits 4948 4956 +8 Misses 430 430 ``` | [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [datasette/default\_permissions.py](https://codecov.io/gh/simonw/datasette/pull/1938/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2RlZmF1bHRfcGVybWlzc2lvbnMucHk=) | `95.10% <100.00%> (+0.29%)` | :arrow_up: | Help 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=S… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1485488236 | |
https://github.com/simonw/datasette/issues/1867#issuecomment-1341874378 | https://api.github.com/repos/simonw/datasette/issues/1867 | 1341874378 | IC_kwDOBm6k_c5P-2DK | 9599 | 2022-12-08T02:07:06Z | 2022-12-08T02:28:02Z | OWNER | Basic version of this allows you to rename a table: ``` POST /db/table/-/rename { "name": "new_table_name" } ``` If a table with that new name already exists you will get an error - unless you pass `"replace": true` in which case that table will be dropped and replaced by the new one. ``` POST /db/table/-/rename { "name": "new_table_name", "replace": true } ``` This is useful because it allows for that atomic replacement operation: upload brand new data into a `_tmp_name` table, then atomic rename and replace after the upload has completed. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1426080014 | |
https://github.com/simonw/datasette/issues/1937#issuecomment-1341848525 | https://api.github.com/repos/simonw/datasette/issues/1937 | 1341848525 | IC_kwDOBm6k_c5P-vvN | 9599 | 2022-12-08T01:34:03Z | 2022-12-08T01:34:03Z | OWNER | Check should go somewhere around here: https://github.com/simonw/datasette/blob/dee18ed8ce7af2ab8699bcb5a51a99f48301bc42/datasette/views/database.py#L625-L631 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1483320357 | |
https://github.com/simonw/datasette/pull/1938#issuecomment-1343445885 | https://api.github.com/repos/simonw/datasette/issues/1938 | 1343445885 | IC_kwDOBm6k_c5QE1t9 | 9599 | 2022-12-08T22:16:03Z | 2022-12-08T22:16:03Z | OWNER | Docs: https://datasette--1938.org.readthedocs.build/en/1938/authentication.html#other-permissions-in-metadata | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1485488236 | |
https://github.com/simonw/datasette/issues/1636#issuecomment-1343446071 | https://api.github.com/repos/simonw/datasette/issues/1636 | 1343446071 | IC_kwDOBm6k_c5QE1w3 | 9599 | 2022-12-08T22:16:17Z | 2022-12-08T22:16:17Z | OWNER | First draft of documentation: https://datasette--1938.org.readthedocs.build/en/1938/authentication.html#other-permissions-in-metadata | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1138008042 | |
https://github.com/simonw/datasette/pull/1931#issuecomment-1341825314 | https://api.github.com/repos/simonw/datasette/issues/1931 | 1341825314 | IC_kwDOBm6k_c5P-qEi | 9599 | 2022-12-08T01:03:18Z | 2022-12-08T01:03:18Z | OWNER | I broke this test: ``` ds_write = <datasette.app.Datasette object at 0x7f0965858700> @pytest.mark.asyncio async def test_insert_row(ds_write): token = write_token(ds_write) response = await ds_write.client.post( "/data/docs/-/insert", json={"row": {"title": "Test", "score": 1.2, "age": 5}}, headers={ "Authorization": "***".format(token), "Content-Type": "application/json", }, ) expected_row = {"id": 1, "title": "Test", "score": 1.2, "age": 5} > assert response.status_code == 201 E assert 500 == 201 E + where 500 = <Response [500 Internal Server Error]>.status_code /home/runner/work/datasette/datasette/tests/test_api_write.py:43: AssertionError ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "/home/runner/work/datasette/datasette/datasette/app.py", line 1447, in route_path response = await view(request, send) File "/home/runner/work/datasette/datasette/datasette/views/base.py", line 151, in view return await self.dispatch_request(request) File "/home/runner/work/datasette/datasette/datasette/views/base.py", line 105, in dispatch_request response = await handler(request) File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in post row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in <listcomp> row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in <genexpr> row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] KeyError: 'id' ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1473814539 | |
https://github.com/simonw/datasette/issues/1636#issuecomment-1341854373 | https://api.github.com/repos/simonw/datasette/issues/1636 | 1341854373 | IC_kwDOBm6k_c5P-xKl | 9599 | 2022-12-08T01:43:35Z | 2022-12-08T01:43:35Z | OWNER | I'm going to write the documentation for this first. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1138008042 | |
https://github.com/simonw/datasette/pull/1931#issuecomment-1341821213 | https://api.github.com/repos/simonw/datasette/issues/1931 | 1341821213 | IC_kwDOBm6k_c5P-pEd | 9599 | 2022-12-08T00:58:21Z | 2022-12-08T00:58:21Z | OWNER | In the interests of shipping, I'm going to punt the API explorer to a later issue. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1473814539 | |
https://github.com/simonw/datasette/issues/1936#issuecomment-1341849496 | https://api.github.com/repos/simonw/datasette/issues/1936 | 1341849496 | IC_kwDOBm6k_c5P-v-Y | 9599 | 2022-12-08T01:35:35Z | 2022-12-08T01:35:35Z | OWNER | Related bug: you can send `"id": null` and it works (it should throw an error): <img width="1006" alt="image" src="https://user-images.githubusercontent.com/9599/206334362-5727f3e8-8b6b-4f05-b876-47b060b81248.png"> | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1483250004 | |
https://github.com/simonw/datasette/issues/1936#issuecomment-1341849735 | https://api.github.com/repos/simonw/datasette/issues/1936 | 1341849735 | IC_kwDOBm6k_c5P-wCH | 9599 | 2022-12-08T01:35:54Z | 2022-12-08T01:35:54Z | OWNER | Running that twice produced this: <img width="182" alt="image" src="https://user-images.githubusercontent.com/9599/206334432-b577fcee-f44b-440c-9f10-a5f5808e91cf.png"> | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1483250004 | |
https://github.com/simonw/datasette/pull/1930#issuecomment-1343360006 | https://api.github.com/repos/simonw/datasette/issues/1930 | 1343360006 | IC_kwDOBm6k_c5QEgwG | 9599 | 2022-12-08T21:12:28Z | 2022-12-08T21:12:28Z | OWNER | Thanks! | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1473664029 | |
https://github.com/simonw/datasette/issues/1636#issuecomment-1343440504 | https://api.github.com/repos/simonw/datasette/issues/1636 | 1343440504 | IC_kwDOBm6k_c5QE0Z4 | 9599 | 2022-12-08T22:10:28Z | 2022-12-08T22:10:48Z | OWNER | What if you want to grant `insert-row` to a user for ALL tables in a database, or even for all tables in all databases? You should be able to do that by putting that in the root `permissions:` block. Need to figure out how the implementation will handle that. Also: there are some permissions like `view-instance` or `debug-menu` for which putting them at the `database` or `table` or `query` level doesn't actually make any sense. Ideally the implementation would spot those on startup and refuse to start the server, with a helpful error message. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1138008042 |