home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

253 rows where comments = 3 and repo = 107914493 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: milestone, author_association, draft, created_at (date), updated_at (date), closed_at (date)

type 2

  • issue 206
  • pull 47

state 2

  • closed 209
  • open 44

repo 1

  • datasette · 253 ✖
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
1994861266 PR_kwDOBm6k_c5fhgOS 2209 Fix query for suggested facets with column named value rgieseke 198537 open 0     3 2023-11-15T14:13:30Z 2023-11-15T15:31:12Z   CONTRIBUTOR simonw/datasette/pulls/2209

See discussion in https://github.com/simonw/datasette/issues/2208


:books: Documentation preview :books:: https://datasette--2209.org.readthedocs.build/en/2209/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2209/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1978023780 I_kwDOBm6k_c515j9k 2205 request.post_vars() method obliterates form keys with multiple values simonw 9599 open 0   Datasette 1.0a-next 8755003 3 2023-11-05T23:25:08Z 2023-11-06T04:10:34Z   OWNER  

https://github.com/simonw/datasette/blob/452a587e236ef642cbc6ae345b58767ea8420cb5/datasette/utils/asgi.py#L137-L139

In GET requests you can do ?foo=1&foo=2 - you can do the same in POST requests, but the dict() call here eliminates those duplicates.

You can't even try calling post_body() and implement your own custom parsing because of: - #2204

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2205/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
410384988 MDU6SXNzdWU0MTAzODQ5ODg= 411 How to pass named parameter into spatialite MakePoint() function dazzag24 1055831 closed 0     3 2019-02-14T16:30:22Z 2023-10-25T13:23:04Z 2019-05-05T12:25:04Z NONE  

Hi, datasette version: "0.26.2" extensions: spatialite: "4.4.0-RC0" sqlite version: "3.22.0"

I have a table of airports with latitude and longitude columns. I've added spatialite (with KNN support). After creating the db using csvs-to-sqlit, I run these commands to setup the spatialite tables:

``` conn.execute('SELECT InitSpatialMetadata(1)')

conn.execute("SELECT AddGeometryColumn('airports', 'point_geom', 4326, 'POINT', 2);")

conn.execute('''UPDATE airports SET point_geom = GeomFromText('POINT('||"longitude"||' '||"latitude"||')',4326);''')

conn.execute("SELECT CreateSpatialIndex('airports', 'point_geom');") ```

I'm attempting to create a canned query and have this in my metadata.json file: "find_airports_nearest_to_point":{ "sql":"SELECT a.pos AS rank, b.id, b.name, b.country, b.latitude AS latitude, b.longitude AS longitude, a.distance / 1000.0 AS dist_km FROM KNN AS a JOIN airports AS b ON (b.rowid = a.fid) WHERE f_table_name = \"airports\" AND ref_geometry = MakePoint( :Long , :Lat ) AND max_items = 10;"} which doesn't seem to perform the templating of the name parameters correctly and I get no results.

Have also tired: MakePoint( || :Long || , || :Lat || ) which returns this error: near "||": syntax error

However I cannot seem to find the correct combination of named parameter syntax (:Lat) or sqlite concatenation operator to make it work. Any ideas if using named parameters inside functions is supported?

Thanks Darren

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/411/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1930008379 I_kwDOBm6k_c5zCZc7 2197 click-default-group-wheel dependency conflict ar-jan 1176293 closed 0     3 2023-10-06T11:49:20Z 2023-10-12T21:53:17Z 2023-10-12T21:53:17Z NONE  

I upgraded my dependencies, then ran into this problem running datasette inspect:

env/lib/python3.9/site-packages/datasette/cli.py", line 6, in <module> from click_default_group import DefaultGroup ModuleNotFoundError: No module named 'click_default_group'

Turns out the released version of datasette still depends on click-default-group-wheel, so click-default-group doesn't get installed/recognized:

$ virtualenv venv $ source venv/bin/activate $ pip install datasette $ pip list | grep click-default-group click-default-group 1.2.4 click-default-group-wheel 1.2.3 $ python -c "from click_default_group import DefaultGroup" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'click_default_group' $ pip install --force-reinstall click-default-group ... ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasette 0.64.4 requires click-default-group-wheel>=1.2.2, which is not installed. Successfully installed click-8.1.7 click-default-group-1.2.4

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2197/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1886812002 PR_kwDOBm6k_c5Z1N2L 2181 actors_from_ids plugin hook and datasette.actors_from_ids() method simonw 9599 closed 0     3 2023-09-08T01:51:07Z 2023-09-08T04:24:00Z 2023-09-08T04:23:59Z OWNER simonw/datasette/pulls/2181

Refs: - #2180

This plugin hook is feature complete - including documentation and tests.

I'm not going to land it in Datasette main until we've used it at least once though, which should happen promptly in development for Datasette Cloud.


:books: Documentation preview :books:: https://datasette--2181.org.readthedocs.build/en/2181/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2181/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1884330740 PR_kwDOBm6k_c5ZszDF 2174 Use $DATASETTE_INTERNAL in absence of --internal asg017 15178711 open 0     3 2023-09-06T16:07:15Z 2023-09-08T00:46:13Z   CONTRIBUTOR simonw/datasette/pulls/2174

refs 2157, specifically this comment

Passing in --internal my_internal.db over and over again can get repetitive.

This PR adds a new configurable env variable DATASETTE_INTERNAL_DB_PATH. If it's defined, then it takes place as the path to the internal database. Users can still overwrite this behavior by passing in their own --internal internal.db flag.

In draft mode for now, needs tests and documentation.

Side note: Maybe we can have a sections in the docs that lists all the "configuration environment variables" that Datasette respects? I did a quick grep and found:

  • DATASETTE_LOAD_PLUGINS
  • DATASETTE_SECRETS

:books: Documentation preview :books:: https://datasette--2174.org.readthedocs.build/en/2174/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2174/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1883055640 PR_kwDOBm6k_c5ZociX 2173 click-default-group>=1.2.3 simonw 9599 closed 0     3 2023-09-06T02:33:28Z 2023-09-06T02:50:10Z 2023-09-06T02:50:10Z OWNER simonw/datasette/pulls/2173

Now available as a wheel: - https://github.com/click-contrib/click-default-group/issues/21


:books: Documentation preview :books:: https://datasette--2173.org.readthedocs.build/en/2173/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2173/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1865869205 I_kwDOBm6k_c5vNueV 2157 Proposal: Make the `_internal` database persistent, customizable, and hidden asg017 15178711 open 0     3 2023-08-24T20:54:29Z 2023-08-31T02:45:56Z   CONTRIBUTOR  

The current _internal database is used by Datasette core to cache info about databases/tables/columns/foreign keys of databases in a Datasette instance. It's a temporary database created at startup, that can only be seen by the root user. See an example _internal DB here, after logging in as root.

The current _internal database has a few rough edges:

  • It's part of datasette.databases, so many plugins have to specifically exclude _internal from their queries examples here
  • It's only used by Datasette core and can't be used by plugins or 3rd parties
  • It's created from scratch at startup and stored in memory. Why is fine, the performance is great, but persistent storage would be nice.

Additionally, it would be really nice if plugins could use this _internal database to store their own configuration, secrets, and settings. For example:

  • datasette-auth-tokens creates a _datasette_auth_tokens table to store auth token metadata. This could be moved into the _internal database to avoid writing to the gues database
  • datasette-socrata creates a socrata_imports table, which also can be in _internal
  • datasette-upload-csvs creates a _csv_progress_ table, which can be in _internal
  • datasette-write-ui wants to have the ability for users to toggle whether a table appears editable, which can be either in datasette.yaml or on-the-fly by storing config in _internal

In general, these are specific features that Datasette plugins would have access to if there was a central internal database they could read/write to:

  • Dynamic configuration. Changing the datasette.yaml file works, but can be tedious to restart the server every time. Plugins can define their own configuration table in _internal, and could read/write to it to store configuration based on user actions (cell menu click, API access, etc.)
  • Caching. If a plugin or Datasette Core needs to cache some expensive computation, they can store it inside _internal (possibly as a temporary table) instead of managing their own caching solution.
  • Audit logs. If a plugin performs some sensitive operations, they can log usage info to _internal for others to audit later.
  • Long running process status. Many plugins (datasette-upload-csvs, datasette-litestream, datasette-socrata) perform tasks that run for a really long time, and want to give continue status updates to the user. They can store this info inside_internal
  • Safer authentication. Passwords and authentication plugins usually store credentials/hashed secrets in configuration files or environment variables, which can be difficult to handle. Now, they can store them in _internal

Proposal

  • We remove _internal from datasette.databases property.
  • We add new datasette.get_internal_db() method that returns the _internal database, for plugins to use
  • We add a new --internal internal.db flag. If provided, then the _internal DB will be sourced from that file, and further updates will be persisted to that file (instead of an in-memory database)
  • When creating internal.db, create a new _datasette_internal table to mark it a an "datasette internal database"
  • In datasette serve, we check for the existence of the _datasette_internal table. If it exists, we assume the user provided that file in error and raise an error. This is to limit the chance that someone accidentally publishes their internal database to the internet. We could optionally add a --unsafe-allow-internal flag (or database plugin) that allows someone to do this if they really want to.

New features unlocked with this

These features don't really need a standardized _internal table per-say (plugins could currently configure their own long-time storage features if they really wanted to), but it would make it much simpler to create these kinds of features with a persistent application database.

  • datasette-comments : A plugin for commenting on rows or specific values in a database. Comment contents + threads + email notification info can be stored in _internal
  • Bookmarks: "Bookmarking" an SQL query could be stored in _internal, or a URL link shortener
  • Webhooks: If a plugin wants to either consume a webhook or create a new one, they can store hashed credentials/API endpoints in _internal
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2157/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
787098146 MDU6SXNzdWU3ODcwOTgxNDY= 1190 `datasette publish upload` mechanism for uploading databases to an existing Datasette instance tomershvueli 1024355 closed 0     3 2021-01-15T18:18:42Z 2023-08-30T22:16:39Z 2023-08-30T22:16:38Z NONE  

If I have a self-hosted instance of Datasette up and running, I'd like to be able to the use the CLI to publish databases to that instance, not only Google or Heroku. Ideally there'd be a url parameter or something similar to which one could point the publish command to their instance.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1190/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1865174661 PR_kwDOBm6k_c5YsfZ7 2152 Bump the python-packages group with 3 updates dependabot[bot] 49699333 closed 0     3 2023-08-24T13:34:44Z 2023-08-28T13:49:39Z 2023-08-28T13:49:37Z CONTRIBUTOR simonw/datasette/pulls/2152

Bumps the python-packages group with 3 updates: sphinx, furo and blacken-docs.

Updates sphinx from 7.1.2 to 7.2.3

Release notes

Sourced from sphinx's releases.

Sphinx 7.2.3

Changelog: https://www.sphinx-doc.org/en/master/changes.html

Sphinx 7.2.2

Changelog: https://www.sphinx-doc.org/en/master/changes.html

Sphinx 7.2.1

Changelog: https://www.sphinx-doc.org/en/master/changes.html

Sphinx 7.2.0

Changelog: https://www.sphinx-doc.org/en/master/changes.html

Changelog

Sourced from sphinx's changelog.

Release 7.2.3 (released Aug 23, 2023)

Dependencies

  • #11576: Require sphinxcontrib-serializinghtml 1.1.9.

Bugs fixed

  • Fix regression in autodoc.Documenter.parse_name().
  • Fix regression in JSON serialisation.
  • #11543: autodoc: Support positional-only parameters in classmethod methods when autodoc_preserve_defaults is True.
  • Restore support string methods on path objects. This is deprecated and will be removed in Sphinx 8. Use :py:funcos.fspath to convert :py:class:<del>pathlib.Path objects to strings, or :py:class:</del>pathlib.Path's methods to work with path objects.

Release 7.2.2 (released Aug 17, 2023)

Bugs fixed

  • Fix the signature of the StateMachine.insert_input() patch, for when calling with keyword arguments.
  • Fixed membership testing (in) for the :py:class:str interface of the asset classes (_CascadingStyleSheet and _JavaScript), which several extensions relied upon.
  • Fixed a type error in SingleFileHTMLBuilder._get_local_toctree, includehidden may be passed as a string or a boolean.
  • Fix :noindex: for PyModule and JSModule``.

Release 7.2.1 (released Aug 17, 2023)

Bugs fixed

  • Restored the the :py:class:str interface of the asset classes (_CascadingStyleSheet and _JavaScript), which several extensions relied upon. This will be removed in Sphinx 9.
  • Restored calls to Builder.add_{css,js}_file(), which several extensions relied upon.
  • Restored the private API TocTree.get_toctree_ancestors(), which several extensions relied upon.

Release 7.2.0 (released Aug 17, 2023)

... (truncated)

Commits
  • 2f6ea14 Bump to 7.2.3 final
  • 511e407 Implement bool() for string paths
  • 494de73 Implement hash() for string paths
  • 2986aa1 Override special methods for string paths
  • 07b87e9 Update CHANGES for 7.2.3
  • 6b17dd1 Support string methods on path objects (#11619)
  • a73fb59 Support positional-only parameters in classmethods (#11635)
  • 02cb02c Fix invocation of python -m sphinx build
  • 6183b6a Require sphinxcontrib-serializinghtml 1.1.9 or later
  • 1e16f21 Fix regression in autodoc.Documenter.parse_name (#11613)
  • Additional commits viewable in compare view


Updates furo from 2023.7.26 to 2023.8.19

Changelog

Sourced from furo's changelog.

Changelog

2023.08.19 -- Xenolithic Xanadu

  • Fix missing search context with Sphinx 7.2, for dirhtml builds.
  • Drop support for Python 3.7.
  • Present configuration errors in a better format -- thanks @​AA-Turner!
  • Bump require_sphinx() to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.

2023.08.17 -- Wonderous White

  • Fix compatiblity with Sphinx 7.2.0 and 7.2.1.

2023.07.26 -- Vigilant Volt

  • Fix compatiblity with Sphinx 7.1.
  • Improve how content overflow is handled.
  • Improve how literal blocks containing inline code are handled.

2023.05.20 -- Unassuming Ultramarine

  • ✨ Add support for Sphinx 7.
  • Drop support for Sphinx 5.
  • Improve the screen-reader label for sidebar collapse.
  • Make it easier to create derived themes from Furo.
  • Bump all JS dependencies (NodeJS and npm packages).

2023.03.27 -- Tasty Tangerine

  • Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.
  • Add missing class to Font Awesome examples

2023.03.23 -- Sassy Saffron

  • Update Python version classifiers.
  • Increase the icon size in mobile header.
  • Increase admonition title bg opacity.
  • Change the default API background to transparent.
  • Transition the API background change.

... (truncated)

Commits
  • 0766bb2 Prepare release: 2023.08.19
  • 807d73c Update changelog
  • 364b261 Accomodate for the required data-content_root for search
  • 0d38bc6 Simplify retrieval of pygments_dark_style value (#699)
  • 3631ffc Use sphinx.errors.ConfigError (#697)
  • d2e2448 Remove duplicate HTML builder check (#698)
  • 7b4f130 Drop Python 3.7 (#701)
  • e322b71 Remove pointless assert (#702)
  • ee2097a Bump require_sphinx() to Sphinx 6.0 (#700)
  • c1ff10b Back to development
  • Additional commits viewable in compare view


Updates blacken-docs from 1.15.0 to 1.16.0

Changelog

Sourced from blacken-docs's changelog.

1.16.0 (2023-08-16)

  • Allow Markdown fence options.

    Thanks to initial work from Matthew Anderson in PR [#246](https://github.com/asottile/blacken-docs/issues/246) <https://github.com/adamchainz/blacken-docs/pull/246>__.

  • Expand Markdown detection to all Python language names from Pygments: py, sage, python3, py3, and numpy.

  • Preserve leading whitespace lines in reStructuredText code blocks.

    Thanks to Julianus Pfeuffer for the report in Issue [#217](https://github.com/asottile/blacken-docs/issues/217) <https://github.com/adamchainz/blacken-docs/issues/217>__.

  • Use exit code 2 to indicate errors from Black, whilst exit code 1 remains for “files have been formatted”.

    Thanks to Julianus Pfeuffer for the report in Issue [#218](https://github.com/asottile/blacken-docs/issues/218) <https://github.com/adamchainz/blacken-docs/issues/218>__.

  • Support passing the --preview option through to Black, to select the future style.

  • Remove language_version from .pre-commit-hooks.yaml. This change allows default_language_version in ``.pre-commit-config.yaml` to take precedence.

    Thanks to Aneesh Agrawal in PR [#258](https://github.com/asottile/blacken-docs/issues/258) <https://github.com/adamchainz/blacken-docs/pull/258>__.

Commits
  • 960ead2 Version 1.16.0
  • 8f0ed18 Support passing --preview through to Black (#273)
  • 4eb4e4c Tweak changelog note
  • 6c7450c Use exit code 2 to indicate errors (#272)
  • 99dfc8d Preserve leading whitespace lines in rST (#271)
  • 94465e8 Reformat markdown tests with dedent() (#270)
  • 7cd5f30 Use .md in glob example
  • f97e569 Document applying to many files (#269)
  • ae612b0 Expand Markdown detection to all Python language names (#268)
  • da9b455 Replace NamedTuple with plain class (#267)
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions

:books: Documentation preview :books:: https://datasette--2152.org.readthedocs.build/en/2152/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2152/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1781022369 I_kwDOBm6k_c5qKD6h 2091 Drop support for Python 3.7 simonw 9599 closed 0     3 2023-06-29T15:06:38Z 2023-08-23T18:18:18Z 2023-08-23T18:18:18Z OWNER  

It's EOL now, as of 2023-06-27 (two days ago): https://devguide.python.org/versions/

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2091/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
324720095 MDU6SXNzdWUzMjQ3MjAwOTU= 275 "config" section in metadata.json (root, database and table level) simonw 9599 closed 0     3 2018-05-20T16:02:28Z 2023-08-23T01:28:37Z 2023-08-23T01:28:37Z OWNER  

Split off from #274

Metadata should an optional "config" section at root, table or database level.

The TableView and RowView and DatabaseView and BaseView classes could all have a .config("key") method which knows how to resolve the hierarchy of configs.

This will allow individual tables (or databases) to set their own config settings for things like sql_time_limit_ms

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/275/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1838266862 I_kwDOBm6k_c5tkbnu 2126 Permissions in metadata.yml / metadata.json ctsrc 36199671 closed 0     3 2023-08-06T16:24:10Z 2023-08-11T05:52:30Z 2023-08-11T05:52:29Z NONE  

https://docs.datasette.io/en/latest/authentication.html#other-permissions-in-metadata says the following:

For all other permissions, you can use one or more "permissions" blocks in your metadata.

To grant access to the permissions debug tool to all signed in users you can grant permissions-debug to any actor with an id matching the wildcard * by adding this a the root of your metadata:

yaml permissions: debug-menu: id: '*'

I tried this.

My metadata.yml file looks like:

yaml permissions: debug-menu: id: '*' permissions-debug: id: '*' plugins: datasette-auth-passwords: myuser_password_hash: $env: "PASSWORD_HASH_MYUSER"

And then I run

zsh datasette -m metadata.yml tiddlywiki.db --root

And I open a session for the "root" user of datasette with the link given.

I open a private browser session and log in as "myuser" from http://127.0.0.1:8001/-/login

Then I check http://127.0.0.1:8001/-/actor which confirms that I am logged in as the "myuser" actor

json { "actor": { "id": "myuser" } }

In the session where I am logged in as "myuser" I then try to go to http://127.0.0.1:8001/-/permissions

But all I get there as the logged in user "myuser" is

Forbidden

Permission denied

And then if I check the http://127.0.0.1:8001/-/permissions as the datasette "root" user from another browser session, I see:

permissions-debug checked at 2023-08-06T16:22:58.997841 ✗ (used default)

Actor: {"id": "myuser"}

It seems that in spite of having tried to give the permissions-debug permission to the "myuser" user in my metadata.yml file, datasette does not agree that "myuser" has permission permissions-debug..

What do I need to do differently so that my "myuser" user is able to access http://127.0.0.1:8001/-/permissions ?

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2126/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1823393475 I_kwDOBm6k_c5srsbD 2119 database color shows only on index page, not other pages simonw 9599 closed 0   Datasette 1.0 3268330 3 2023-07-27T00:19:39Z 2023-08-11T05:25:45Z 2023-08-11T05:16:24Z OWNER  

I think this has been a bug for a long time.

https://latest.datasette.io/ currently shows:

Those colors are based on a hash of the database name. But when you click through to https://latest.datasette.io/fixtures

It's red on all sub-pages too.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2119/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1838469176 I_kwDOBm6k_c5tlNA4 2127 Context base class to support documenting the context simonw 9599 open 0   Datasette 1.0 3268330 3 2023-08-07T00:01:02Z 2023-08-10T01:30:25Z   OWNER  

This idea first came up here: - https://github.com/simonw/datasette/issues/2112#issuecomment-1652751140

If datasette.render_template(...) takes an optional Context subclass as an alternative to a context dictionary, I could then use dataclasses to define the context made available to specific templates - which then gives me something I can use to help document what they are.

Also refs: - https://github.com/simonw/datasette/issues/1510

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2127/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1843600087 I_kwDOBm6k_c5t4xrX 2135 Release notes for 1.0a3 simonw 9599 closed 0   Datasette 1.0a3 9700784 3 2023-08-09T16:09:26Z 2023-08-09T19:17:07Z 2023-08-09T19:17:06Z OWNER  

118 commits! https://github.com/simonw/datasette/compare/1.0a2...26be9f0445b753fb84c802c356b0791a72269f25

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2135/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1822939274 I_kwDOBm6k_c5sp9iK 2113 Implement and document extras for the new query view page simonw 9599 open 0   Datasette 1.0a-next 8755003 3 2023-07-26T18:24:01Z 2023-08-09T17:35:22Z   OWNER  
  • 2109

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2113/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1822940263 I_kwDOBm6k_c5sp9xn 2114 Implement canned queries against new query JSON work simonw 9599 closed 0   Datasette 1.0a3 9700784 3 2023-07-26T18:24:50Z 2023-08-09T15:26:58Z 2023-08-09T15:26:57Z OWNER  
  • 2109

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2114/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1719759468 PR_kwDOBm6k_c5RBXH_ 2077 Bump furo from 2023.3.27 to 2023.5.20 dependabot[bot] 49699333 closed 0     3 2023-05-22T13:58:16Z 2023-07-27T13:40:55Z 2023-07-27T13:40:53Z CONTRIBUTOR simonw/datasette/pulls/2077

Bumps furo from 2023.3.27 to 2023.5.20.

Changelog

Sourced from furo's changelog.

Changelog

2023.05.20 -- Unassuming Ultramarine

  • ✨ Add support for Sphinx 7.
  • Drop support for Sphinx 5.
  • Improve the screen-reader label for sidebar collapse.
  • Make it easier to create derived themes from Furo.
  • Bump all JS dependencies (NodeJS and npm packages).

2023.03.27 -- Tasty Tangerine

  • Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.
  • Add missing class to Font Awesome examples

2023.03.23 -- Sassy Saffron

  • Update Python version classifiers.
  • Increase the icon size in mobile header.
  • Increase admonition title bg opacity.
  • Change the default API background to transparent.
  • Transition the API background change.
  • Remove the "indent" of API entries which have a background.
  • Break long inline code literals.

2022.12.07 -- Reverent Raspberry

  • ✨ Add support for Sphinx 6.
  • ✨ Improve footnote presentation with docutils 0.18+.
  • Drop support for Sphinx 4.
  • Improve documentation about what the edit button does.
  • Improve handling of empty-flexboxes for better print experience on Chrome.
  • Improve styling for inline signatures.
  • Replace the meta generator tag with a comment.
  • Tweak labels with icons to prevent users selecting icons as text on touch.

2022.09.29 -- Quaint Quartz

  • Add ability to set arbitrary URLs for edit button.

... (truncated)

Commits
  • d2c9ca8 Prepare release: 2023.05.20
  • 662d21b Update changelog
  • 591780b Bump compatible Sphinx version
  • c2e7837 Bump NodeJS and package versions
  • dd85574 Use the reference HtmlFormatter class defined on PygmentsBridge. (#657)
  • 6bff419 Fix broken link (#654)
  • e7f732e Improve the screen-reader label for sidebar collapse
  • 48c0bf2 Drop the check for the theme name
  • 1b17d81 [pre-commit.ci] pre-commit autoupdate (#646)
  • 4904fd5 Remove Python 3.8 constraint from Black pre-commit config (#647)
  • Additional commits viewable in compare view


You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

:books: Documentation preview :books:: https://datasette--2077.org.readthedocs.build/en/2077/

Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2077/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1822949756 I_kwDOBm6k_c5sqAF8 2116 Turn DatabaseDownload into an async view function simonw 9599 closed 0   Datasette 1.0a3 9700784 3 2023-07-26T18:31:59Z 2023-07-26T18:44:00Z 2023-07-26T18:44:00Z OWNER  

A minor refactor, but it is a good starting point for this new branch. Refs: - #2109

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2116/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1816857442 I_kwDOBm6k_c5sSwti 2106 `datasette install -e` option simonw 9599 closed 0     3 2023-07-22T18:33:42Z 2023-07-26T18:28:33Z 2023-07-22T18:42:54Z OWNER  

As seen in LLM and now in sqlite-utils too: - https://github.com/simonw/sqlite-utils/issues/570

Useful for developing plugins, see tutorial at https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2106/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1811824307 I_kwDOBm6k_c5r_j6z 2105 When reverse proxying datasette with nginx an URL element gets erronously added aki-k 2235371 open 0     3 2023-07-19T12:16:53Z 2023-07-21T21:17:09Z   NONE  

I use this nginx config: ``` location /datasette-llm { return 302 /datasette-llm/; }

location /datasette-llm/ {
  proxy_set_header Upgrade           $http_upgrade;
  proxy_set_header Connection        "Upgrade";
  proxy_http_version 1.1;
  proxy_set_header X-Real-IP         $remote_addr;
  proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Proto https;
  proxy_set_header X-Forwarded-Host  $http_host;
  proxy_set_header Host              $host;
  proxy_max_temp_file_size           0;
  proxy_pass                         http://127.0.0.1:8001/datasette-llm/;
  proxy_redirect                     http:// https://;
  proxy_buffering off;
  proxy_request_buffering off;
  proxy_set_header Origin            '';
  client_max_body_size 0;
  auth_basic                         "datasette-llm";
  auth_basic_user_file               /etc/nginx/custom-userdb;
}

Then I start datasette with this command: datasette serve --setting base_url /datasette-llm/ $(llm logs path) ``` Everything else works right, except the links in "This data as json, CSV". They get an extra URL element "datasette-llm" like this:

https://192.168.1.3:5432/datasette-llm/datasette-llm/logs.json?sql=select+*+from+_llm_migrations

https://192.168.1.3:5432/datasette-llm/datasette-llm/logs.csv?sql=select+*+from+_llm_migrations&_size=max

When I remove that extra "datasette-llm" from the URL, those links work too.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2105/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1054244712 I_kwDOBm6k_c4-1n9o 1510 Datasette 1.0 documented template context (maybe via API docs) simonw 9599 open 0   Datasette 1.0 3268330 3 2021-11-15T23:23:58Z 2023-06-28T02:05:21Z   OWNER  

Documented context plus protective unit tests. Goal is that custom templates built for 1.x will not break without a 2.x release.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1510/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1726603778 PR_kwDOBm6k_c5RYvTU 2080 New View base class simonw 9599 closed 0     3 2023-05-25T23:22:55Z 2023-05-26T00:18:45Z 2023-05-26T00:18:44Z OWNER simonw/datasette/pulls/2080

Refs:

  • 2078

TODO:

  • [x] Teach router layer how to handle this
  • [x] Use it for something

:books: Documentation preview :books:: https://datasette--2080.org.readthedocs.build/en/2080/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2080/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1531991339 I_kwDOBm6k_c5bUFUr 1989 Suggestion: Hiding columns pax 116795 open 0     3 2023-01-13T09:33:32Z 2023-03-31T06:18:05Z   NONE  

As there's the possibility of hiding tables - I've run into the need of hiding specific columns - data that's either not relevant for public or can't be shown due to privacy reasons.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1989/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1615891776 I_kwDOBm6k_c5gUI1A 2037 Test failure: FAILED tests/test_cli.py::test_install_requirements - FileNotFoundError simonw 9599 closed 0     3 2023-03-08T20:30:06Z 2023-03-09T22:33:39Z 2023-03-09T22:33:39Z OWNER  

FAILED tests/test_cli.py::test_install_requirements - FileNotFoundError: [Errno 2] No such file or directory

From https://github.com/simonw/datasette/actions/runs/4348548218/jobs/7597208191

``` =================================== FAILURES =================================== ____ test_install_requirements _______

run_module = <MagicMock name='run_module' id='139768358191936'>

@mock.patch("datasette.cli.run_module")
def test_install_requirements(run_module):
    runner = CliRunner()
  with runner.isolated_filesystem():

/home/runner/work/datasette/datasette/tests/test_cli.py:184:


/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/contextlib.py:119: in enter return next(self.gen)


self = <click.testing.CliRunner object at 0x7f1e5bfb9490>, temp_dir = None

@contextlib.contextmanager
def isolated_filesystem(
    self, temp_dir: t.Optional[t.Union[str, os.PathLike]] = None
) -> t.Iterator[str]:
    """A context manager that creates a temporary directory and
    changes the current working directory to it. This isolates tests
    that affect the contents of the CWD to prevent them from
    interfering with each other.

    :param temp_dir: Create the temporary directory under this
        directory. If given, the created directory is not removed
        when exiting.

    .. versionchanged:: 8.0
        Added the ``temp_dir`` parameter.
    """
  cwd = os.getcwd()

E FileNotFoundError: [Errno 2] No such file or directory

/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/click/testing.py:466: FileNotFoundError ``` Not sure why it only affected the "Calculate test coverage" one.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2037/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1555701851 PR_kwDOBm6k_c5IdsD7 2003 Show referring tables and rows when the referring foreign key is compound fgregg 536941 open 0     3 2023-01-24T21:31:31Z 2023-01-25T18:44:42Z   CONTRIBUTOR simonw/datasette/pulls/2003

sqlite foreign keys can be compound, but that is not as well supported by datasette as single column foreign keys.

in particular,

  1. in a table view, there is not a link from the row to the referenced row if the foreign key is compound
  2. in a row view, there is no listing of tables and rows that refer to the focal row if those referencing foreign keys are compound.

Both of these issues are discussed in #1099.

This PR only fixes the second one, because it's not clear what the right UX is for the first issue.

Some things that might not be desirable about this approach.

  1. it changes the external API, by changing column => columns and other_column => other_columns (see inline comment for more discussion.
  2. There are various places where the plural foreign keys have to be checked for length and discarded or transformed to singular.
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/2003/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1515185383 I_kwDOBm6k_c5aT-Tn 1971 Upgrade for Sphinx 6.0 (once Furo has support for it) simonw 9599 closed 0     3 2022-12-31T19:04:35Z 2023-01-10T02:02:34Z 2023-01-10T02:02:34Z OWNER  

A deployment of #1967 to ReadTheDocs just failed like this: https://readthedocs.org/projects/datasette/builds/19045460/

``` Running Sphinx v6.0.0 making output directory... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 28 source files that are out of date updating environment: [new config] 28 added, 0 changed, 0 removed reading sources... [ 3%] authentication reading sources... [ 7%] binary_data reading sources... [ 10%] changelog

Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 299, in next_line self.line = self.input_lines[self.line_offset] File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 1136, in getitem return self.data[i] IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 226, in run self.next_line() File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 302, in next_line raise EOFError EOFError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/cmd/build.py", line 281, in build_main app.build(args.force_all, args.filenames) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/application.py", line 344, in build self.builder.build_update() File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/builders/init.py", line 310, in build_update self.build(to_build, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/builders/init.py", line 326, in build updated_docnames = set(self.read()) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/builders/init.py", line 433, in read self._read_serial(docnames) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/builders/init.py", line 454, in _read_serial self.read_doc(docname) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/builders/init.py", line 510, in read_doc publisher.publish() File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/core.py", line 224, in publish self.document = self.reader.read(self.source, self.parser, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/io.py", line 103, in read self.parse() File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/readers/init.py", line 76, in parse self.parser.parse(self.input, document) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/parsers.py", line 78, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 169, in run results = StateMachineWS.run(self, input_lines, input_offset, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 233, in run context, next_state, result = self.check_line( File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 445, in check_line return method(match, context, next_state) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 3024, in text self.section(title.lstrip(), source, style, lineno + 1, messages) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 325, in section self.new_subsection(title, lineno, messages) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection newabsoffset = self.nested_parse( File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse state_machine.run(block, input_offset, memo=self.memo, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 233, in run context, next_state, result = self.check_line( File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 445, in check_line return method(match, context, next_state) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2785, in underline self.section(title, source, style, lineno - 1, messages) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 325, in section self.new_subsection(title, lineno, messages) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection newabsoffset = self.nested_parse( File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse state_machine.run(block, input_offset, memo=self.memo, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 233, in run context, next_state, result = self.check_line( File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 445, in check_line return method(match, context, next_state) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 1273, in bullet i, blank_finish = self.list_item(match.end()) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 1295, in list_item self.nested_parse(indented, input_offset=line_offset, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse state_machine.run(block, input_offset, memo=self.memo, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/statemachine.py", line 239, in run result = state.eof(context) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2725, in eof self.blank(None, context, None) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2716, in blank paragraph, literalnext = self.paragraph( File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 416, in paragraph textnodes, messages = self.inline_text(text, lineno) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 425, in inline_text nodes, messages = self.inliner.parse(text, lineno, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 649, in parse before, inlines, remaining, sysmessages = method(self, match, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 792, in interpreted_or_phrase_ref nodelist, messages = self.interpreted(rawsource, escaped, role, File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 889, in interpreted nodes, messages2 = role_fn(role, rawsource, text, lineno, self) File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/ext/extlinks.py", line 101, in role title = caption % part TypeError: not all arguments converted during string formatting

Exception occurred: File "/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/latest/lib/python3.9/site-packages/sphinx/ext/extlinks.py", line 101, in role title = caption % part TypeError: not all arguments converted during string formatting The full traceback has been saved in /tmp/sphinx-err-kq7ylgqo.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks! ```

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1971/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1525815985 I_kwDOBm6k_c5a8hqx 1983 Make CustomJSONEncoder a documented public API simonw 9599 open 0     3 2023-01-09T15:27:05Z 2023-01-09T15:35:58Z   OWNER  

It's used by datasette-geojson here: https://github.com/eyeseast/datasette-geojson/commit/902bf135a5a33a0dc8264673d00a59a67cb05152

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1983/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
710650633 MDU6SXNzdWU3MTA2NTA2MzM= 979 Default table view JSON should include CREATE TABLE simonw 9599 closed 0     3 2020-09-28T23:54:58Z 2023-01-09T15:32:39Z 2023-01-09T15:32:22Z OWNER  

https://latest.datasette.io/fixtures/facetable.json doesn't currently include the CREATE TABLE statement for the page, even though it's available on the HTML version at https://latest.datasette.io/fixtures/facetable

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/979/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1082584499 I_kwDOBm6k_c5Ahu2z 1558 Redesign `facet_results` JSON structure prior to Datasette 1.0 simonw 9599 open 0   Datasette 1.0 3268330 3 2021-12-16T19:45:10Z 2023-01-09T15:31:17Z   OWNER  

Decision: as an initial fix I'm going to de-duplicate those keys by using tags__array etc - with a _2 on the end if that key is already used.

I'll open a separate issue to redesign this better for Datasette 1.0.

Originally posted by @simonw in https://github.com/simonw/datasette/issues/625#issuecomment-996130862

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1558/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1485488236 PR_kwDOBm6k_c5E1iJG 1938 "permissions" blocks in metadata.json/yaml simonw 9599 closed 0   Datasette 1.0a2 8711695 3 2022-12-08T22:07:36Z 2022-12-13T05:23:18Z 2022-12-13T05:23:18Z OWNER simonw/datasette/pulls/1938

Refs #1636

  • [x] Documentation
  • [ ] Implementation
  • [ ] Validate metadata to check there are no nonsensical permissions (like debug-menu set at the table level)
  • [ ] Tests

:books: Documentation preview :books:: https://datasette--1938.org.readthedocs.build/en/1938/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1938/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1175690070 I_kwDOBm6k_c5GE5tW 1676 Reconsider ensure_permissions() logic, can it be less confusing? simonw 9599 open 0   Datasette 1.0 3268330 3 2022-03-21T17:14:57Z 2022-12-02T01:23:40Z   OWNER  

Updated documentation: https://github.com/simonw/datasette/blob/e627510b760198ccedba9e5af47a771e847785c9/docs/internals.rst#await-ensure_permissionsactor-permissions

This method allows multiple permissions to be checked at onced. It raises a datasette.Forbidden exception if any of the checks are denied before one of them is explicitly granted.

This is useful when you need to check multiple permissions at once. For example, an actor should be able to view a table if either one of the following checks returns True or not a single one of them returns False:

That's pretty hard to understand! I'm going to open a separate issue to reconsider if this is a useful enough abstraction given how confusing it is.

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1675#issuecomment-1074177827

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1676/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1214859703 I_kwDOBm6k_c5IaUm3 1719 Refactor `RowView` and remove `RowTableShared` simonw 9599 closed 0     3 2022-04-25T18:06:24Z 2022-12-01T21:15:19Z 2022-04-25T18:33:44Z OWNER  

The RowTableShared class is making this a whole lot more complicated.

I'm going to split the RowView view out into an entirely separate views/row.py module.

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1715#issuecomment-1108875068

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1719/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1470320227 I_kwDOBm6k_c5Xo05j 1923 latest.datasette.io Cloud Run deploys failing simonw 9599 closed 0     3 2022-11-30T22:49:34Z 2022-11-30T23:04:56Z 2022-11-30T23:04:56Z OWNER  

https://github.com/simonw/datasette/actions/runs/3587402085/jobs/6038106719v

Warning: "service_account_key" has been deprecated. Please switch to using google-github-actions/auth which supports both Workload Identity Federation and Service Account Key JSON authentication. For more details, see https://github.com/google-github-actions/setup-gcloud#authorization Error: google-github-actions/setup-gcloud failed with: failed to execute command `gcloud --quiet auth activate-service-account *** --key-file -`: /opt/hostedtoolcache/gcloud/275.0.0/x64/lib/googlecloudsdk/core/console/console_io.py:544: SyntaxWarning: "is" with a literal. Did you mean "=="? if answer is None or (answer is '' and default is not None): ERROR: gcloud failed to load: module 'collections' has no attribute 'MutableMapping'

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1923/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1450312343 I_kwDOBm6k_c5WcgKX 1892 Merge 1.0-dev branch back to main simonw 9599 closed 0   Datasette 1.0a0 8658075 3 2022-11-15T20:04:25Z 2022-11-29T19:40:23Z 2022-11-29T19:40:23Z OWNER  

I'm committed enough to the 1.0 work now that I'm ready for the main branch to reflect that instead.

If I need to make any dot-releases against 0.63 I can do those from a branch.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1892/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1423369494 I_kwDOBm6k_c5U1uUW 1859 datasette create-token CLI command simonw 9599 closed 0   Datasette 1.0a0 8658075 3 2022-10-26T03:12:59Z 2022-11-15T19:59:00Z 2022-10-26T04:31:39Z OWNER  

The CLI equivalent of the /-/create-token page.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1859/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1423336122 I_kwDOBm6k_c5U1mK6 1856 allow_signed_tokens setting for disabling API signed token mechanism simonw 9599 closed 0   Datasette 1.0a0 8658075 3 2022-10-26T02:20:55Z 2022-11-15T19:57:05Z 2022-10-26T02:58:35Z OWNER  

Had some design thoughts here: https://github.com/simonw/datasette/issues/1852#issuecomment-1291272280

I liked this option the most:

--setting allow_create_tokens off
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1856/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1428560020 I_kwDOBm6k_c5VJhiU 1872 SITE-BUSTING ERROR: "render_template() called before await ds.invoke_startup()" mroswell 192568 closed 0     3 2022-10-30T02:28:39Z 2022-10-30T06:26:01Z 2022-10-30T06:26:01Z CONTRIBUTOR  
  1. My https://list.saferdisinfectants.org/disinfectants/listN page (linked from https://SaferDisinfectants.org ) has been running beautifully for a year and a half, including a GitHub Actions workflow that's been routinely updating the database.

  2. I received a recent report that the list page is down. I don't know when it went down, but the content is replaced with: "render_template() called before await ds.invoke_startup()"

  3. The local datasette repo runs without incident.

  4. The site is hosted on vercel, linked to my github repo. Perhaps some vercel changes were made, but not by anyone on our side. Here is a screenshot of the current project settings:

Here a screenshot of the latest deployment status:

This is my repository: https://github.com/mroswell/list-N (I notice: datasette==0.59 in my requirements.txt file)

Because it's been long while since I actively worked on this or any other datasette project, I forget a lot of what I knew at one point. Perhaps some configuration file could be missing? Or perhaps I just need to know the right incantation to add to that vercel settings page.

Help is welcome as the nonprofit org is soon hosting its annual conference, and we'd love to have the page working again.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1872/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1426253476 I_kwDOBm6k_c5VAuak 1869 Release 0.63 simonw 9599 closed 0     3 2022-10-27T20:53:01Z 2022-10-27T22:24:38Z 2022-10-27T22:11:33Z OWNER  

Most of the release notes are already written: - https://github.com/simonw/datasette/releases/tag/0.63a0 - https://github.com/simonw/datasette/releases/tag/0.63a1

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1869/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1400121355 PR_kwDOBm6k_c5AVujU 1835 use inspect data for hash and file size fgregg 536941 closed 0     3 2022-10-06T18:25:24Z 2022-10-27T20:51:30Z 2022-10-06T20:06:07Z CONTRIBUTOR simonw/datasette/pulls/1835

inspect_data should already include the hash and the db file size, so this PR takes advantage of using those instead of always recalculating. should help a lot on startup with large DBs.

closes #1834

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1835/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1422973111 I_kwDOBm6k_c5U0Ni3 1854 Flaky test: test_serve_localhost_http simonw 9599 closed 0     3 2022-10-25T19:37:35Z 2022-10-25T19:53:02Z 2022-10-25T19:53:02Z OWNER  

Failing on Python 3.10 at the moment: https://github.com/simonw/datasette/actions/runs/3323629947/jobs/5494340302

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1854/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1420090659 I_kwDOBm6k_c5UpN0j 1848 Private database page should show padlock on every table simonw 9599 closed 0     3 2022-10-24T02:28:38Z 2022-10-24T02:50:29Z 2022-10-24T02:42:34Z OWNER  

Following: - #1829

https://latest.datasette.io/_internal looks like this:

But those queries and tables are private too, and should also show the padlock icon.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1848/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1408561039 PR_kwDOBm6k_c5Axrpb 1842 check_visibility can now take multiple permissions into account simonw 9599 closed 0     3 2022-10-14T00:06:04Z 2022-10-24T02:11:36Z 2022-10-24T02:11:36Z OWNER simonw/datasette/pulls/1842

Refs #1829

  • [x] Fix table page
  • [x] Fix database page
  • [x] Fix query page
  • [x] Fix row page
  • [x] Tests
  • [x] Updated documentation for check_visibility method, to cover the new permissions= keyword argument

Also this fix is currently only applied on the table page - needs to be applied on database, row and query pages too.


:books: Documentation preview :books:: https://datasette--1842.org.readthedocs.build/en/1842/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1842/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1410305897 I_kwDOBm6k_c5UD49p 1845 Reconsider the Datasette first-run experience simonw 9599 open 0     3 2022-10-15T22:21:31Z 2022-10-16T08:54:53Z   OWNER  

Had a really interesting conversation today about how hard it is to get from "I installed Datasette" to "I've done something useful with it": https://news.ycombinator.com/item?id=33216789#33218590

Spending some time focusing on that first-run experience feels very worthwhile.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1845/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1157182254 I_kwDOBm6k_c5E-TMu 1646 Configuration directory mode does not pick up other file extensions than .db dnsos 15640196 closed 0     3 2022-03-02T13:15:23Z 2022-10-07T23:06:17Z 2022-10-07T23:03:35Z NONE  

Hello, I've been trying to run Datasette with the configuration directory mode with a structure such as this one:

plain some-directory/ example.sqlite3 another-example.db one-more.custom [...]

(In my scenario I can't just change the filename extension without other problems arising)

Now databases with the .sqlite3 or the custom filename extension are ignored by Datasette in this case. I'm aware that the docs state that a .db extension is required, but I was wondering if there is a reason for restricting this or any workaround available? When I run datasette example.sqlite3 or datasette one-more.custom the databases are served by Datasette without a problem.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1646/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1400494162 PR_kwDOBm6k_c5AW_kl 1838 Open Datasette link in new tab ocdtrekkie 4399499 closed 0     3 2022-10-07T01:12:20Z 2022-10-07T16:28:41Z 2022-10-07T02:01:07Z NONE simonw/datasette/pulls/1838

This is technically a Sandstorm-specific fix (as external links do not work inside the grain frame), however, I think it is an improvement to the upstream project, so I wanted to propose it here rather than patching it in our package.

There's much opinions on the Internet about whether external links should open in a new tab by default or not, but I'd argue very few people who might click a "powered by" link intend to complete their interaction with the source page (a Datasette). And furthermore, users may be working within various queries or loading visualizations (navigating away when trying to plot a million GPS coordinates pretty much just resets your progress!), so linking away within the tab might be a frustrating or destructive act to one's work, even inadvertently.

original report: https://github.com/ocdtrekkie/datasette-sandstorm/issues/1


:books: Documentation preview :books:: https://datasette--1838.org.readthedocs.build/en/1838/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1838/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1386917344 PR_kwDOBm6k_c4_prjN 1823 Keyword-only arguments for a bunch of internal methods simonw 9599 open 0     3 2022-09-27T00:44:59Z 2022-10-05T04:37:54Z   OWNER simonw/datasette/pulls/1823

Refs #1822


:books: Documentation preview :books:: https://datasette--1823.org.readthedocs.build/en/1823/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1823/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1388631785 I_kwDOBm6k_c5SxNbp 1826 render_cell documentation example doesn't match the method signature pjamargh 66709385 closed 0     3 2022-09-28T02:37:59Z 2022-09-28T04:30:28Z 2022-09-28T04:05:16Z NONE  

Open Datasette stable doc at https://docs.datasette.io/en/stable/plugin_hooks.html?highlight=render_cell#render-cell-row-value-column-table-database-datasette

render_cell plugin hook method signature is render_cell(row, value, column, table, database, datasette), the example shown inline uses render_cell(value).

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1826/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1386854246 I_kwDOBm6k_c5Sqbdm 1822 Switch to keyword-only arguments for a bunch of internal methods simonw 9599 open 0   Datasette 1.0 3268330 3 2022-09-26T23:20:38Z 2022-09-27T00:44:04Z   OWNER  

This is a good idea, and one that needs to happen before Datasette 1.0:

While you are adding features, would you be future-proofing your APIs if you switched over some arguments over to keyword-only arguments or would that be too disruptive?

Thinking out loud:

async def render_template( self, templates, *, context=None, plugin_context=None, request=None, view_name=None ): Originally posted by @jefftriplett in https://github.com/simonw/datasette/issues/1817#issuecomment-1256781274

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1822/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1385026210 I_kwDOBm6k_c5SjdKi 1819 Preserve query on timeout danp 2182 closed 0     3 2022-09-25T13:32:31Z 2022-09-26T23:16:15Z 2022-09-26T23:06:06Z CONTRIBUTOR  

If a query hits the timeout it shows a message like:

SQL query took too long. The time limit is controlled by the sql_time_limit_ms configuration option.

But the query is lost. Hitting the browser back button shows the query before the one that errored.

It would be nice if the query that errored was preserved for more tweaking. This would make it similar to how "invalid syntax" works since #1346 / #619.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1819/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1375930971 PR_kwDOBm6k_c4_GVBS 1812 Bump furo from 2022.6.21 to 2022.9.15 dependabot[bot] 49699333 closed 0     3 2022-09-16T13:10:45Z 2022-09-16T19:50:53Z 2022-09-16T19:50:52Z CONTRIBUTOR simonw/datasette/pulls/1812

Bumps furo from 2022.6.21 to 2022.9.15.

Changelog

Sourced from furo's changelog.

Changelog

2022.09.15 -- Pragmatic Pistachio

  • Add a minimum version constraint on pygments.
  • Add an explicit dependency on sass.
  • Change right sidebar title from "Contents" to "On this page".
  • Correctly position sidebars on small screens.
  • Correctly select only Furo's own svg in related pages nav.
  • Make numpy-style documentation headers consistent.
  • Retitle the reference section.
  • Update npm dependencies.

2022.06.21 -- Opulent Opal

  • Fix docutils <= 0.17.x compatibility.
  • Bump to the latest Node.js LTS.

2022.06.04.1 -- Naughty Nickel bugfix

  • Fix the URL used in the "Edit this page" for Read the Docs builds.

2022.06.04 -- Naughty Nickel

  • ✨ Advertise Sphinx 5 compatibility.
  • ✨ Change to basic-ng as the base theme (from {pypi}sphinx-basic-ng).
  • Document site-wide announcement banners.
  • Drop the pin on pygments.
  • Improve edit button, using basic-ng's edit-this-page component.
  • Tweak headings to better match what users expect.
  • Tweak how Sphinx's default HTML is rendered, using docutils post-transforms (this replaces parsing+modifying it with BeautifulSoup).
  • When built with docutils 0.18, footnotes are rendered differently and stylised differently in Furo.

2022.04.07 -- Magical Mauve

  • ✨ Make sphinx-copybutton look better.
  • Add margin to indentations in line blocks.
  • Add styling for non-arabic list styles
  • Add support for html_baseurl.

... (truncated)

Commits
  • 08e6b38 Prepare release: 2022.09.15
  • 9de7613 Update changelog
  • a064929 Tweak changelog content style
  • 46f4adc Revert "Add initial theme.conf content for eventual ablog support"
  • 45b839b Set a minimum constraint on pygments
  • a4af988 [pre-commit.ci] pre-commit autoupdate (#518)
  • a72186f [pre-commit.ci] pre-commit autoupdate (#504)
  • 9f41ee6 Add initial theme.conf content for eventual ablog support
  • 75e0361 Make numpy-style documentation headers consistent
  • 9d280e6 [pre-commit.ci] pre-commit autoupdate (#487)
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

:books: Documentation preview :books:: https://datasette--1812.org.readthedocs.build/en/1812/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1812/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1362363685 I_kwDOBm6k_c5RNAUl 1800 Remove upper bound dependencies as a default policy simonw 9599 closed 0     3 2022-09-05T18:23:45Z 2022-09-05T18:39:52Z 2022-09-05T18:35:41Z OWNER  

https://iscinumpy.dev/post/bound-version-constraints/ has convinced me not to use upper bound dependencies unless I'm certain they are needed.

Relevant PR: - https://github.com/simonw/datasette/pull/1799

Also:

https://github.com/simonw/datasette/blob/ba35105eee2d3ba620e4f230028a02b2e2571df2/setup.py#L45-L46

https://github.com/simonw/datasette/blob/ba35105eee2d3ba620e4f230028a02b2e2571df2/setup.py#L48-L49

https://github.com/simonw/datasette/blob/ba35105eee2d3ba620e4f230028a02b2e2571df2/setup.py#L51-L55

https://github.com/simonw/datasette/blob/ba35105eee2d3ba620e4f230028a02b2e2571df2/setup.py#L57-L59

https://github.com/simonw/datasette/blob/ba35105eee2d3ba620e4f230028a02b2e2571df2/setup.py#L75-L78

https://github.com/simonw/datasette/blob/ba35105eee2d3ba620e4f230028a02b2e2571df2/setup.py#L81-L82

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1800/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1180778860 PR_kwDOBm6k_c41BFWj 1685 Update jinja2 requirement from <3.1.0,>=2.10.3 to >=2.10.3,<3.2.0 dependabot[bot] 49699333 closed 0     3 2022-03-25T13:12:13Z 2022-09-05T18:36:49Z 2022-09-05T18:36:48Z CONTRIBUTOR simonw/datasette/pulls/1685

Updates the requirements on jinja2 to permit the latest version.

Release notes

Sourced from jinja2's releases.

3.1.0

This is a feature release, which includes new features and removes previously deprecated features. The 3.1.x branch is now the supported bugfix branch, the 3.0.x branch has become a tag marking the end of support for that branch. We encourage everyone to upgrade, and to use a tool such as pip-tools to pin all dependencies and control upgrades. We also encourage upgrading to MarkupSafe 2.1.1, the latest version at this time.

  • Changes: https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0
  • Milestone: https://github.com/pallets/jinja/milestone/8?closed=1
  • MarkupSafe changes: https://markupsafe.palletsprojects.com/en/2.1.x/changes/#version-2-1-1
Changelog

Sourced from jinja2's changelog.

Version 3.1.0

Released 2022-03-24

  • Drop support for Python 3.6. :pr:1534

  • Remove previously deprecated code. :pr:1544

    • WithExtension and AutoEscapeExtension are built-in now.
    • contextfilter and contextfunction are replaced by pass_context. evalcontextfilter and evalcontextfunction are replaced by pass_eval_context. environmentfilter and environmentfunction are replaced by pass_environment.
    • Markup and escape should be imported from MarkupSafe.
    • Compiled templates from very old Jinja versions may need to be recompiled.
    • Legacy resolve mode for Context subclasses is no longer supported. Override resolve_or_missing instead of resolve.
    • unicode_urlencode is renamed to url_quote.
  • Add support for native types in macros. :issue:1510

  • The {% trans %} tag can use pgettext and npgettext by passing a context string as the first token in the tag, like {% trans "title" %}. :issue:1430

  • Update valid identifier characters from Python 3.6 to 3.7. :pr:1571

  • Filters and tests decorated with @async_variant are pickleable. :pr:1612

  • Add items filter. :issue:1561

  • Subscriptions ([0], etc.) can be used after filters, tests, and calls when the environment is in async mode. :issue:1573

  • The groupby filter is case-insensitive by default, matching other comparison filters. Added the case_sensitive parameter to control this. :issue:1463

  • Windows drive-relative path segments in template names will not result in FileSystemLoader and PackageLoader loading from drive-relative paths. :pr:1621

Version 3.0.3

Released 2021-11-09

  • Fix traceback rewriting internals for Python 3.10 and 3.11. :issue:1535
  • Fix how the native environment treats leading and trailing spaces when parsing values on Python 3.10. :pr:1537

... (truncated)

Commits
  • 84c0e2c Merge pull request #1625 from pallets/release-3.1.0
  • 7b0c47f release version 3.1.0
  • ede0f98 Merge pull request #1621 from pallets/template-safe-path
  • 040088a use posixpath.join when loading template names
  • a292075 Merge pull request #1620 from janfilips/patch-1
  • 6e4df02 Fix formatting in tricks.rst
  • 3a050b1 Merge pull request #1617 from pallets/docs-prose
  • 4b63cd8 rewrite include statement section
  • a98d482 clean up faq, move technical discussions
  • 9de99f8 clean up engine comparisons
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1685/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1348394901 PR_kwDOBm6k_c49qmC2 1792 Test `--load-extension` in GitHub Actions simonw 9599 closed 0     3 2022-08-23T18:43:29Z 2022-08-24T00:11:46Z 2022-08-24T00:11:45Z OWNER simonw/datasette/pulls/1792

Refs: - #1789


:books: Documentation preview :books:: https://datasette--1792.org.readthedocs.build/en/1792/

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1792/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
838245338 MDU6SXNzdWU4MzgyNDUzMzg= 1272 Unit tests for the Dockerfile simonw 9599 open 0     3 2021-03-23T01:36:29Z 2022-07-29T10:22:59Z   OWNER  

Working on the Dockerfile in #1249 made me wish for automated tests - to confirm that it boots up correctly, can run SpatiaLite and doesn't have weird bugs like the /db page hanging.

These could run in CI too, but maybe only if the Dockerfile is updated.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1272/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1184850337 PR_kwDOBm6k_c41OrSL 1693 Bump black from 22.1.0 to 22.3.0 dependabot[bot] 49699333 closed 0     3 2022-03-29T13:11:09Z 2022-06-28T13:11:38Z 2022-06-28T13:11:36Z CONTRIBUTOR simonw/datasette/pulls/1693

Bumps black from 22.1.0 to 22.3.0.

Release notes

Sourced from black's releases.

22.3.0

Preview style

  • Code cell separators #%% are now standardised to # %% (#2919)
  • Remove unnecessary parentheses from except statements (#2939)
  • Remove unnecessary parentheses from tuple unpacking in for loops (#2945)
  • Avoid magic-trailing-comma in single-element subscripts (#2942)

Configuration

  • Do not format __pypackages__ directories by default (#2836)
  • Add support for specifying stable version with --required-version (#2832).
  • Avoid crashing when the user has no homedir (#2814)
  • Avoid crashing when md5 is not available (#2905)
  • Fix handling of directory junctions on Windows (#2904)

Documentation

  • Update pylint config documentation (#2931)

Integrations

  • Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)

Output

  • In verbose, mode, log when Black is using user-level config (#2861)

Packaging

  • Fix Black to work with Click 8.1.0 (#2966)
  • On Python 3.11 and newer, use the standard library's tomllib instead of tomli (#2903)
  • black-primer, the deprecated internal devtool, has been removed and copied to a separate repository (#2924)

Parser

  • Black can now parse starred expressions in the target of for and async for statements, e.g for item in *items_1, *items_2: pass (#2879).
Changelog

Sourced from black's changelog.

22.3.0

Preview style

  • Code cell separators #%% are now standardised to # %% (#2919)
  • Remove unnecessary parentheses from except statements (#2939)
  • Remove unnecessary parentheses from tuple unpacking in for loops (#2945)
  • Avoid magic-trailing-comma in single-element subscripts (#2942)

Configuration

  • Do not format __pypackages__ directories by default (#2836)
  • Add support for specifying stable version with --required-version (#2832).
  • Avoid crashing when the user has no homedir (#2814)
  • Avoid crashing when md5 is not available (#2905)
  • Fix handling of directory junctions on Windows (#2904)

Documentation

  • Update pylint config documentation (#2931)

Integrations

  • Move test to disable plugin in Vim/Neovim, which speeds up loading (#2896)

Output

  • In verbose, mode, log when Black is using user-level config (#2861)

Packaging

  • Fix Black to work with Click 8.1.0 (#2966)
  • On Python 3.11 and newer, use the standard library's tomllib instead of tomli (#2903)
  • black-primer, the deprecated internal devtool, has been removed and copied to a separate repository (#2924)

Parser

  • Black can now parse starred expressions in the target of for and async for statements, e.g for item in *items_1, *items_2: pass (#2879).
Commits
  • ae2c075 Prepare release 22.3.0 (#2968)
  • e9681a4 Fix _unicodefun patch code for Click 8.1.0 (#2966)
  • ac7402c Bump sphinx from 4.4.0 to 4.5.0 in /docs (GH-2959)
  • f239d22 Enforce no formatting changes for PRs via CI (GH-2951)
  • bd1e980 Remove unnecessary parentheses from except clauses (#2939)
  • 14d84ba Resolve new flake8-bugbear errors (B020) (GH-2950)
  • 14e5ce5 Remove unnecessary parentheses from tuple unpacking in for loops (#2945)
  • 3800ebd Avoid magic-trailing-comma in single-element subscripts (#2942)
  • 062b549 Github now supports .git-blame-ignore-revs (GH-2948)
  • 5379d4f stub style: remove some possible future changes (#2940)
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1693/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1275523220 PR_kwDOBm6k_c454SlE 1759 Extract facet portions of table.html out into included templates nsmgr8 19872 closed 0     3 2022-06-17T22:04:04Z 2022-06-20T18:05:45Z 2022-06-20T18:05:45Z CONTRIBUTOR simonw/datasette/pulls/1759

To allow users customise the facet content as they would prefer such as sorting of facet results. ordering of suggested facets etc.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1759/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1060631257 I_kwDOBm6k_c4_N_LZ 1528 Add new `"sql_file"` key to Canned Queries in metadata? asg017 15178711 open 0     3 2021-11-22T21:58:01Z 2022-06-10T03:23:08Z   CONTRIBUTOR  

Currently for canned queries, you have to inline SQL in your metadata.yaml like so:

yaml databases: fixtures: queries: neighborhood_search: sql: |- select neighborhood, facet_cities.name, state from facetable join facet_cities on facetable.city_id = facet_cities.id where neighborhood like '%' || :text || '%' order by neighborhood title: Search neighborhoods

This works fine, but for a few reasons, I usually have my canned queries already written in separate .sql files. I'd like to instead re-use those instead of re-writing it.

So, I'd like to see a new "sql_file" key that works like so:

metadata.yaml:

yaml databases: fixtures: queries: neighborhood_search: sql_file: neighborhood_search.sql title: Search neighborhoods neighborhood_search.sql: sql select neighborhood, facet_cities.name, state from facetable join facet_cities on facetable.city_id = facet_cities.id where neighborhood like '%' || :text || '%' order by neighborhood

Both of these would work in the exact same way, where Datasette would instead open + include neighborhood_search.sql on startup.

A few reasons why I'd like to keep my canned queries SQL separate from metadata.yaml:

  • Keeping SQL in standalone SQL files means syntax highlighting and other text editor integrations in my code
  • Multiline strings in yaml, while functional, are a tad cumbersome and are hard to edit
  • Works well with other tools (can pipe .sql files into the sqlite3 CLI, or use with other SQLite clients easier)
  • Typically my canned queries are quite long compared to everything else in my metadata.yaml, so I'd love to separate it where possible

Let me know if this is a feature you'd like to see, I can try to send up a PR if this sounds right!

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1528/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1223241647 I_kwDOBm6k_c5I6S-v 1734 Remove python-baseconv dependency simonw 9599 closed 0     3 2022-05-02T19:08:37Z 2022-05-02T23:25:49Z 2022-05-02T19:39:20Z OWNER  

I was going to vendor baseconv.py, but then I reconsidered - what if there are plugins out there that expect import baseconv to work because they have depended on Datasette?

I used https://cs.github.com/ and as far as I can tell there aren't any!

So I'm going to remove that dependency and work out a smarter way to do this - probably by providing a utility function within Datasette itself.

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1733#issuecomment-1115258737

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1734/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1216619276 I_kwDOBm6k_c5IhCMM 1724 ?_trace=1 doesn't work on Global Power Plants demo simonw 9599 closed 0     3 2022-04-27T00:15:02Z 2022-04-27T06:15:14Z 2022-04-27T00:18:30Z OWNER  

https://global-power-plants.datasettes.com/global-power-plants/global-power-plants?_trace=1 is not showing the trace JSON at the bottom of the page.

Confirmed that trace_debug is true on https://global-power-plants.datasettes.com/-/settings

Possibly related:

  • https://github.com/simonw/datasette-total-page-time/issues/1
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1724/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
810507413 MDExOlB1bGxSZXF1ZXN0NTc1MTg3NDU3 1229 ensure immutable databses when starting in configuration directory mode with camallen 295329 closed 0     3 2021-02-17T20:18:26Z 2022-04-22T13:16:36Z 2021-03-29T00:17:32Z CONTRIBUTOR simonw/datasette/pulls/1229

fixes #1224

This PR ensures all databases found in a configuration directory that match the files in inspect-data.json will be set to immutable as outlined in https://docs.datasette.io/en/latest/settings.html#configuration-directory-mode

specifically on building the datasette instance it checks: - if immutables is an empty tuple - as passed by the cli code - if immutables is the default function value None - when it's not explicitly set

And correctly builds the immutable database list from the inspect-data[file] keys.

Note for this to work the inspect-data.json file must contain file paths which are relative to the configuration directory otherwise the file paths won't match and the dbs won't be set to immutable.

I couldn't find an easy way to test this due to the way make_app_client works, happy to take directions on adding a test for this.

I've updated the relevant docs as well, i.e. use the inspect cli cmd from the config directory path to create the relevant file cd $config_dir datasette inspect *.db --inspect-file=inspect-data.json https://docs.datasette.io/en/latest/performance.html#using-datasette-inspect

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1229/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1202227104 I_kwDOBm6k_c5HqIeg 1712 Make "<Binary: 2427344 bytes>" easier to read simonw 9599 closed 0     3 2022-04-12T18:17:07Z 2022-04-12T19:12:22Z 2022-04-12T18:44:20Z OWNER  

Binary: 2,427,344 bytes would be nicer - even better, include a tooltip showing that size translated using this function: https://github.com/simonw/datasette/blob/138e4d9a53e3982137294ba383303c3a848cfca4/datasette/utils/init.py#L837-L846

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1712/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1181432624 I_kwDOBm6k_c5Gazsw 1688 [plugins][documentation] Is it possible to serve per-plugin static folders when writing one-off (single file) plugins? hydrosquall 9020979 closed 0     3 2022-03-26T01:17:44Z 2022-03-27T01:01:14Z 2022-03-26T21:34:47Z CONTRIBUTOR  

I'm trying to make a small plugin that depends on static assets, by following the guide here. I made a plugins/ directory with datasette_nteract_data_explorer.py.

I am trying to follow the example of datasette_vega, and serving static assets. I created a statics/ directory within plugins/ to serve my JS and CSS.

https://github.com/simonw/datasette-vega/blob/00de059ab1ef77394ba9f9547abfacf966c479c4/datasette_vega/init.py#L13

Unfortunately, datasette doesn't seem to be able to find my assets.

Input:

bash datasette ~/Library/Safari/History.db --plugins-dir=plugins/

Output:

I suspect this issue might go away if I move away from "one-off" plugin mode, but it's been a while since I created a new python package so I'm not sure how much work there is to go between "one off" and "packaged for PyPI". I'd like to try to avoid needing to repackage a new tar.gz file and or reinstall my library repeatedly when developing new python code.

  1. Is there a way to serve a static assets when using the plugins/ directory method instead of installing plugins as a new python package?
  2. If not, is there a way I can work on developing a plugin without creating and repackaging tar.gz files after every change, or is that the recommended path?

Thanks for your help!

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1688/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1174302994 I_kwDOBm6k_c5F_nES 1667 Make route matched pattern groups more consistent simonw 9599 closed 0   Datasette 1.0 3268330 3 2022-03-19T16:32:35Z 2022-03-19T20:37:42Z 2022-03-19T20:37:41Z OWNER  

... highlights how inconsistent the way the capturing works is. Especially as_format which can be None or "" or .json or json or not used at all in the case of TableView.

https://github.com/simonw/datasette/blob/764738dfcb16cd98b0987d443f59d5baa9d3c332/tests/test_routes.py#L12-L36

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1666#issuecomment-1073039670

Part of: - #1660

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1667/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1174162781 I_kwDOBm6k_c5F_E1d 1666 Refactor URL routing to enable testing simonw 9599 closed 0   Datasette 1.0 3268330 3 2022-03-19T03:52:29Z 2022-03-19T16:32:03Z 2022-03-19T16:32:03Z OWNER  

I ran into some bugs earlier with URL routing - having more robust testing around this (especially since they are defined using regular expressions) would be really useful.

  • A utility function that resolves a path against a list of reflexes and returns the match
  • Make the routes and regular expressions available from a private Datasette method
  • Add tests that exercise them

Related: - #1660

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1666/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1082765654 I_kwDOBm6k_c5AibFW 1561 add hash id to "_memory" url if hashed url mode is turned on and crossdb is also turned on fgregg 536941 closed 0     3 2021-12-17T00:45:12Z 2022-03-19T04:45:40Z 2022-03-19T04:45:40Z CONTRIBUTOR  

If hashed_url mode is turned on and crossdb is also turned on, then queries to _memory should have a hash_id.

One way that it could work is to have the _memory hash be a hash of all the individual databases.

Otherwise, crossdb queries can get quit out of data if using aggressive caching.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1561/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
531502365 MDU6SXNzdWU1MzE1MDIzNjU= 646 Make database level information from metadata.json available in the index.html template lagolucas 18017473 open 0   Datasette 1.0 3268330 3 2019-12-02T19:55:10Z 2022-03-15T20:50:34Z   NONE  

Did a search on the issues here and didn't find anything related to what I want.

I want to have information that is on the database level of the JSON like title, source and source_url, and use it on the index page.

I tried some small tweaks on the python and html files, but failed to get that result.

Is there a way? Thanks!

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/646/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1054243511 I_kwDOBm6k_c4-1nq3 1509 Datasette 1.0 JSON API (and documentation) simonw 9599 open 0   Datasette 1.0 3268330 3 2021-11-15T23:22:45Z 2022-03-15T20:38:56Z   OWNER  

The new JSON API in a stable, documented form.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1509/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1075893249 I_kwDOBm6k_c5AINQB 1545 Custom pages don't work on windows ryascott 559711 closed 0     3 2021-12-09T18:53:05Z 2022-02-03T02:08:31Z 2022-02-03T01:58:35Z NONE  

It seems that custom pages don't work when put in templates/pages

To reproduce on datasette version 0.59.4 using PowerShell on WIndows 10 with Python 3.10.0

mkdir -p templates/pages

echo "hello world" >> templates/pages/about.html

Start datasette

datasette --template-dir templates/

Navigate to http://127.0.0.1:8001/about and receive:

Error 404: Database not found: about

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1545/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1120990806 PR_kwDOBm6k_c4x6zZ5 1617 Ensure template_path always uses "/" to match jinja cb160 3526913 closed 0     3 2022-02-01T17:20:30Z 2022-02-03T01:58:35Z 2022-02-03T01:58:35Z CONTRIBUTOR simonw/datasette/pulls/1617

This PR shoudl fix #1545

The existing code substituted / for \, assuming this was the right behaviour for windows. But on Windows, Jinja still uses / for the template list - See https://github.com/pallets/jinja/blob/896a62135bcc151f2997e028c5125bec2cb2431f/src/jinja2/loaders.py#L225

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1617/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1122451096 PR_kwDOBm6k_c4x_mXy 1626 Try test suite against macOS and Windows simonw 9599 open 0     3 2022-02-02T22:26:51Z 2022-02-03T01:22:44Z   OWNER simonw/datasette/pulls/1626

Refs #1625

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1626/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1121618041 I_kwDOBm6k_c5C2oh5 1620 Link: rel="alternate" to JSON for queries too simonw 9599 closed 0   Datasette 1.0 3268330 3 2022-02-02T08:02:42Z 2022-02-02T21:53:02Z 2022-02-02T21:33:00Z OWNER  

Following: - #1533

I implemented it for tables and rows but I should have done queries as well.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1620/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1108846067 I_kwDOBm6k_c5CF6Xz 1606 Tests failing against Python 3.6 simonw 9599 closed 0     3 2022-01-20T04:22:44Z 2022-01-20T04:36:42Z 2022-01-20T04:36:42Z OWNER  

https://github.com/simonw/datasette/runs/4877484366

E File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/uvicorn/server.py", line 67, in run E return asyncio.run(self.serve(sockets=sockets)) E AttributeError: module 'asyncio' has no attribute 'run' I think this may mean uvicorn has dropped support for Python 3.6.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1606/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1102359726 I_kwDOBm6k_c5BtKyu 1594 Add a CLI reference page to the docs, inspired by sqlite-utils simonw 9599 closed 0   Datasette 0.60 7571612 3 2022-01-13T20:55:08Z 2022-01-13T22:28:22Z 2022-01-13T21:38:48Z OWNER  

Thought of this while posting this comment: https://github.com/simonw/datasette/issues/1591#issuecomment-1012506595

I added https://sqlite-utils.datasette.io/en/stable/cli-reference.html to sqlite-utils in https://github.com/simonw/sqlite-utils/issues/383 and I really like it - it's a page showing the --help output of every CLI command for that tool.

It's maintained using cog. One of the benefits is that I get a free commit history of changes to --help at https://github.com/simonw/sqlite-utils/commits/main/docs/cli-reference.rst

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1594/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1097101917 I_kwDOBm6k_c5BZHJd 1588 `explain query plan select` is too strict about whitespace simonw 9599 closed 0   Datasette 0.60 7571612 3 2022-01-09T04:22:42Z 2022-01-13T22:28:19Z 2022-01-13T20:35:05Z OWNER  

explain query plan select * from facetable is allowed: https://latest.datasette.io/fixtures?sql=explain+query+plan+select+*+from+facetable

But... explain query plan select * from facetable (with two spaces before the select) returns a "Statement must be a SELECT" error: https://latest.datasette.io/fixtures?sql=explain+query+plan++select+*+from+facetable

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1588/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1077893013 I_kwDOBm6k_c5AP1eV 1551 `keep_blank_values=True` when parsing `request.args` simonw 9599 closed 0   Datasette 0.60 7571612 3 2021-12-12T19:53:07Z 2022-01-13T22:26:04Z 2021-12-12T20:02:01Z OWNER  

This code in TableView wouldn't be necessary: https://github.com/simonw/datasette/blob/492f9835aa7e90540dd0c6324282b109f73df71b/datasette/views/table.py#L396-L399

If that happened here instead: https://github.com/simonw/datasette/blob/492f9835aa7e90540dd0c6324282b109f73df71b/datasette/utils/asgi.py#L98-L100

Originally posted by @simonw in https://github.com/simonw/datasette/issues/1518#issuecomment-991827468

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1551/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
534629631 MDU6SXNzdWU1MzQ2Mjk2MzE= 650 Add a glossary to the documentation simonw 9599 open 0     3 2019-12-09T00:23:45Z 2022-01-13T22:04:56Z   OWNER  

Call it glossary.rst - it can use a definition list something like this: ```rst .. _glossary:

Glossary

Term A definition of the term.

Another term Another definition. ```

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/650/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1079129258 PR_kwDOBm6k_c4vynly 1554 TableView refactor simonw 9599 closed 0     3 2021-12-13T23:16:04Z 2021-12-20T23:52:11Z 2021-12-20T23:52:04Z OWNER simonw/datasette/pulls/1554

I'm starting a PR with almost nothing in it so I can use the GitHub code commenting feature to add a bunch of comments to the code I intend to refactor.

Related issues:

  • 617

  • 715

  • 870

  • 1518

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1554/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
793002853 MDExOlB1bGxSZXF1ZXN0NTYwNzYwMTQ1 1204 WIP: Plugin includes simonw 9599 open 0     3 2021-01-25T03:59:06Z 2021-12-17T07:10:49Z   OWNER simonw/datasette/pulls/1204

Refs #1191

Next steps:

  • [ ] Get comfortable that this pattern is the right way to go
  • [ ] Implement it for all of the other pages, not just the table page
  • [ ] Add a new set of plugin tests that exercise ALL of these new hook locations
  • [ ] Document, then ship
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1204/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1  
636511683 MDU6SXNzdWU2MzY1MTE2ODM= 830 Redesign register_facet_classes plugin hook simonw 9599 open 0   Datasette 1.0 3268330 3 2020-06-10T20:03:27Z 2021-12-16T19:58:22Z   OWNER  

Nothing uses this plugin hook yet, so the design is not yet proven.

I'm going to build a real plugin against it and use that process to inform any design changes that may need to be made.

I'll add a warning about this to the documentation.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/830/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1079111498 I_kwDOBm6k_c5AUe9K 1553 if csv export is truncated in non streaming mode set informative response header fgregg 536941 open 0     3 2021-12-13T22:50:44Z 2021-12-16T19:17:28Z   CONTRIBUTOR  

streaming mode is currently not enabled for custom queries, so the queries will be truncated to max row limit.

it would be great if a response is truncated that an header signalling that was set in the header.

i need to write some pagination code for getting full results back for a custom query and it would make the code much better if i could reliably known when there is nothing more to limit/offset

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1553/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
1059509927 I_kwDOBm6k_c4_Jtan 1525 "Links from other tables" broken for columns starting with underscore simonw 9599 closed 0     3 2021-11-21T22:55:08Z 2021-11-30T06:39:01Z 2021-11-30T06:34:35Z OWNER  

Same bug as #1506, this time it's this link or the row page:

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1525/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
1066288689 I_kwDOBm6k_c4_jkYx 1538 Research pattern for re-registering existing Click tools with register_commands simonw 9599 closed 0     3 2021-11-29T17:09:47Z 2021-11-29T17:32:44Z 2021-11-29T17:27:16Z OWNER  

Building a Datasette plugin that imports an existing Click CLI tool and re-registers it is proving hard - Click doesn't really want you to do that. I tried this: ```python from datasette import hookimpl from git_history.cli import file as git_history_file

@hookimpl def register_commands(cli): cli.command(name="git-history")(git_history_file.callback) But when I run this: % datasette git-history --help
Usage: datasette git-history [OPTIONS]

Analyze the history of a specific file and write it to SQLite

Options: --help Show this message and exit. ``` The options are all missing - which means that the command doesn't actually work. Will need to research this pattern separately.

Originally posted by @simonw in https://github.com/simonw/git-history/issues/21#issuecomment-981835305

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1538/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
991575770 MDExOlB1bGxSZXF1ZXN0NzMwMDIwODY3 1467 Add Authorization header when CORS flag is set jameslittle230 3058200 closed 0     3 2021-09-08T22:14:41Z 2021-10-17T02:29:07Z 2021-10-14T18:54:18Z NONE simonw/datasette/pulls/1467

This PR adds the Access-Control-Allow-Headers flag when CORS mode is enabled.

This would fix https://github.com/simonw/datasette-auth-tokens/issues/4. When making cross-origin requests, the server must respond with all allowable HTTP headers. A Datasette instance using auth tokens must accept the Authorization HTTP header in order for cross-origin authenticated requests to take place.

Please let me know if there's a better way of doing this! I couldn't figure out a way to change the app's response from the plugin itself, so I'm starting here. If you'd rather this logic live in the plugin, I'd love any guidance you're able to give.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1467/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
1026379132 PR_kwDOBm6k_c4tM0JV 1489 Update pyyaml requirement from ~=5.3 to >=5.3,<7.0 dependabot[bot] 49699333 closed 0     3 2021-10-14T13:09:33Z 2021-10-14T18:10:43Z 2021-10-14T18:10:42Z CONTRIBUTOR simonw/datasette/pulls/1489

Updates the requirements on pyyaml to permit the latest version.

Changelog

Sourced from pyyaml's changelog.

6.0 (2021-10-13)

  • yaml/pyyaml#327 -- Change README format to Markdown
  • yaml/pyyaml#483 -- Add a test for YAML 1.1 types
  • yaml/pyyaml#497 -- fix float resolver to ignore . and ._
  • yaml/pyyaml#550 -- drop Python 2.7
  • yaml/pyyaml#553 -- Fix spelling of “hexadecimal”
  • yaml/pyyaml#556 -- fix representation of Enum subclasses
  • yaml/pyyaml#557 -- fix libyaml extension compiler warnings
  • yaml/pyyaml#560 -- fix ResourceWarning on leaked file descriptors
  • yaml/pyyaml#561 -- always require Loader arg to yaml.load()
  • yaml/pyyaml#564 -- remove remaining direct distutils usage

5.4.1 (2021-01-20)

  • yaml/pyyaml#480 -- Fix stub compat with older pyyaml versions that may unwittingly load it

5.4 (2021-01-19)

  • yaml/pyyaml#407 -- Build modernization, remove distutils, fix metadata, build wheels, CI to GHA
  • yaml/pyyaml#472 -- Fix for CVE-2020-14343, moves arbitrary python tags to UnsafeLoader
  • yaml/pyyaml#441 -- Fix memory leak in implicit resolver setup
  • yaml/pyyaml#392 -- Fix py2 copy support for timezone objects
  • yaml/pyyaml#378 -- Fix compatibility with Jython

5.3.1 (2020-03-18)

  • yaml/pyyaml#386 -- Prevents arbitrary code execution during python/object/new constructor

5.3 (2020-01-06)

  • yaml/pyyaml#290 -- Use is instead of equality for comparing with None
  • yaml/pyyaml#270 -- Fix typos and stylistic nit
  • yaml/pyyaml#309 -- Fix up small typo
  • yaml/pyyaml#161 -- Fix handling of slots
  • yaml/pyyaml#358 -- Allow calling add_multi_constructor with None
  • yaml/pyyaml#285 -- Add use of safe_load() function in README
  • yaml/pyyaml#351 -- Fix reader for Unicode code points over 0xFFFF
  • yaml/pyyaml#360 -- Enable certain unicode tests when maxunicode not > 0xffff
  • yaml/pyyaml#359 -- Use full_load in yaml-highlight example
  • yaml/pyyaml#244 -- Document that PyYAML is implemented with Cython
  • yaml/pyyaml#329 -- Fix for Python 3.10
  • yaml/pyyaml#310 -- Increase size of index, line, and column fields
  • yaml/pyyaml#260 -- Remove some unused imports
  • yaml/pyyaml#163 -- Create timezone-aware datetimes when parsed as such
  • yaml/pyyaml#363 -- Add tests for timezone

5.2 (2019-12-02)

... (truncated)

Commits
  • 8cdff2c 6.0 release
  • a4fb55e Update Python 3.10 versions for Windows build
  • e45b964 Add Python 3.10 to tox.ini
  • 4808fba 6.0b1 release
  • d5aba40 Omnibus CI/artifact build update
  • a6d384c Various setup fixes
  • 8f3f979 No longer using appveyor
  • c274365 The yaml.load{,_all} functions require Loader= now
  • 2f87ac4 Add a basic test file for yaml.load and yaml.dump
  • 7bd92df Makefile tweaks
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1489/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
989986586 MDU6SXNzdWU5ODk5ODY1ODY= 1461 Try blacken-docs simonw 9599 closed 0     3 2021-09-07T13:28:50Z 2021-09-07T16:13:59Z 2021-09-07T16:13:59Z OWNER  

https://github.com/asottile/blacken-docs

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1461/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
988325628 MDExOlB1bGxSZXF1ZXN0NzI3MjY1MDI1 1455 Add scientists to target groups rgieseke 198537 closed 0     3 2021-09-04T16:28:58Z 2021-09-04T16:32:21Z 2021-09-04T16:31:38Z CONTRIBUTOR simonw/datasette/pulls/1455

Not sure if you want them mentioned explicitly (it's already a long list), but following up on https://twitter.com/simonw/status/1434176989565382656

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1455/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
978357984 MDU6SXNzdWU5NzgzNTc5ODQ= 1446 Modify base.html template to support optional sticky footer simonw 9599 closed 0     3 2021-08-24T18:11:12Z 2021-08-31T01:54:59Z 2021-08-24T20:32:47Z OWNER  

The neatest way to have the footer stick to the bottom of the browser window that I've found is to use the flexbox pattern from https://css-tricks.com/couple-takes-sticky-footer/

```html

<body>
content
<footer class="footer"></footer> </body>

css html, body { height: 100%; } body { display: flex; flex-direction: column; } .content { flex: 1 0 auto; } .footer { flex-shrink: 0; } `` I tried this in a custom plugin but it ended up having to duplicate the entirebase.html` template just to get a wrapper around the not-footer content.

I think Datasette's own base.html template should have this wrapper element instead.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1446/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
959710008 MDU6SXNzdWU5NTk3MTAwMDg= 1419 `publish cloudrun` should deploy a more recent SQLite version fgregg 536941 open 0     3 2021-08-04T00:45:55Z 2021-08-05T03:23:24Z   CONTRIBUTOR  

I recently changed from deploying a datasette using datasette publish heroku to datasette publish cloudrun. A query that ran on the heroku site, now throws a syntax error on the cloudrun site.

I suspect this is because they are running different versions of sqlite3.

  • Heroku: sqlite3 3.31.1 (-/versions)
  • Cloudrun: sqlite3 3.27.2 (-/versions)

If so, it would be great to

  1. harmonize the sqlite3 versions across platforms
  2. update the docker files so as to update the sqlite3 version for cloudrun
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1419/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
955316250 MDU6SXNzdWU5NTUzMTYyNTA= 1405 utils.parse_metadata() should be a documented internal function simonw 9599 closed 0     3 2021-07-28T23:51:39Z 2021-07-29T23:33:30Z 2021-07-29T23:30:24Z OWNER  

Because it's used by this plugin: https://github.com/simonw/datasette-remote-metadata

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1405/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
612673948 MDU6SXNzdWU2MTI2NzM5NDg= 759 fts search on a column doesn't work anymore due to escape_fts Krazybug 133845 closed 0     3 2020-05-05T15:03:44Z 2021-07-16T02:11:54Z 2020-05-06T17:50:57Z NONE  

Hi and first, thank you for this awesome work you make with this projet.

On a db indexed in full text search, I can't query on indexed column anymore.

This request "cauvin language:ita": is running smoothly on a old version of datasette but not on the current version.

Compare the current version query select uuid, title, authors, year, series, language, formats, publisher, tags, identifiers from summary where rowid in (select rowid from summary_fts where summary_fts match escape_fts(:search)) order by uuid limit 101

To an older version:

select title, authors, series, uuid, language, identifiers, tags, publisher, formats, year, links from summary where rowid in (select rowid from summary_fts where summary_fts match :search) order by uuid limit 101

language is a searchable column but now the search string is known as "cauvin language:ita" literally as a search term. columns are not parsed.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/759/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
539590148 MDU6SXNzdWU1Mzk1OTAxNDg= 651 fts5 syntax error when using punctuation clausjuhl 2181410 closed 0     3 2019-12-18T10:25:35Z 2021-07-14T19:26:06Z 2019-12-30T06:42:55Z NONE  

Hi Simon

I get a syntax error when using punctuation or special characters in a fulltext search (using fts5). I created the virtual table using sqlite-utils' "enable-fts"-command.

The same error appears on Niche Museums https://www.niche-museums.com/browse/search?q=park., but works fine in most of your other datasette-examples, e.g. register-of-members-interests https://register-of-members-interests.datasettes.com/regmem-98dc8b7/items?_search=mins.

What am I doing wrong? Many thanks!

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/651/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
646448486 MDExOlB1bGxSZXF1ZXN0NDQwNzM1ODE0 868 initial windows ci setup joshmgrant 702729 open 0     3 2020-06-26T18:49:13Z 2021-07-10T23:41:43Z   FIRST_TIME_CONTRIBUTOR simonw/datasette/pulls/868

Picking up the work done on #557 with a new PR. Seeing if I can get this working.

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/868/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
920884085 MDU6SXNzdWU5MjA4ODQwODU= 1377 Mechanism for plugins to exclude certain paths from CSRF checks simonw 9599 closed 0     3 2021-06-15T00:48:20Z 2021-06-23T22:51:33Z 2021-06-23T22:51:33Z OWNER  

I need this for a plugin I'm building that offers a POST API.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1377/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
732685643 MDU6SXNzdWU3MzI2ODU2NDM= 1063 .csv should link to .blob downloads simonw 9599 closed 0   0.51 6026070 3 2020-10-29T21:45:58Z 2021-06-17T18:12:30Z 2020-10-29T22:47:45Z OWNER  
  • [x] Update .csv output to link to these things (and get that xfail test to pass)
  • ~~Add a .csv?_blob_base64=1 argument that causes them to be output in base64 in the CSV~~

Moving the CSV work to a separate ticket. Originally posted by @simonw in https://github.com/simonw/datasette/pull/1061#issuecomment-719042601

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1063/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
919822817 MDU6SXNzdWU5MTk4MjI4MTc= 1376 Official Datasette Docker image should use SQLite >= 3.31.0 (for generated columns) jcgregorio 1726460 open 0     3 2021-06-13T15:25:51Z 2021-06-13T15:39:37Z   NONE  

Trying to run datasette via the Docker container doesn't seem to work:

$ docker run -p 8001:8001 -v `pwd`:/mnt datasetteproject/datasette datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db Traceback (most recent call last): File "/usr/local/bin/datasette", line 8, in <module> sys.exit(cli()) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/datasette/cli.py", line 544, in serve asyncio.get_event_loop().run_until_complete(check_databases(ds)) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/usr/local/lib/python3.9/site-packages/datasette/cli.py", line 584, in check_databases await database.execute_fn(check_connection) File "/usr/local/lib/python3.9/site-packages/datasette/database.py", line 155, in execute_fn return await asyncio.get_event_loop().run_in_executor( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.9/site-packages/datasette/database.py", line 153, in in_thread return fn(conn) File "/usr/local/lib/python3.9/site-packages/datasette/utils/__init__.py", line 892, in check_connection for r in conn.execute( sqlite3.DatabaseError: malformed database schema (generated_columns) - near "AS": syntax error

I have confirmed that the downloaded fixtures.db database is fine:

``` [skia-public] jcgregorio@jcgregorio840 ~/Downloads $ sqlite3 fixtures.db SQLite version 3.34.1 2021-01-20 14:10:07 Enter ".help" for usage hints. sqlite> pragma integrity_check; ok sqlite>

```

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1376/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
912418094 MDU6SXNzdWU5MTI0MTgwOTQ= 1358 Release Datasette 0.57 simonw 9599 closed 0     3 2021-06-05T19:56:13Z 2021-06-05T22:20:07Z 2021-06-05T22:20:07Z OWNER  

Need release notes. Changes are here: https://github.com/simonw/datasette/compare/0.56...368aa5f1b16ca35f82d90ff747023b9a2bfa27c1

Partial release notes already exist for the two alphas, https://github.com/simonw/datasette/releases/tag/0.57a0 and https://github.com/simonw/datasette/releases/tag/0.57a1

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1358/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
904537568 MDExOlB1bGxSZXF1ZXN0NjU1Njg0NDc3 1346 Re-display user's query with an error message if an error occurs simonw 9599 closed 0     3 2021-05-28T02:04:20Z 2021-06-02T03:46:21Z 2021-06-02T03:46:21Z OWNER simonw/datasette/pulls/1346

Refs #619

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1346/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
323671577 MDU6SXNzdWUzMjM2NzE1Nzc= 263 Facets should not execute for ?shape=array|object simonw 9599 closed 0     3 2018-05-16T15:26:13Z 2021-06-02T02:54:34Z 2021-06-02T02:54:34Z OWNER  

Split off from #255 - there's no point executing the facet SQL for the ?_shape=array and ?_shape=object API responses.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/263/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 253.82ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows