issue_comments
10,495 rows sorted by updated_at descending
This data as json, CSV (advanced)
issue >30
- Redesign default .json format 54
- Show column metadata plus links for foreign keys on arbitrary query results 51
- ?_extra= support (draft) 49
- Rethink how .ext formats (v.s. ?_format=) works before 1.0 48
- Upgrade to CodeMirror 6, add SQL autocomplete 48
- JavaScript plugin hooks mechanism similar to pluggy 47
- Updated Dockerfile with SpatiaLite version 5.0 45
- Complete refactor of TableView and table.html template 45
- Port Datasette to ASGI 42
- Authentication (and permissions) as a core concept 40
- invoke_startup() is not run in some conditions, e.g. gunicorn/uvicorn workers, breaking lots of things 36
- Deploy a live instance of demos/apache-proxy 34
- await datasette.client.get(path) mechanism for executing internal requests 33
- Maintain an in-memory SQLite table of connected databases and their tables 32
- Research: demonstrate if parallel SQL queries are worthwhile 32
- Ability to sort (and paginate) by column 31
- Default API token authentication mechanism 30
- Port as many tests as possible to async def tests against ds_client 29
- link_or_copy_directory() error - Invalid cross-device link 28
- Add ?_extra= mechanism for requesting extra properties in JSON 27
- Export to CSV 27
- base_url configuration setting 27
- Documentation with recommendations on running Datasette in production without using Docker 27
- Optimize all those calls to index_list and foreign_key_list 27
- Support cross-database joins 26
- Ability for a canned query to write to the database 26
- table.transform() method for advanced alter table 26
- New pattern for views that return either JSON or HTML, available for plugins 26
- Proof of concept for Datasette on AWS Lambda with EFS 25
- WIP: Add Gmail takeout mbox import 25
- …
reactions 21 ✖
- {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 9,415
- {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 191
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 35
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0} 33
- {"total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 20
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0} 13
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1} 7
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 1, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 6
- {"total_count": 3, "+1": 3, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 6
- {"total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 2, "rocket": 0, "eyes": 0} 3
- {"total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 3
- {"total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 2, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 2
- {"total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 3, "rocket": 0, "eyes": 0} 2
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 1, "heart": 0, "rocket": 0, "eyes": 0} 1
- {"total_count": 15, "+1": 7, "-1": 0, "laugh": 1, "hooray": 1, "confused": 0, "heart": 5, "rocket": 1, "eyes": 0} 1
- {"total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1} 1
- {"total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0} 1
- {"total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0} 1
- {"total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 3, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1
- {"total_count": 4, "+1": 4, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1
- {"total_count": 5, "+1": 5, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1532481862 | https://github.com/simonw/sqlite-utils/issues/496#issuecomment-1532481862 | https://api.github.com/repos/simonw/sqlite-utils/issues/496 | IC_kwDOCGYnMM5bV9FG | xavdid 1231935 | 2023-05-03T05:53:26Z | 2023-05-03T05:53:26Z | NONE | Would love to put our heads together for improvements here. I think anything that is Right now, all args are typed as As for table/view, given that they don't have the same methods, it would be nice to be able to get one or the other specifically. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
devrel/python api: Pylance type hinting 1393202060 | |
1532304714 | https://github.com/simonw/datasette/issues/2067#issuecomment-1532304714 | https://api.github.com/repos/simonw/datasette/issues/2067 | IC_kwDOBm6k_c5bVR1K | justmars 39538958 | 2023-05-03T00:16:03Z | 2023-05-03T00:16:03Z | NONE | Curiously, after running commands on the database that was litestream-restored, datasette starts to work again, e.g. ```sh litestream restore -o data/db.sqlite s3://mytestbucketxx/db datasette data/db.sqlite fails (OperationalError described above)``` ```sh litestream restore -o data/db.sqlite s3://mytestbucketxx/db sqlite-utils enable-wal data/db.sqlite datasette data/db.sqlite works``` ```sh litestream restore -o data/db.sqlite s3://mytestbucketxx/db sqlite-utils optimize data/db.sqlite datasette data/db.sqlite works``` ```sh litestream restore -o data/db.sqlite s3://mytestbucketxx/db sqlite3 data/db.sqlite ".clone test.db" datasette test.db works``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Litestream-restored db: errors on 3.11 and 3.10.8; but works on py3.10.7 and 3.10.6 1690765434 | |
1530822437 | https://github.com/simonw/datasette/pull/2052#issuecomment-1530822437 | https://api.github.com/repos/simonw/datasette/issues/2052 | IC_kwDOBm6k_c5bPn8l | cldellow 193185 | 2023-05-02T03:35:30Z | 2023-05-02T16:02:38Z | CONTRIBUTOR | Also, just checking - is this how I'd write bulletproof plugin registration code that is robust against the order in which the script tags load (eg if both my code and the Datasette code are loaded via a ```js if (window.DATASETTE) go(window.DATASETTE); else document.addEventListener("datasette_init", (evt) => go(evt.detail)); function go(manager) { manager.registerPlugin(...) } ``` I don't know if it'd make sense, but you could also consider the asynchronous queuing pattern that Google Analytics uses (see this Stack Overflow post for more details): ```js DATASETTE = DATASETTE || []; DATASETTE.push(go); function go(manager) { manager.registerPlugin(...); } ``` |
{ "total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 } |
feat: Javascript Plugin API (Custom panels, column menu items with JS actions) 1651082214 | |
1530817667 | https://github.com/simonw/datasette/pull/2052#issuecomment-1530817667 | https://api.github.com/repos/simonw/datasette/issues/2052 | IC_kwDOBm6k_c5bPmyD | cldellow 193185 | 2023-05-02T03:24:53Z | 2023-05-02T03:24:53Z | CONTRIBUTOR | Thanks for putting this together! I've been slammed with work/personal stuff so haven't been able to actually prototype anything with this. :( tl;dr: I think this would be useful immediately as is. It might also be nice if the plugins could return The long version: I read the design notes and example plugin. I think I'd be able to use this in datasette-ui-extras for my lazy-facets feature. The lazy-facets feature tries to provide a snappier user experience. It does this by altering how suggested facets work. First, at page render time: (A) it lies to Datasette and claims that no columns support facets, this avoids the lengthy delays/timeouts that can happen if the dataset is large. (B) there's a python plugin that implements the extra_body_script hook, to write out the list of column names for future use by JavaScript Second, at page load time: there is some JavaScript that: (C) makes AJAX requests to suggest facets for each column - it makes 1 request per column, using the data from (B) (D) wires up the column menus to add Facet-by-this options for each facet With the currently proposed plugin scheme, I think (D) could be moved into the plugin. I'd do the ajax requests, then register the plugin. If the plugin scheme also supported promises, I think (B) and (C) could also be moved into the plugin. Does that make sense? Sorry for the wall of text! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
feat: Javascript Plugin API (Custom panels, column menu items with JS actions) 1651082214 | |
1529737426 | https://github.com/simonw/datasette/pull/2064#issuecomment-1529737426 | https://api.github.com/repos/simonw/datasette/issues/2064 | IC_kwDOBm6k_c5bLfDS | dependabot[bot] 49699333 | 2023-05-01T13:58:50Z | 2023-05-01T13:58:50Z | CONTRIBUTOR | Superseded by #2068. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Bump sphinx from 6.1.3 to 6.2.1 1683229834 | |
1524709988 | https://github.com/simonw/datasette/issues/2065#issuecomment-1524709988 | https://api.github.com/repos/simonw/datasette/issues/2065 | IC_kwDOBm6k_c5a4Tpk | simonw 9599 | 2023-04-27T05:09:36Z | 2023-04-27T05:09:36Z | OWNER | That fixed it - after installing
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette cannot be installed with Rye 1686033652 | |
1524707628 | https://github.com/simonw/datasette/issues/2065#issuecomment-1524707628 | https://api.github.com/repos/simonw/datasette/issues/2065 | IC_kwDOBm6k_c5a4TEs | simonw 9599 | 2023-04-27T05:06:44Z | 2023-04-27T05:06:44Z | OWNER | I need
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette cannot be installed with Rye 1686033652 | |
1524699863 | https://github.com/simonw/datasette/issues/2065#issuecomment-1524699863 | https://api.github.com/repos/simonw/datasette/issues/2065 | IC_kwDOBm6k_c5a4RLX | simonw 9599 | 2023-04-27T04:56:22Z | 2023-04-27T04:56:22Z | OWNER | Turned this into a TIL: https://til.simonwillison.net/python/rye |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette cannot be installed with Rye 1686033652 | |
1524680160 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524680160 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4MXg | simonw 9599 | 2023-04-27T04:27:50Z | 2023-04-27T04:27:50Z | OWNER | That fixed it. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524675817 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524675817 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4LTp | simonw 9599 | 2023-04-27T04:21:03Z | 2023-04-27T04:21:03Z | OWNER | I went with this to generate the long string: https://github.com/simonw/datasette/blob/0b0c5cd7a94fe3f151a3e10261b5c84ee64f2f18/tests/test_csv.py#L157-L176 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524669124 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524669124 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4JrE | simonw 9599 | 2023-04-27T04:10:44Z | 2023-04-27T04:10:52Z | OWNER | I need an alternative way of generating a long string with a shorter URL.
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524666049 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524666049 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4I7B | simonw 9599 | 2023-04-27T04:06:18Z | 2023-04-27T04:06:18Z | OWNER | Most recent It looks like that URL limit is new: https://github.com/encode/httpx/commit/57daabf673705954afa94686c0002801c93d31f3#diff-78d8d93b5dd4c77d99c3e2b46b7286ba71a8fd60e92d8bd4eee5fb200b4f87bfR149-R155 ```python def urlparse(url: str = "", **kwargs: typing.Optional[str]) -> ParseResult: # Initial basic checks on allowable URLs. # ---------------------------------------
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524660603 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524660603 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4Hl7 | simonw 9599 | 2023-04-27T04:02:55Z | 2023-04-27T04:02:55Z | OWNER | In the debugger:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524659084 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524659084 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4HOM | simonw 9599 | 2023-04-27T04:02:07Z | 2023-04-27T04:02:07Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | ||
1524655203 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524655203 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4GRj | simonw 9599 | 2023-04-27T03:59:56Z | 2023-04-27T03:59:56Z | OWNER | In a fresh Datasette checkout I ran:
That gave me a virtual environment with 3.7.16 Python. Then I ran:
Weirdly that gave me a I figured out the location of the virtual environment with ``` % /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/bin/pytest tests/test_csv.py ============================================================================================== test session starts =============================================================================================== platform darwin -- Python 3.7.16, pytest-7.3.1, pluggy-1.0.0 SQLite: 3.39.5 rootdir: /private/tmp/datasette configfile: pytest.ini plugins: asyncio-0.21.0, timeout-2.1.0, xdist-3.2.1, anyio-3.6.2 asyncio: mode=strict collected 15 items tests/test_csv.py ..........F.... [100%] ==================================================================================================== FAILURES ==================================================================================================== ______________ test_max_csv_mb _________________ app_client_csv_max_mb_one = <datasette.utils.testing.TestClient object at 0x107ab5c08>
/private/tmp/datasette/tests/test_csv.py:161: /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/asgiref/sync.py:240: in call return call_result.result() /Users/simon/.pyenv/versions/3.7.16/lib/python3.7/concurrent/futures/_base.py:428: in result return self.__get_result() /Users/simon/.pyenv/versions/3.7.16/lib/python3.7/concurrent/futures/_base.py:384: in __get_result raise self._exception /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/asgiref/sync.py:306: in main_wrap result = await self.awaitable(args, kwargs) /private/tmp/datasette/datasette/utils/testing.py:76: in get headers=headers, /private/tmp/datasette/datasette/utils/testing.py:167: in _request content=post_body, /private/tmp/datasette/datasette/app.py:1787: in request method, self._fix(path, avoid_path_rewrites), kwargs /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/httpx/_client.py:1528: in request extensions=extensions, /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/httpx/_client.py:346: in build_request url = self._merge_url(url) /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/httpx/_client.py:376: in _merge_url merge_url = URL(url) /Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/httpx/_urls.py:113: in init self._uri_reference = urlparse(url, *kwargs) url = "http://localhost/fixtures.csv?sql=select+'abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde...gabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg'+from+compound_three_primary_keys&_stream=1&_size=max" kwargs = {}
/Users/simon/.local/share/virtualenvs/datasette-cZYvnUqY/lib/python3.7/site-packages/httpx/_urlparse.py:155: InvalidURL ============================================================================================ short test summary info ============================================================================================= FAILED tests/test_csv.py::test_max_csv_mb - httpx.InvalidURL: URL too long ========================================================================================== 1 failed, 14 passed in 1.83s ========================================================================================== (datasette) simon@Simons-MacBook-Pro datasette % ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524648995 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524648995 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4Ewj | simonw 9599 | 2023-04-27T03:56:42Z | 2023-04-27T03:57:11Z | OWNER | I don't have 3.7 locally. Trying to install it with
Then:
Installing:
Output:
So the executable is |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524638233 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524638233 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4CIZ | simonw 9599 | 2023-04-27T03:50:51Z | 2023-04-27T03:50:51Z | OWNER | Failure was on 3.7. I'll try that. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524637376 | https://github.com/simonw/datasette/issues/2066#issuecomment-1524637376 | https://api.github.com/repos/simonw/datasette/issues/2066 | IC_kwDOBm6k_c5a4B7A | simonw 9599 | 2023-04-27T03:50:19Z | 2023-04-27T03:50:19Z | OWNER | Having trouble replicating this on my laptop. I tried a fresh virtual environment with fresh packages (in case this is a
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Failing test: httpx.InvalidURL: URL too long 1686042269 | |
1524616740 | https://github.com/simonw/datasette/issues/2065#issuecomment-1524616740 | https://api.github.com/repos/simonw/datasette/issues/2065 | IC_kwDOBm6k_c5a384k | simonw 9599 | 2023-04-27T03:38:21Z | 2023-04-27T03:38:21Z | OWNER | Tried this:
But got this error:
I instead downloaded that file and ran:
This worked! And now:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette cannot be installed with Rye 1686033652 | |
1521837780 | https://github.com/simonw/datasette/pull/2063#issuecomment-1521837780 | https://api.github.com/repos/simonw/datasette/issues/2063 | IC_kwDOBm6k_c5atWbU | dependabot[bot] 49699333 | 2023-04-25T13:57:52Z | 2023-04-25T13:57:52Z | CONTRIBUTOR | Superseded by #2064. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Bump sphinx from 6.1.3 to 6.2.0 1681339696 | |
1510423051 | https://github.com/simonw/datasette/pull/2052#issuecomment-1510423051 | https://api.github.com/repos/simonw/datasette/issues/2052 | IC_kwDOBm6k_c5aBzoL | hydrosquall 9020979 | 2023-04-16T16:12:14Z | 2023-04-20T05:14:39Z | CONTRIBUTOR | Javascript Plugin Docs (alpha)MotivationThe Datasette JS Plugin API allows developers to add interactive features to the UI, without having to modify the Python source code. SetupNo external/NPM dependencies are needed. Plugin behavior is coordinated by the Datasette There are 2 ways to add your plugin to the
```js document.addEventListener("datasette_init", function (evt) { const { detail: manager } = evt; // register plugin here }); ```
There are 2 plugin hooks available to
While there are additional properties on the
I welcome ideas for more hooks, or feedback on the current design! ExamplesSee the example plugins file for additional examples. Hooks API Guide
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
feat: Javascript Plugin API (Custom panels, column menu items with JS actions) 1651082214 | |
1515694393 | https://github.com/simonw/datasette/pull/2052#issuecomment-1515694393 | https://api.github.com/repos/simonw/datasette/issues/2052 | IC_kwDOBm6k_c5aV6k5 | hydrosquall 9020979 | 2023-04-20T04:25:55Z | 2023-04-20T04:25:55Z | CONTRIBUTOR | Thanks for the thoughtful review and generous examples @asg017 ! I'll make the changes you suggested soon. Bonus thoughts inlined below.
These were very much appreciated, it's important to a plugin system that details like this feel right! I'll address them in batch later in the week.
FWIW I am in favor of doing Typescript - I just wanted to keep the initial set of files in this PR as simple as possible to review. Really appreciate you scaffolding this initial set of types + I think it would be a welcome addition to maintain a set of types.d.ts files. I'm entertaining the idea of writing the actual source code in Typescript as long as the compiled output is readable b/c it can be tricky to keep the types and plain JS files in sync. Curious if you have encountered projects that are good at preventing drift.
This is a great observation. I'm inclined towards something like
I really like this idea! It'll be easier to get contributors if they don't have to touch the python side at all.
One cost of doing this is that pages that won't use the JS would still have to load the unused code (given that I'm not sending up anything complex like lazy loading). But hopefully the manager core size is close to negligible, and it won't be a big deal. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
feat: Javascript Plugin API (Custom panels, column menu items with JS actions) 1651082214 | |
1510423215 | https://github.com/simonw/datasette/pull/2052#issuecomment-1510423215 | https://api.github.com/repos/simonw/datasette/issues/2052 | IC_kwDOBm6k_c5aBzqv | hydrosquall 9020979 | 2023-04-16T16:12:59Z | 2023-04-16T16:12:59Z | CONTRIBUTOR | Research notes
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
feat: Javascript Plugin API (Custom panels, column menu items with JS actions) 1651082214 | |
1509951952 | https://github.com/simonw/sqlite-utils/issues/425#issuecomment-1509951952 | https://api.github.com/repos/simonw/sqlite-utils/issues/425 | IC_kwDOCGYnMM5aAAnQ | Dhyanesh97 89400147 | 2023-04-15T20:14:58Z | 2023-04-15T20:14:58Z | NONE | is this change released ? Because when we run docker containers issue still persists for production deployments. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite3.NotSupportedError`: deterministic=True requires SQLite 3.8.3 or higher 1203842656 | |
1509852821 | https://github.com/simonw/datasette/pull/2056#issuecomment-1509852821 | https://api.github.com/repos/simonw/datasette/issues/2056 | IC_kwDOBm6k_c5Z_oaV | cclauss 3709715 | 2023-04-15T14:24:45Z | 2023-04-15T14:24:45Z | NONE | Status? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
GitHub Action to lint Python code with ruff 1661860507 | |
1509461324 | https://github.com/simonw/datasette/pull/2052#issuecomment-1509461324 | https://api.github.com/repos/simonw/datasette/issues/2052 | IC_kwDOBm6k_c5Z-I1M | hydrosquall 9020979 | 2023-04-15T01:57:06Z | 2023-04-15T01:57:06Z | CONTRIBUTOR | Notes from 1:1 - it is possible to pass in URL params into a ObservableHQ notebook: https://observablehq.com/@bherbertlc/pass-values-as-url-parameters |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
feat: Javascript Plugin API (Custom panels, column menu items with JS actions) 1651082214 | |
1190995982 | https://github.com/dogsheep/dogsheep-photos/pull/31#issuecomment-1190995982 | https://api.github.com/repos/dogsheep/dogsheep-photos/issues/31 | IC_kwDOD079W85G_SgO | jakewilkins 19231792 | 2022-07-21T03:26:38Z | 2023-04-14T22:41:31Z | NONE | 👋 Any update on getting this merged? Alternatively, is there a work around for this issue to unblock myself? edit to add: huge fan of both this project and Edit again to add:
Yes, there is. I was able to apply the patch of this PR and it applies (mostly) cleanly and works.
|
{ "total_count": 4, "+1": 4, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Update for Big Sur 771511344 | |
1508784533 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/6#issuecomment-1508784533 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/6 | IC_kwDOJHON9s5Z7jmV | sirnacnud 579727 | 2023-04-14T15:22:09Z | 2023-04-14T15:22:09Z | NONE | Just changing the encoding in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Character encoding problem 1617602868 | |
1507264934 | https://github.com/simonw/datasette/issues/2058#issuecomment-1507264934 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Z1wmm | esagara 1138559 | 2023-04-13T16:35:21Z | 2023-04-13T16:35:21Z | NONE | I tried deploying the fix you submitted, but still getting the same errors. I can past the logs here if needed, but I really don't see anything new in them. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1506485287 | https://github.com/simonw/datasette/pull/2056#issuecomment-1506485287 | https://api.github.com/repos/simonw/datasette/issues/2056 | IC_kwDOBm6k_c5ZyyQn | cclauss 3709715 | 2023-04-13T07:29:38Z | 2023-04-13T07:41:55Z | NONE | Ruff (written in Rust, not Python) is a 23MB executable so the time to download and pip install it dwarfs its runtime. Let's run ruff with and without GitHub Actions pip cache side-by-side to see the relative performance. Once you approve the workflows below, There are two great problems in computer science: ;-) 1. Naming things 2. Cache invalidation 3. Off-by-one errors For 2., https://github.com/actions/setup-python#caching-packages-dependencies is vital reading.
Only exactly pinned requirements can be cached. Currently in This means that there will be very few cache hits in the current actions. See the link below to print out cache hits: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#cache-hit
I would be shocked if Fastly does not have beefy CDN nodes in the same datacenters where GitHub Actions run so GHA requests to download |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
GitHub Action to lint Python code with ruff 1661860507 | |
1506223848 | https://github.com/simonw/sqlite-utils/issues/527#issuecomment-1506223848 | https://api.github.com/repos/simonw/sqlite-utils/issues/527 | IC_kwDOCGYnMM5Zxybo | simonw 9599 | 2023-04-13T02:08:16Z | 2023-04-13T02:08:16Z | OWNER | I agree, this is a design flaw. It's technically a breaking change. As such, I would need to bump to v4 to responsibly release this. I'd rather bundle in a few more breaking changes before shipping that version. One thing we could do here is add an extra argument to
This would trigger the new, improved behaviour without breaking existing code that depends on how it works at the moment. Then in What do you think? (I'm open to suggestions for better names for this parameter too) |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`Table.convert()` skips falsey values 1578790070 | |
1506203550 | https://github.com/simonw/datasette/issues/2058#issuecomment-1506203550 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Zxtee | cephillips 547438 | 2023-04-13T01:48:21Z | 2023-04-13T01:48:21Z | NONE | Really interesting how you are using ChatGPT in this. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1506200813 | https://github.com/simonw/sqlite-utils/pull/537#issuecomment-1506200813 | https://api.github.com/repos/simonw/sqlite-utils/issues/537 | IC_kwDOCGYnMM5Zxszt | codecov[bot] 22429695 | 2023-04-13T01:45:22Z | 2023-04-13T01:45:22Z | NONE | Codecov ReportPatch coverage:
Additional details and impacted files```diff @@ Coverage Diff @@ ## main #537 +/- ## ======================================= Coverage 96.25% 96.25% ======================================= Files 6 6 Lines 2671 2673 +2 ======================================= + Hits 2571 2573 +2 Misses 100 100 ``` | [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/537?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/537?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2RiLnB5) | `97.33% <100.00%> (+<0.01%)` | :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=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):umbrella: View full report in Codecov by Sentry. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support self-referencing FKs in `Table.create` 1665200812 | |
1506179555 | https://github.com/simonw/datasette/pull/2056#issuecomment-1506179555 | https://api.github.com/repos/simonw/datasette/issues/2056 | IC_kwDOBm6k_c5Zxnnj | simonw 9599 | 2023-04-13T01:21:05Z | 2023-04-13T01:22:08Z | OWNER | OK, I'm sold - this is a really neat improvement. One thing to change in the PR: right now it runs I prefer to avoid hitting PyPI every time, so I like to use the GitHub Actions cache. My usual pattern for that looks like this: Then a separate command that runs Are you OK to make that change? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
GitHub Action to lint Python code with ruff 1661860507 | |
1506177857 | https://github.com/simonw/datasette/pull/2056#issuecomment-1506177857 | https://api.github.com/repos/simonw/datasette/issues/2056 | IC_kwDOBm6k_c5ZxnNB | simonw 9599 | 2023-04-13T01:18:18Z | 2023-04-13T01:18:18Z | OWNER | Cool - and now https://github.com/simonw/datasette/pull/2056/files is showing me those inline annotations: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
GitHub Action to lint Python code with ruff 1661860507 | |
1506177115 | https://github.com/simonw/datasette/pull/2056#issuecomment-1506177115 | https://api.github.com/repos/simonw/datasette/issues/2056 | IC_kwDOBm6k_c5ZxnBb | simonw 9599 | 2023-04-13T01:17:16Z | 2023-04-13T01:17:16Z | OWNER | Here are the failures: https://github.com/simonw/datasette/actions/runs/4684460653/jobs/8300630794?pr=2056 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
GitHub Action to lint Python code with ruff 1661860507 | |
1506175208 | https://github.com/simonw/datasette/pull/2056#issuecomment-1506175208 | https://api.github.com/repos/simonw/datasette/issues/2056 | IC_kwDOBm6k_c5Zxmjo | simonw 9599 | 2023-04-13T01:14:13Z | 2023-04-13T01:14:13Z | OWNER | https://github.com/simonw/datasette/actions/runs/4664796647/jobs/8300596121?pr=2056 it's pretty fast - that finished in 9s. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
GitHub Action to lint Python code with ruff 1661860507 | |
1506174353 | https://github.com/simonw/datasette/issues/2059#issuecomment-1506174353 | https://api.github.com/repos/simonw/datasette/issues/2059 | IC_kwDOBm6k_c5ZxmWR | simonw 9599 | 2023-04-13T01:13:00Z | 2023-04-13T01:13:00Z | OWNER | Can you provide a URL to an example, and/or a screenshot of this? Is it a browser warning or is it a warning from Heroku itself? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Deceptive site ahead" alert on Heroku deployment 1665053646 | |
1504288134 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1504288134 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5ZqZ2G | simonw 9599 | 2023-04-11T23:55:06Z | 2023-04-12T03:34:32Z | OWNER | Also checked the official Datasette Docker image - I had to run that in Codespaces because it doesn't currently work on my M2 Mac: ``` codespace@codespaces-112c61:/workspaces/sqlite-utils$ docker pull datasetteproject/datasette Using default tag: latest ... codespace@codespaces-112c61:/workspaces/sqlite-utils$ docker run -it datasetteproject/datasette / bin/bash root@75ba34f501ec:/# python Python 3.11.0 (main, Dec 6 2022, 13:31:55) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information.
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1504426792 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504426792 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Zq7so | simonw 9599 | 2023-04-12T02:02:42Z | 2023-04-12T02:02:42Z | OWNER | I tightened up the benchmark (it was measuring the time taken to create the tables too) and got this: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504328395 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504328395 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5ZqjrL | simonw 9599 | 2023-04-12T00:28:38Z | 2023-04-12T00:28:38Z | OWNER | Here's a much better chart, which shows that MD5 performance unsurprisingly gets worse as the number of tables increases while |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504315697 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504315697 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Zqgkx | simonw 9599 | 2023-04-12T00:16:22Z | 2023-04-12T00:27:12Z | OWNER | I got ChatGPT (code execution alpha) to run a micro-benchmark for me. This was the conclusion:
Here's the chart it drew me: (It's a pretty rubbish chart though, it only took measurements at 100 and 200 and drew a line between the two, I should have told it to measure every 10 and plot that) And the full transcript: https://gist.github.com/simonw/2fc46effbfbe49e6de0bcfdc9e31b235 The benchmark looks good enough on first glance that I don't feel the need to be more thorough with it. I'm tempted to add something to the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504298448 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504298448 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5ZqcXQ | simonw 9599 | 2023-04-12T00:04:01Z | 2023-04-12T00:04:01Z | OWNER | Here's a potential workaround: when I store the schema versions, I could also score an MD5 hash of the full schema ( The performance overhead of this needs investigating - how much more expensive is |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504295345 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504295345 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Zqbmx | simonw 9599 | 2023-04-12T00:01:42Z | 2023-04-12T00:02:26Z | OWNER | Here's the relevant code: This function is called on almost every request (everything that subclasses It uses This was already the cause of a subtle bug here: - #1231 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504292145 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504292145 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Zqa0x | simonw 9599 | 2023-04-11T23:58:59Z | 2023-04-11T23:58:59Z | OWNER | Asked on the SQLite Forum if anyone has seen this before: https://sqlite.org/forum/forumpost/793a2ed75b |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504291892 | https://github.com/simonw/datasette/issues/2058#issuecomment-1504291892 | https://api.github.com/repos/simonw/datasette/issues/2058 | IC_kwDOBm6k_c5Zqaw0 | simonw 9599 | 2023-04-11T23:58:45Z | 2023-04-11T23:58:45Z | OWNER | I thought it might relate to the "defensive mode" issue described here: But I have since determined that the Datasette official Docker image does NOT run anything in defensive mode, so I don't think it's related to that. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
500 "attempt to write a readonly database" error caused by "PRAGMA schema_version" 1663399821 | |
1504245029 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1504245029 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5ZqPUl | simonw 9599 | 2023-04-11T23:13:41Z | 2023-04-11T23:14:39Z | OWNER | I also tested this against the current pasted in the above recipeapt install software-properties-common add-apt-repository ppa:deadsnakes/ppa apt install python3.11 python3.11 pasted it in again``` In both cases the Python code did not raise an exception, which suggests that on Ubuntu those two Python versions do not have the defensive mode set. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1503838640 | https://github.com/simonw/datasette/issues/2057#issuecomment-1503838640 | https://api.github.com/repos/simonw/datasette/issues/2057 | IC_kwDOBm6k_c5ZosGw | simonw 9599 | 2023-04-11T17:48:23Z | 2023-04-11T17:48:23Z | OWNER |
I was right about that: ```pycon
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DeprecationWarning: pkg_resources is deprecated as an API 1662951875 | |
1503832422 | https://github.com/simonw/datasette/issues/2057#issuecomment-1503832422 | https://api.github.com/repos/simonw/datasette/issues/2057 | IC_kwDOBm6k_c5Zoqlm | simonw 9599 | 2023-04-11T17:42:57Z | 2023-04-11T17:46:42Z | OWNER | I ran this prompt against ChatGPT with the Browsing alpha:
It looked up the fix for me: And suggested: ```python import importlib.resources Replace pkg_resources.resource_isdir with importlib.resources.files().is_file()if importlib.resources.files(plugin.name).joinpath("static").is_file():
static_path = importlib.resources.as_file(
importlib.resources.files(plugin.name).joinpath("static")
)
if importlib.resources.files(plugin.name).joinpath("templates").is_file():
templates_path = importlib.resources.as_file(
importlib.resources.files(plugin.name).joinpath("templates")
)
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DeprecationWarning: pkg_resources is deprecated as an API 1662951875 | |
1503833906 | https://github.com/simonw/datasette/issues/2057#issuecomment-1503833906 | https://api.github.com/repos/simonw/datasette/issues/2057 | IC_kwDOBm6k_c5Zoq8y | simonw 9599 | 2023-04-11T17:44:16Z | 2023-04-11T17:45:45Z | OWNER | Another prompt:
Response: ```python import importlib.metadata Get the version number of the specified packagepackage_version = importlib.metadata.version(package) ``` That seems to work: ```pycon
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
DeprecationWarning: pkg_resources is deprecated as an API 1662951875 | |
1502629404 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502629404 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85ZkE4c | simonw 9599 | 2023-04-11T03:15:47Z | 2023-04-11T03:46:17Z | MEMBER | I think |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
1502629219 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502629219 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85ZkE1j | simonw 9599 | 2023-04-11T03:15:26Z | 2023-04-11T03:15:26Z | MEMBER | OK, I figured this out. Unfortunately it's an error that occurs on Python versions that have defensive mode turned on, and it doesn't look like there's a way to turn that mode off. See notes above. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
1502559442 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1502559442 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5ZjzzS | simonw 9599 | 2023-04-11T01:32:30Z | 2023-04-11T01:33:27Z | OWNER | This seems to work:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1502557629 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1502557629 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5ZjzW9 | simonw 9599 | 2023-04-11T01:30:12Z | 2023-04-11T01:30:12Z | OWNER | I'll ask on the SQLite forum if it's possible to toggle that mode on and off using regular SQL. My hunch is that it isn't. In which case A utility function that can detect this mode would be really useful too. I'd probably have to do a test that tries to modify |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1502556111 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1502556111 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5Zjy_P | simonw 9599 | 2023-04-11T01:28:41Z | 2023-04-11T01:28:41Z | OWNER | Investigating this one now. The In the broken version's virtual environment directory I ran this:
As far as I can tell there's no way to turn it OFF again in Python. My virtual environment that DOES work has this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1502546045 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502546045 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85Zjwh9 | simonw 9599 | 2023-04-11T01:14:50Z | 2023-04-11T01:14:50Z | MEMBER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | ||
1502543165 | https://github.com/dogsheep/swarm-to-sqlite/issues/13#issuecomment-1502543165 | https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/13 | IC_kwDODD6af85Zjv09 | simonw 9599 | 2023-04-11T01:10:36Z | 2023-04-11T01:11:47Z | MEMBER | I just had that error myself on macOS while running the tests:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
fails before generating views. ERR: table sqlite_master may not be modified 1373210675 | |
1501017004 | https://github.com/simonw/sqlite-utils/pull/531#issuecomment-1501017004 | https://api.github.com/repos/simonw/sqlite-utils/issues/531 | IC_kwDOCGYnMM5Zd7Os | eyeseast 25778 | 2023-04-09T01:49:43Z | 2023-04-09T01:49:43Z | CONTRIBUTOR | I'm going to close this in favor of #536. Will try a cleaner approach to custom paths once that one is merge. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add paths for homebrew on Apple silicon 1620164673 | |
1500893216 | https://github.com/simonw/sqlite-utils/pull/536#issuecomment-1500893216 | https://api.github.com/repos/simonw/sqlite-utils/issues/536 | IC_kwDOCGYnMM5ZddAg | codecov[bot] 22429695 | 2023-04-08T13:35:42Z | 2023-04-08T13:35:42Z | NONE | Codecov ReportPatch and project coverage have no change.
Additional details and impacted files```diff @@ Coverage Diff @@ ## main #536 +/- ## ======================================= Coverage 96.25% 96.25% ======================================= Files 6 6 Lines 2671 2671 ======================================= Hits 2571 2571 Misses 100 100 ``` | [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/536?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [sqlite\_utils/utils.py](https://codecov.io/gh/simonw/sqlite-utils/pull/536?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL3V0aWxzLnB5) | `95.13% <ø> (ø)` | | 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=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):umbrella: View full report in Codecov by Sentry. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add paths for homebrew on Apple silicon 1659525418 | |
1500608101 | https://github.com/simonw/datasette/issues/2054#issuecomment-1500608101 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZcXZl | simonw 9599 | 2023-04-07T20:14:38Z | 2023-04-07T20:14:38Z | OWNER | Ooh that one's really interesting - very different from the others: ```ruby app.rbrequire "roda" class App < Roda route do |r| r.root do "Home page" end
end end config.rurequire_relative "app" run App.freeze.app ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1465038901 | https://github.com/simonw/sqlite-utils/pull/531#issuecomment-1465038901 | https://api.github.com/repos/simonw/sqlite-utils/issues/531 | IC_kwDOCGYnMM5XUrg1 | codecov[bot] 22429695 | 2023-03-11T22:29:19Z | 2023-04-07T18:19:49Z | NONE | Codecov ReportPatch coverage:
Additional details and impacted files```diff @@ Coverage Diff @@ ## main #531 +/- ## ========================================== + Coverage 96.25% 96.29% +0.03% ========================================== Files 6 6 Lines 2671 2671 ========================================== + Hits 2571 2572 +1 + Misses 100 99 -1 ``` | [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [sqlite\_utils/utils.py](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL3V0aWxzLnB5) | `95.13% <ø> (ø)` | | | [sqlite\_utils/cli.py](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2NsaS5weQ==) | `95.26% <100.00%> (+0.09%)` | :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=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):umbrella: View full report in Codecov by Sentry. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add paths for homebrew on Apple silicon 1620164673 | |
1499797384 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499797384 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZZReI | dsisnero 6213 | 2023-04-07T00:46:50Z | 2023-04-07T00:46:50Z | NONE | you should have a look at Roda written in ruby . |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499604822 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499604822 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYidW | simonw 9599 | 2023-04-06T20:48:19Z | 2023-04-06T20:48:55Z | OWNER | I actually quite like that. I could even use The crucial rule here is NO INSTANCE STATE - that's what makes routing to classes particularly damaging, and encourages code that's hard to maintain. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499604066 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499604066 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYiRi | simonw 9599 | 2023-04-06T20:47:30Z | 2023-04-06T20:47:30Z | OWNER | I'm contemplating a new approach: using a class with static methods. Something like this: ```python class TableView(MethodRouter): @staticmethod async def get(request): return Response.text("GET")
It can offer default HEAD and OPTIONS methods too. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499491258 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499491258 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYGu6 | simonw 9599 | 2023-04-06T19:00:16Z | 2023-04-06T20:40:16Z | OWNER | I asked GPT-4 to compare URL routing based on path and verb approaches in different languages and frameworks and spit out some examples. Full transcript here: https://gist.github.com/simonw/fa2379b97420404a81b0fcdb4db79657 Initial prompt:
Flask: ```python from flask import Flask app = Flask(name) @app.route('/example', methods=['GET']) def get_example(): return "This is a GET request." @app.route('/example', methods=['POST']) def post_example(): return "This is a POST request." if name == 'main':
app.run()
app.get('/example', (req, res) => { res.send('This is a GET request.'); }); app.post('/example', (req, res) => { res.send('This is a POST request.'); }); app.listen(3000, () => {
console.log('Server is running on port 3000');
});
import ( "github.com/gin-gonic/gin" ) func main() { r := gin.Default()
}
async fn get_example() -> impl Responder { HttpResponse::Ok().body("This is a GET request.") } async fn post_example() -> impl Responder { HttpResponse::Ok().body("This is a POST request.") } [actix_web::main]async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.route("/example", web::get().to(get_example))
.route("/example", web::post().to(post_example))
})
.bind("127.0.0.1:8080")?
.run()
.await
}
const app = new Koa(); const router = new Router(); router.get('/example', (ctx) => { ctx.body = 'This is a GET request.'; }); router.post('/example', (ctx) => { ctx.body = 'This is a POST request.'; }); app.use(router.routes()); app.use(router.allowedMethods()); app.listen(3000, () => {
console.log('Server is running on port 3000');
});
class ExampleView(View): def get(self, request): return HttpResponse("This is a GET request.")
urlpatterns = [
path('example/', ExampleView.as_view(), name='example'),
]
![feature(proc_macro_hygiene, decl_macro)][macro_use] extern crate rocket;use rocket::response::content; [get("/example")]fn get_example() -> content::Plain<&'static str> { content::Plain("This is a GET request.") } [post("/example")]fn post_example() -> content::Plain<&'static str> { content::Plain("This is a POST request.") } [launch]fn rocket() -> _ {
rocket::build().mount("/", routes![get_example, post_example])
}
pipeline :api do plug :accepts, ["json"] end scope "/api", ExampleAppWeb do pipe_through :api
end
end
app = Bottle() @app.route('/example', method='GET') def get_example(): return "This is a GET request." @app.route('/example', method='POST') def post_example(): return "This is a POST request." if name == 'main':
run(app, host='localhost', port=8080)
app = FastAPI() @app.get("/example") async def get_example(): return {"message": "This is a GET request."} @app.post("/example") async def post_example(): return {"message": "This is a POST request."} if name == "main": import uvicorn uvicorn.run(app, host="127.0.0.1", port=8000) ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499596941 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499596941 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYgiN | simonw 9599 | 2023-04-06T20:39:35Z | 2023-04-06T20:39:35Z | OWNER | I think there are two main approaches:
The decorator approach is calling out to me a bit now. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499530921 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499530921 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYQap | simonw 9599 | 2023-04-06T19:41:52Z | 2023-04-06T19:42:09Z | OWNER | Turned this into a TIL: https://til.simonwillison.net/gpt3/gpt4-api-design |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499467703 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499467703 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYA-3 | simonw 9599 | 2023-04-06T18:37:22Z | 2023-04-06T18:57:22Z | OWNER | I've been hoping to move entirely away from class-based views, but now I'm wondering if that's the right decision given the need to support HTTP verbs. It is cleaner to have a class that has methods for each verb, or to have a single function that can behave differently depending on the verb? Or should I have a mechanism for dispatching to separate functions based on the verbs that isn't implemented in a base class? The trouble with using base classes is that I've already shown that they tempt me to put logic in weird places, which makes code harder to modify later on. The thing here is that the ONLY thing I want to use the base class for is as an HTTP verb switcher - which makes me doubt that I should risk taking on the other temptations of having a base class. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499465648 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499465648 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZYAew | simonw 9599 | 2023-04-06T18:35:03Z | 2023-04-06T18:35:03Z | OWNER | There are actually five classes that subclass I don't think |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499462324 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499462324 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZX_q0 | simonw 9599 | 2023-04-06T18:31:56Z | 2023-04-06T18:31:56Z | OWNER | The It has a It uses this method a lot, which has to be over-ridden in the This method: Is the bulk of the complexity, because it knows how to both turn a list of SQLite rows into a CSV file but also knows how to call The Plus it catches interrupted queries and returns a special error page for those (and other error messages too): https://github.com/simonw/datasette/blob/8b9d7fdbd8de7e74414cc29e3005382669a812dc/datasette/views/base.py#L381-L408 It adds the time taken to execute the queries: https://github.com/simonw/datasette/blob/8b9d7fdbd8de7e74414cc29e3005382669a812dc/datasette/views/base.py#L410-L411 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499457291 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499457291 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZX-cL | simonw 9599 | 2023-04-06T18:26:45Z | 2023-04-06T18:26:45Z | OWNER | Here's It has methods for the Also adds CORS headers to anything if CORS mode is on: And adds the And has special code for setting the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499457201 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499457201 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZX-ax | simonw 9599 | 2023-04-06T18:26:39Z | 2023-04-06T18:26:39Z | OWNER | These classes - |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1499452122 | https://github.com/simonw/datasette/issues/2054#issuecomment-1499452122 | https://api.github.com/repos/simonw/datasette/issues/2054 | IC_kwDOBm6k_c5ZX9La | simonw 9599 | 2023-04-06T18:21:51Z | 2023-04-06T18:21:51Z | OWNER | I'm going to make notes against the code in the most recent alpha release, ignoring the recent work I did to refactor https://github.com/simonw/datasette/tree/1.0a2/datasette/views |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make detailed notes on how table, query and row views work right now 1657861026 | |
1498279469 | https://github.com/simonw/datasette/pull/2053#issuecomment-1498279469 | https://api.github.com/repos/simonw/datasette/issues/2053 | IC_kwDOBm6k_c5ZTe4t | simonw 9599 | 2023-04-05T23:28:53Z | 2023-04-05T23:28:53Z | OWNER | Table errors page currently does this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP new JSON for queries 1656432059 | |
1498275621 | https://github.com/simonw/datasette/issues/2049#issuecomment-1498275621 | https://api.github.com/repos/simonw/datasette/issues/2049 | IC_kwDOBm6k_c5ZTd8l | simonw 9599 | 2023-04-05T23:23:01Z | 2023-04-05T23:23:01Z | OWNER | The default representation here can be even smaller. For rows it's this:
http://localhost:8001/content/releases.json?_size=0&_extra=query
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Custom SQL queries should use new JSON ?_extra= format 1646734246 | |
1498167714 | https://github.com/dogsheep/github-to-sqlite/issues/79#issuecomment-1498167714 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/79 | IC_kwDODFdgUs5ZTDmi | simonw 9599 | 2023-04-05T21:12:55Z | 2023-04-05T21:12:55Z | MEMBER | It's a rate limiting problem: https://github.com/dogsheep/github-to-sqlite/actions/runs/4622674009/jobs/8175633155
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Deploy demo job is failing due to rate limit 1570375808 | |
1495780111 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1495780111 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5ZJ8sP | Thomascountz 19786848 | 2023-04-04T11:09:56Z | 2023-04-04T11:13:40Z | NONE | @wpears' workaround also worked for me, but also required me to manually set
```shell $ python --version Python 3.11.2 $ sqlite3 --version 3.41.2 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da $ sqlite-utils --version sqlite-utils, version 3.30 ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1493442956 | https://github.com/dogsheep/apple-notes-to-sqlite/issues/6#issuecomment-1493442956 | https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/6 | IC_kwDOJHON9s5ZBCGM | amlestin 14314871 | 2023-04-02T21:20:43Z | 2023-04-02T21:25:37Z | NONE | I'm experiencing something similar. My apostrophes (') turn into (’) and the output is truncated. Hoping to debug next weekend |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Character encoding problem 1617602868 | |
1493052396 | https://github.com/simonw/sqlite-utils/issues/265#issuecomment-1493052396 | https://api.github.com/repos/simonw/sqlite-utils/issues/265 | IC_kwDOCGYnMM5Y_ivs | dracos 154364 | 2023-04-01T17:27:18Z | 2023-04-01T17:27:18Z | NONE |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Using enable_fts before search term 907795562 | |
1493051222 | https://github.com/simonw/sqlite-utils/issues/159#issuecomment-1493051222 | https://api.github.com/repos/simonw/sqlite-utils/issues/159 | IC_kwDOCGYnMM5Y_idW | dracos 154364 | 2023-04-01T17:21:05Z | 2023-04-01T17:21:05Z | NONE | In a related issue, nearly a year later I just stumbled across this again, as I wondered why none of my rebuild-fts were rebuilding. It looks like: disable_fts in db.py commits; enable_fts partly commits except the last step (due to executescript committing a pending transaction); rebuild_fts won't commit unless manually done as above with e.g. a context manager. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.delete_where() does not auto-commit (unlike .insert() or .upsert()) 702386948 | |
1492777509 | https://github.com/simonw/sqlite-utils/issues/235#issuecomment-1492777509 | https://api.github.com/repos/simonw/sqlite-utils/issues/235 | IC_kwDOCGYnMM5Y-fol | hydrosquall 9020979 | 2023-04-01T01:31:48Z | 2023-04-01T01:31:48Z | NONE | My current workaround is to use this library from a python script instead of as a CLI tool. This lets me set the foreign key constraint at table creation time, instead of trying to modify an existing table. docs I found this stackoverflow helpful, as it explained that Sqlite doesn't support modifying existing tables directly. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract columns cannot create foreign key relation: sqlite3.OperationalError: table sqlite_master may not be modified 810618495 | |
1492387771 | https://github.com/simonw/datasette/issues/2050#issuecomment-1492387771 | https://api.github.com/repos/simonw/datasette/issues/2050 | IC_kwDOBm6k_c5Y9Ae7 | simonw 9599 | 2023-03-31T17:59:48Z | 2023-03-31T17:59:48Z | OWNER | Some of the extras from the table view make sense here. A few custom ones make sense too - including this already existing but undocumented one: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Row page JSON should use new ?_extra= format 1649791661 | |
1492206593 | https://github.com/simonw/datasette/issues/2035#issuecomment-1492206593 | https://api.github.com/repos/simonw/datasette/issues/2035 | IC_kwDOBm6k_c5Y8UQB | simonw 9599 | 2023-03-31T16:09:08Z | 2023-03-31T16:09:08Z | OWNER | I could ship this as part of: - #2049 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Potential feature: special support for `?a=1&a=2` on the query page 1615692818 | |
1491357104 | https://github.com/simonw/datasette/issues/1989#issuecomment-1491357104 | https://api.github.com/repos/simonw/datasette/issues/1989 | IC_kwDOBm6k_c5Y5E2w | xavdid 1231935 | 2023-03-31T06:17:23Z | 2023-03-31T06:18:05Z | NONE | I'm running into a similar use case as pax above- I made a
It works fine when I include |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Suggestion: Hiding columns 1531991339 | |
1489530555 | https://github.com/simonw/datasette/issues/2049#issuecomment-1489530555 | https://api.github.com/repos/simonw/datasette/issues/2049 | IC_kwDOBm6k_c5YyG67 | simonw 9599 | 2023-03-30T00:51:27Z | 2023-03-30T00:51:27Z | OWNER | I'd really like to refactor all of the extras functions into a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Custom SQL queries should use new JSON ?_extra= format 1646734246 | |
1489530037 | https://github.com/simonw/datasette/issues/2049#issuecomment-1489530037 | https://api.github.com/repos/simonw/datasette/issues/2049 | IC_kwDOBm6k_c5YyGy1 | simonw 9599 | 2023-03-30T00:50:30Z | 2023-03-30T00:50:30Z | OWNER | Two things to consider here: Most of the shapes make sense, with the exception of Looking at the (undocumented) list of extras from the table view, here are the ones I think make sense:
Just the YES ones:
The |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Custom SQL queries should use new JSON ?_extra= format 1646734246 | |
1489526501 | https://github.com/simonw/datasette/issues/2049#issuecomment-1489526501 | https://api.github.com/repos/simonw/datasette/issues/2049 | IC_kwDOBm6k_c5YyF7l | simonw 9599 | 2023-03-30T00:44:05Z | 2023-03-30T00:44:05Z | OWNER | As part of this I should be able to figure out which bits of the new code I wrote for the table view should actually be shared with the query view. That stuff is mostly going to be from this commit: https://github.com/simonw/datasette/commit/d97e82df3c8a3f2e97038d7080167be9bb74a68d Here's the existing QueryView class I need to replace: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Custom SQL queries should use new JSON ?_extra= format 1646734246 | |
1489306198 | https://github.com/simonw/datasette/pull/2034#issuecomment-1489306198 | https://api.github.com/repos/simonw/datasette/issues/2034 | IC_kwDOBm6k_c5YxQJW | wenhoujx 4370201 | 2023-03-29T20:56:19Z | 2023-03-29T20:56:19Z | NONE | @simonw any idea why the test coverage check fails? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
remove an unused `app` var in cli.py 1613974869 | |
1489110168 | https://github.com/dogsheep/hacker-news-to-sqlite/pull/6#issuecomment-1489110168 | https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/6 | IC_kwDODtX3eM5YwgSY | xavdid 1231935 | 2023-03-29T18:36:16Z | 2023-03-29T18:36:16Z | NONE | @simonw can you take a look when you have a chance? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add permalink virtual field to items table 1641117021 | |
1488010837 | https://github.com/simonw/datasette/issues/262#issuecomment-1488010837 | https://api.github.com/repos/simonw/datasette/issues/262 | IC_kwDOBm6k_c5YsT5V | simonw 9599 | 2023-03-29T06:22:21Z | 2023-03-29T06:22:21Z | OWNER | I need to get the arbitrary query page to return the same format. It likely won't have nearly as many extras. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add ?_extra= mechanism for requesting extra properties in JSON 323658641 | |
1384039611 | https://github.com/simonw/datasette/pull/1992#issuecomment-1384039611 | https://api.github.com/repos/simonw/datasette/issues/1992 | IC_kwDOBm6k_c5SfsS7 | codecov[bot] 22429695 | 2023-01-16T13:12:32Z | 2023-03-29T06:10:23Z | NONE | Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files```diff @@ Coverage Diff @@ ## main #1992 +/- ## ========================================== - Coverage 92.41% 92.11% -0.31% ========================================== Files 38 38 Lines 5750 5555 -195 ========================================== - Hits 5314 5117 -197 - Misses 436 438 +2 ``` [see 9 files with indirect coverage changes](https://codecov.io/gh/simonw/datasette/pull/1992/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 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=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):umbrella: View full report in Codecov by Sentry. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Bump blacken-docs from 1.12.1 to 1.13.0 1534904478 | |
1487999503 | https://github.com/simonw/datasette/pull/2014#issuecomment-1487999503 | https://api.github.com/repos/simonw/datasette/issues/2014 | IC_kwDOBm6k_c5YsRIP | dependabot[bot] 49699333 | 2023-03-29T06:09:11Z | 2023-03-29T06:09:11Z | CONTRIBUTOR | Superseded by #2047. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Bump black from 22.12.0 to 23.1.0 1566081801 | |
1487998788 | https://github.com/simonw/datasette/pull/2014#issuecomment-1487998788 | https://api.github.com/repos/simonw/datasette/issues/2014 | IC_kwDOBm6k_c5YsQ9E | simonw 9599 | 2023-03-29T06:08:23Z | 2023-03-29T06:08:23Z | OWNER | @dependabot recreate |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Bump black from 22.12.0 to 23.1.0 1566081801 | |
1486944644 | https://github.com/simonw/datasette/pull/2043#issuecomment-1486944644 | https://api.github.com/repos/simonw/datasette/issues/2043 | IC_kwDOBm6k_c5YoPmE | dependabot[bot] 49699333 | 2023-03-28T13:58:20Z | 2023-03-28T13:58:20Z | CONTRIBUTOR | Superseded by #2046. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Bump furo from 2022.12.7 to 2023.3.23 1639446870 | |
1484277416 | https://github.com/simonw/sqlite-utils/issues/388#issuecomment-1484277416 | https://api.github.com/repos/simonw/sqlite-utils/issues/388 | IC_kwDOCGYnMM5YeEao | simonw 9599 | 2023-03-26T23:43:12Z | 2023-03-26T23:43:12Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Link to stable docs from older versions 1114543475 | ||
1484276946 | https://github.com/simonw/datasette/issues/1608#issuecomment-1484276946 | https://api.github.com/repos/simonw/datasette/issues/1608 | IC_kwDOBm6k_c5YeETS | simonw 9599 | 2023-03-26T23:41:11Z | 2023-03-26T23:41:11Z | OWNER | It's working again now: https://docs.datasette.io/en/latest/sql_queries.html |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documentation should clarify /stable/ vs /latest/ 1109808154 | |
1484276302 | https://github.com/simonw/sqlite-utils/issues/388#issuecomment-1484276302 | https://api.github.com/repos/simonw/sqlite-utils/issues/388 | IC_kwDOCGYnMM5YeEJO | simonw 9599 | 2023-03-26T23:39:27Z | 2023-03-26T23:39:27Z | OWNER | Actually final Datasette fix was: ```html+jinja {% block scripts %} {{ super() }} <script> document.addEventListener("DOMContentLoaded", function() { // Show banner linking to /stable/ if this is a /latest/ page if (!/\/latest\//.test(location.pathname)) { return; } var stableUrl = location.pathname.replace("/latest/", "/stable/"); // Check it's not a 404 fetch(stableUrl, { method: "HEAD" }).then((response) => { if (response.status === 200) { var warning = document.createElement("div"); warning.className = "admonition warning"; warning.innerHTML = `Note This documentation covers the development version of Datasette. See this page for the current stable release. `; var mainArticle = document.querySelector("article[role=main]"); mainArticle.insertBefore(warning, mainArticle.firstChild); } }); }); </script>{% endblock %} ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Link to stable docs from older versions 1114543475 | |
1484274796 | https://github.com/simonw/datasette/issues/1608#issuecomment-1484274796 | https://api.github.com/repos/simonw/datasette/issues/1608 | IC_kwDOBm6k_c5YeDxs | simonw 9599 | 2023-03-26T23:38:18Z | 2023-03-26T23:38:18Z | OWNER | ChatGPT prompt:
Got back:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documentation should clarify /stable/ vs /latest/ 1109808154 | |
1484272313 | https://github.com/simonw/datasette/issues/1608#issuecomment-1484272313 | https://api.github.com/repos/simonw/datasette/issues/1608 | IC_kwDOBm6k_c5YeDK5 | simonw 9599 | 2023-03-26T23:36:17Z | 2023-03-26T23:36:17Z | OWNER | Still getting this error: Weird because |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documentation should clarify /stable/ vs /latest/ 1109808154 | |
1484269326 | https://github.com/simonw/sqlite-utils/issues/388#issuecomment-1484269326 | https://api.github.com/repos/simonw/sqlite-utils/issues/388 | IC_kwDOCGYnMM5YeCcO | simonw 9599 | 2023-03-26T23:24:12Z | 2023-03-26T23:28:14Z | OWNER | This broke on the upgrade to Furo. I fixed it in Datasette like this: https://github.com/simonw/datasette/commit/5c1cfa451d78e3935193f5e10eba59bf741241a1 and https://github.com/simonw/datasette/commit/db8cf899e286fbaa0a40f3a9ae8d5aaa1478822e |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Link to stable docs from older versions 1114543475 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user >30