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/1769#issuecomment-1185536255 | https://api.github.com/repos/simonw/datasette/issues/1769 | 1185536255 | IC_kwDOBm6k_c5Gqdj_ | 22429695 | 2022-07-15T13:16:42Z | 2022-07-15T13:16:42Z | NONE | # [Codecov](https://codecov.io/gh/simonw/datasette/pull/1769?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report > Merging [#1769](https://codecov.io/gh/simonw/datasette/pull/1769?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (bb3c610) into [main](https://codecov.io/gh/simonw/datasette/commit/950cc7677f65aa2543067b3bbfc2b6acb98b62c8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (950cc76) will **not change** coverage. > The diff coverage is `n/a`. ```diff @@ Coverage Diff @@ ## main #1769 +/- ## ======================================= Coverage 91.67% 91.67% ======================================= Files 36 36 Lines 4658 4658 ======================================= Hits 4270 4270 Misses 388 388 ``` ------ [Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1769?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). > **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) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1769?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [950cc76...bb3c610](https://codecov.io/gh/simonw/datasette/pull/1769?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/d… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306020162 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185931417 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185931417 | IC_kwDOBm6k_c5Gr-CZ | 9599 | 2022-07-15T20:59:25Z | 2022-07-15T20:59:25Z | OWNER | ... maybe it should take `send`? But then how would plugins know that another plugin hadn't already used `send` to send a response, and avoid two trying to send at the same time? | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185933972 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185933972 | IC_kwDOBm6k_c5Gr-qU | 9599 | 2022-07-15T21:00:56Z | 2022-07-15T21:00:56Z | OWNER | It's weird to return a `Response` though because the code in question lives in `DatasetteRouter` which currently works outside of the layer where responses happen - everything in that class at the moment works using `send` directly. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185925081 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185925081 | IC_kwDOBm6k_c5Gr8fZ | 9599 | 2022-07-15T20:55:41Z | 2022-07-15T20:56:16Z | OWNER | I think the hook gets called any time any exception makes it to this function: https://github.com/simonw/datasette/blob/950cc7677f65aa2543067b3bbfc2b6acb98b62c8/datasette/app.py#L1374-L1440 Multiple plugins can register for the hook. If they return a `Response` then that's returned to the user - if they return `None` then they can quietly do something with the error (log it to Sentry for example) and let some other handler return a response. I think Datasette should have a default plugin hook implementation which returns the 500 error page. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185929360 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185929360 | IC_kwDOBm6k_c5Gr9iQ | 9599 | 2022-07-15T20:58:11Z | 2022-07-15T20:58:11Z | OWNER | Proposed hook design: ```python @hookspec def handle_exception(datasette, request, exception): """Handle an uncaught exception""" ``` It takes `request` in case it needs to render a template and pass the request to it. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185935764 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185935764 | IC_kwDOBm6k_c5Gr_GU | 9599 | 2022-07-15T21:02:00Z | 2022-07-15T21:02:12Z | OWNER | Returning a `Response` is by far the most intuitive way to design this though. Plugin authors shouldn't care that `DatasetteRouter` (an undocumented internal API of Datasette) doesn't currently handle responses. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185937664 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185937664 | IC_kwDOBm6k_c5Gr_kA | 9599 | 2022-07-15T21:03:09Z | 2022-07-17T22:25:44Z | OWNER | Design decision: ```python @hookspec def handle_exception(datasette, request, exception): """Handle an uncaught exception. Can return a Response or None.""" ``` It will also support returning an awaitable, using the `await_me_maybe` pattern. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185939664 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185939664 | IC_kwDOBm6k_c5GsADQ | 9599 | 2022-07-15T21:04:19Z | 2022-07-15T21:04:19Z | OWNER | I'll implement this hook and then release it as `0.62a1`. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185943887 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185943887 | IC_kwDOBm6k_c5GsBFP | 9599 | 2022-07-15T21:07:53Z | 2022-07-15T21:07:53Z | OWNER | In `DatasetteRouter` I'm going to rename `handle_500` to `handle_exception` because it already deals with error codes other than 500 (`Forbidden` exceptions become 403 and `Base400` become 400). | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/datasette/issues/1770#issuecomment-1185944799 | https://api.github.com/repos/simonw/datasette/issues/1770 | 1185944799 | IC_kwDOBm6k_c5GsBTf | 9599 | 2022-07-15T21:09:08Z | 2022-07-15T21:09:08Z | OWNER | Had to lookup that `Base400` thing: https://github.com/simonw/datasette/blob/950cc7677f65aa2543067b3bbfc2b6acb98b62c8/datasette/utils/asgi.py#L16-L29 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306492437 | |
https://github.com/simonw/sqlite-utils/pull/452#issuecomment-1185949850 | https://api.github.com/repos/simonw/sqlite-utils/issues/452 | 1185949850 | IC_kwDOCGYnMM5GsCia | 22429695 | 2022-07-15T21:15:45Z | 2022-07-15T21:18:34Z | NONE | # [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/452?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report > Merging [#452](https://codecov.io/gh/simonw/sqlite-utils/pull/452?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (eef350f) into [main](https://codecov.io/gh/simonw/sqlite-utils/commit/42440d6345c242ee39778045e29143fb550bd2c2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (42440d6) will **increase** coverage by `0.00%`. > The diff coverage is `100.00%`. ```diff @@ Coverage Diff @@ ## main #452 +/- ## ======================================= Coverage 96.60% 96.61% ======================================= Files 6 6 Lines 2534 2540 +6 ======================================= + Hits 2448 2454 +6 Misses 86 86 ``` | [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/452?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [sqlite\_utils/db.py](https://codecov.io/gh/simonw/sqlite-utils/pull/452/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2RiLnB5) | `97.53% <100.00%> (+0.01%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/452?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). > **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) > `Δ = absolu… | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1299760627 | |
https://github.com/simonw/sqlite-utils/issues/454#issuecomment-1185971600 | https://api.github.com/repos/simonw/sqlite-utils/issues/454 | 1185971600 | IC_kwDOCGYnMM5GsH2Q | 9599 | 2022-07-15T21:48:23Z | 2022-07-15T21:48:23Z | OWNER | Documentation: - https://sqlite-utils.datasette.io/en/latest/cli.html#duplicating-tables - https://sqlite-utils.datasette.io/en/latest/cli-reference.html#duplicate | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1306548397 | |
https://github.com/simonw/sqlite-utils/issues/449#issuecomment-1185970114 | https://api.github.com/repos/simonw/sqlite-utils/issues/449 | 1185970114 | IC_kwDOCGYnMM5GsHfC | 9599 | 2022-07-15T21:46:13Z | 2022-07-15T21:46:13Z | OWNER | Documentation: - https://sqlite-utils.datasette.io/en/latest/python-api.html#duplicating-tables - https://sqlite-utils.datasette.io/en/latest/reference.html#sqlite_utils.db.Table.duplicate | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1279863844 | |
https://github.com/simonw/sqlite-utils/issues/453#issuecomment-1185974145 | https://api.github.com/repos/simonw/sqlite-utils/issues/453 | 1185974145 | IC_kwDOCGYnMM5GsIeB | 9599 | 2022-07-15T21:52:18Z | 2022-07-15T21:52:18Z | OWNER | I should warn you that this isn't a supported API - I reserve the right to change how it works between release without a major version bump, because it's not part of the documented API surface. You'll be fine if you pin to exact versions of the library though! You may find this recently-documented function useful though: https://sqlite-utils.datasette.io/en/latest/python-api.html#reading-rows-from-a-file See: - #443 I'm going to close this issue for the moment, but if anyone wants to submit a PR that cleans up this I'll happily review it. | {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1303169663 | |
https://github.com/simonw/sqlite-utils/issues/451#issuecomment-1185975132 | https://api.github.com/repos/simonw/sqlite-utils/issues/451 | 1185975132 | IC_kwDOCGYnMM5GsItc | 9599 | 2022-07-15T21:53:42Z | 2022-07-15T21:53:42Z | OWNER | Documentation can go here: https://sqlite-utils.datasette.io/en/stable/reference.html#sqlite-utils-utils | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1298531653 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185983894 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185983894 | IC_kwDOCGYnMM5GsK2W | 9599 | 2022-07-15T22:06:29Z | 2022-07-15T22:37:20Z | OWNER | Commands that could have `--ignore` added to them: - [x] `enable-fts` - [x] `disable-fts` (not doing) - [x] `add-column` - [x] `add-foreign-keys` (decided not to do this) - [x] `duplicate` - [x] `add-geometry-column` (decided not to do this) - [x] `create-spatial-index` (decided not to do this) | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185982012 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185982012 | IC_kwDOCGYnMM5GsKY8 | 9599 | 2022-07-15T22:02:59Z | 2022-07-15T22:03:49Z | OWNER | From https://sqlite-utils.datasette.io/en/latest/cli-reference.html Commands that currently have an `--ignore` flag, and their descriptions: - `insert`: Ignore records if pk already exists - `create-table`: If table already exists, do nothing - `add-foreign-key`: If foreign key already exists, do nothing - `drop-table`: *description is missing* - `create-view`: If view already exists, do nothing - `drop-view`: *description is missing* And `create-index` has: - `--if-not-exists`: Ignore if index already exists | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185988480 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185988480 | IC_kwDOCGYnMM5GsL-A | 9599 | 2022-07-15T22:12:20Z | 2022-07-15T22:12:20Z | OWNER | `disable-fts` already fails silently if the table doesn't have FTS setup. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185988277 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185988277 | IC_kwDOCGYnMM5GsL61 | 9599 | 2022-07-15T22:11:52Z | 2022-07-15T22:11:52Z | OWNER | For `enable-fts` I should use `--replace` instead, since that matches how the Python API works: https://github.com/simonw/sqlite-utils/blob/9dd4cf891d9f4565019e030ddc712507ac87b998/sqlite_utils/db.py#L2088-L2106 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/451#issuecomment-1185987117 | https://api.github.com/repos/simonw/sqlite-utils/issues/451 | 1185987117 | IC_kwDOCGYnMM5GsLot | 9599 | 2022-07-15T22:09:33Z | 2022-07-15T22:09:33Z | OWNER | Documentation: https://sqlite-utils.datasette.io/en/latest/reference.html#sqlite-utils-utils-chunks | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1298531653 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185993791 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185993791 | IC_kwDOCGYnMM5GsNQ_ | 9599 | 2022-07-15T22:23:02Z | 2022-07-15T22:23:02Z | OWNER | `create-spatial-index` is tricky. For consistency with `create-index` it should really use `--if-not-exists` - but under the hood it's not using `IF NOT EXISTS` because those indexes are created using `select CreateSpatialIndex(...)`. Really this highlights that `--if-not-exists` is a bad name for that option on `create-index`. I'm tempted to add `--ignore` to `create-index` and mark `--if-not-exists` as deprecated - though it will still work because I don't want to release a major version bump. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185994282 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185994282 | IC_kwDOCGYnMM5GsNYq | 9599 | 2022-07-15T22:24:12Z | 2022-07-15T22:24:12Z | OWNER | I can do this for `--create-index` instead: ``` Options: --name TEXT Explicit name for the new index --unique Make this a unique index --if-not-exists, --ignore Ignore if index already exists --analyze Run ANALYZE after creating the index --load-extension TEXT SQLite extensions to load -h, --help Show this message and exit. ``` That supports both names for the option. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185997860 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1185997860 | IC_kwDOCGYnMM5GsOQk | 9599 | 2022-07-15T22:32:51Z | 2022-07-15T22:32:51Z | OWNER | `add-foreign-keys` is enough of a power-feature that I'm happy not to add this there. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1186001408 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1186001408 | IC_kwDOCGYnMM5GsPIA | 9599 | 2022-07-15T22:37:40Z | 2022-07-15T22:37:40Z | OWNER | I'm going to skip `add-geometry-column` and `create-spatial-index` as well. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1186002019 | https://api.github.com/repos/simonw/sqlite-utils/issues/450 | 1186002019 | IC_kwDOCGYnMM5GsPRj | 9599 | 2022-07-15T22:39:09Z | 2022-07-15T22:39:09Z | OWNER | Here are all of the changes I made in this issue: https://github.com/simonw/sqlite-utils/compare/e10536c7f59abbb785f092bf83c4ab94c00e31a3...b9a89a0f2c3559989efe65f25a6e1f8fa76fe8b0 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1292060682 | |
https://github.com/simonw/sqlite-utils/issues/448#issuecomment-1186002560 | https://api.github.com/repos/simonw/sqlite-utils/issues/448 | 1186002560 | IC_kwDOCGYnMM5GsPaA | 9599 | 2022-07-15T22:40:40Z | 2022-07-15T22:40:40Z | OWNER | This is very strange. GitHub Actions CI here runs against Windows and installs OK. Marking this as "Help wanted" to see if anyone can figure out what's going on here. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1279144769 |