# datasette_commits

hash: 60c6692f6802dfae6a433f648f287be30ef52325
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-02-06T21:57:09-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-02-06T21:57:09-08:00
file_name: datasette/app.py
message:
  table_config instead of table_metadata (#2257)

  Table configuration that was incorrectly placed in metadata is now treated as if it was in config.

  New await datasette.table_config() method.

  Closes #2247


hash: 0b68996cc511b3a801f0cd0157bd66332d75f46f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-15T13:06:45-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-15T13:06:45-08:00
file_name: datasette/app.py
message:
  Revert "Replace AsgiLifespan with AsgiRunOnFirstRequest, refs #1955"

  This reverts commit dc18f62089e5672d03176f217d7840cdafa5c447.


hash: 38d28dd958c41e5e7fde3788ba3fdaf2e09eff70
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-15T13:05:33-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-15T13:05:33-08:00
file_name: .github/workflows/test.yml
message:
  Revert "Try running every test at once, refs #1955"

  This reverts commit 51ee8caa4a697fa3f4120e93b1c205b714a6cdc7.


hash: d98a8effb10ce8fe04a03eae42baa8a9cb0ca3f7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-13T20:59:28-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-13T21:03:17-08:00
file_name: datasette/app.py
message:
  UI for restricting permissions on /-/create-token, refs #1947

  Also fixes test failures I introduced in #1951


hash: e0e8522622c8a6769ba2dc7eafa35213c896306f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-09-30T15:25:28-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-09-30T15:25:28-07:00
file_name: README.md
message:
  Use new datasette.io/discord link for Discord

  Refs https://github.com/simonw/datasette.io/issues/119


hash: 2c36e45447494cd7505440943367e29ec57c8e72
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-10-27T13:51:45-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-10-27T13:51:45-07:00
file_name: setup.py
message:
  Bump black from 22.8.0 to 22.10.0 (#1839)

  Bumps [black](https://github.com/psf/black) from 22.8.0 to 22.10.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/22.8.0...22.10.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: d4b98d3924dec625a99236e65b1b169ff957381f
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-12-12T21:23:30-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-12-12T21:23:30-08:00
file_name: setup.py
message:
  Bump black from 22.10.0 to 22.12.0 (#1944)

  Bumps [black](https://github.com/psf/black) from 22.10.0 to 22.12.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/22.10.0...22.12.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 45979eb7239842aba512fc798ff0e772ef42b3da
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-12T21:21:01-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-12T21:21:01-08:00
file_name: tests/plugins/my_plugin.py
message:
  Rename permission created by demo plugin

  It was showing up as 'new-permission' on https://latest.datasette.io/-/permissions
  which I thought was confusing


hash: 8bf06a76b51bc9ace7cf72cf0cca8f1da7704ea7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-12T18:05:54-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-12-12T18:05:54-08:00
file_name: datasette/__init__.py
message:
  register_permissions() plugin hook (#1940)

  * Docs for permissions: in metadata, refs #1636
  * Refactor default_permissions.py to help with implementation of #1636
  * register_permissions() plugin hook, closes #1939 - also refs #1938
  * Tests for register_permissions() hook, refs #1939
  * Documentation for datasette.permissions, refs #1939
  * permission_allowed() falls back on Permission.default, refs #1939
  * Raise StartupError on duplicate permissions
  * Allow dupe permisisons if exact matches


hash: d28f12092dd795f35e9500154711d542f8931676
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-08-28T17:38:32-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-28T17:38:32-07:00
file_name: .github/workflows/deploy-latest.yml
message:
  Bump sphinx, furo, blacken-docs dependencies (#2160)

  * Bump the python-packages group with 3 updates

  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [blacken-docs](https://github.com/asottile/blacken-docs).


  Updates `sphinx` from 7.1.2 to 7.2.4
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.1.2...v7.2.4)

  Updates `furo` from 2023.7.26 to 2023.8.19
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2023.07.26...2023.08.19)

  Updates `blacken-docs` from 1.15.0 to 1.16.0
  - [Changelog](https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: blacken-docs
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  ---------

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: 5139c0886a7f6bb94d317ba0665aa6e728716028
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-08-07T09:19:23-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-07T09:19:23-07:00
file_name: setup.py
message:
  Bump the python-packages group with 3 updates (#2128)

  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [blacken-docs](https://github.com/asottile/blacken-docs).

  Updates `sphinx` from 6.1.3 to 7.1.2
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v6.1.3...v7.1.2)

  Updates `furo` from 2023.3.27 to 2023.7.26
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2023.03.27...2023.07.26)

  Updates `blacken-docs` from 1.14.0 to 1.15.0
  - [Changelog](https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/asottile/blacken-docs/compare/1.14.0...1.15.0)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-major
    dependency-group: python-packages
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: blacken-docs
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 2ebcffe2226ece2a5a86722790d486a480338632
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-09-16T12:50:52-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-09-16T12:50:52-07:00
file_name: setup.py
message:
  Bump furo from 2022.6.21 to 2022.9.15 (#1812)

  Bumps [furo](https://github.com/pradyunsg/furo) from 2022.6.21 to 2022.9.15.
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2022.06.21...2022.09.15)

  ---
  updated-dependencies:
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: bffefc7db0c25acb03e3b44ff357d50bb7f04dd7
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-12-08T13:12:07-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-12-08T13:12:07-08:00
file_name: setup.py
message:
  Bump furo from 2022.9.29 to 2022.12.7 (#1935)

  Bumps [furo](https://github.com/pradyunsg/furo) from 2022.9.29 to 2022.12.7.
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2022.09.29...2022.12.07)

  ---
  updated-dependencies:
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 272982e8a6f45700ff93c3917b4688a86de0e672
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-07T17:12:15-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-12-07T17:12:15-08:00
file_name: datasette/app.py
message:
  /db/table/-/upsert API

  Close #1878

  Also made a few tweaks to how _r works in tokens and actors,
  refs #1855 - I needed that mechanism for the tests.


hash: 27efa8c381bc1c9b8b3e6056e7e544ce6bedaedc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-01T17:29:44-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-01T17:29:44-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  todomvc permissions and fixed DATASETTE_SECRET for new demo

  Refs https://github.com/simonw/todomvc-datasette/issues/2


hash: 03f247845e108ab05436c8edeb558f2389ec7995
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-01T16:37:53-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-12-01T16:37:53-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  datasette-ephemeral-tables>=0.2.2

  Refs https://github.com/simonw/datasette-ephemeral-tables/issues/5


hash: 9f5321ff1eca58c469a45cc406d7eb5ad05accbd
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-29T20:43:27-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-11-29T20:43:27-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  latest now uses datasette-ephemeral-tables>=0.2.1

  Fix for https://github.com/simonw/datasette-ephemeral-tables/issues/4


hash: 7588d27f4a5a8325587f47c01d5f154c6a582a1a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-29T17:51:15-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-11-29T17:51:15-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  latest.datasette.io uses datasette-ephemeral-tables>=0.2

  To show the countdown timer from:
  https://github.com/simonw/datasette-ephemeral-tables/issues/3

  Refs #1915


hash: 4d49a5a39739476e1ada43f70a0029abcef07977
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-29T11:22:04-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-29T11:22:54-08:00
file_name: datasette/version.py
message:
  Release 1.0a0

  Refs #1850, #1851, #1852, #1856, #1858, #1863, #1864, #1871, #1874, #1882

  Closes #1891


hash: ae11fa5887e03376704c22e5d0969c1e0642d8d8
author_name: Brian Grinstead
author_email: briangrinstead@gmail.com
author_date: 2022-11-16T15:49:06-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-11-16T15:49:06-08:00
file_name: datasette/static/cm-editor-6.0.1.bundle.js
message:
  Upgrade to CodeMirror 6, add SQL autocomplete (#1893)

  * Upgrade to CodeMirror 6
  * Update contributing docs
  * Change how resizing works
  * Define a custom SQLite autocomplete dialect
  * Add meta-enter to submit
  * Add fixture schema for testing


hash: eac028d3f77aa5473a5fcf59240635a1bca80f7d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-14T22:57:11-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-14T22:57:11-08:00
file_name: datasette/static/table.js
message:
  Fix for datalist against foreign key facets

  Refs https://github.com/simonw/datasette/issues/1890#issuecomment-1314850524


hash: 264d0ab4714980b630face9157fc05611095e33e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-13T21:49:23-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-13T21:49:23-08:00
file_name: datasette/views/table.py
message:
  Renamed return_rows to return in insert API

  Refs https://github.com/simonw/datasette/issues/1866#issuecomment-1313128913


hash: 51d60d7ddf8fcbe1cf12d8f158f99971a8df6697
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-13T13:06:58-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-13T13:06:58-08:00
file_name: datasette/templates/_close_open_menus.html
message:
  details-menu class to avoid accidential details closure

  Refs https://github.com/simonw/datasette/issues/1871#issuecomment-1312821031


hash: bcc781f4c50a8870e3389c4e60acb625c34b0317
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-03T17:12:23-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-03T17:12:23-07:00
file_name: datasette/default_permissions.py
message:
  Implementation and tests for _r field on actor, refs #1855

  New mechanism for restricting permissions further for a given actor.

  This still needs documentation. It will eventually be used by the mechanism to issue
  signed API tokens that are only able to perform a subset of actions.

  This also adds tests that exercise the POST /-/permissions tool, refs #1881


hash: 867e0abd3429f837d5f15e6843a38f848ee562f0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-03T13:36:11-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-03T13:37:26-07:00
file_name: datasette/database.py
message:
  Tests now close SQLite database connections and files explicitly, refs #1843

  Also added a db.close() method to the Database class.


hash: 719e75725240f75b994cf22bf3f6d1a502bb3d07
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-02T20:12:13-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-02T20:12:13-07:00
file_name: datasette/views/base.py
message:
  Return method not allowed error in JSON in some situations

  Added this while playing with the new API explorer, refs #1871


hash: 497290beaf32e6b779f9683ef15f1c5bc142a41a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-01T12:59:17-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-01T12:59:17-07:00
file_name: datasette/templates/api_explorer.html
message:
  Handle database errors in /-/insert, refs #1866, #1873

  Also improved API explorer to show HTTP status of response, refs #1871


hash: 9bec7c38eb93cde5afb16df9bdd96aea2a5b0459
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-11-01T11:07:59-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-11-01T11:08:17-07:00
file_name: datasette/views/table.py
message:
  ignore and replace options for bulk inserts, refs #1873

  Also removed the rule that you cannot include primary keys in the rows you insert.

  And added validation that catches invalid parameters in the incoming JSON.

  And renamed "inserted" to "rows" in the returned JSON for return_rows: true


hash: c9b5f5d598e7f85cd3e1ce020351a27da334408b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-10-27T17:58:36-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-10-27T17:58:41-07:00
file_name: setup.py
message:
  Depend on sqlite-utils>=3.30

  Decided to use the most recent version in case I decide later to
  use the flatten() utility function.

  Refs #1850


hash: b912d92b651c4f0b5137da924d135654511f0fe0
author_name: Forest Gregg
author_email: fgregg@users.noreply.github.com
author_date: 2022-10-27T16:51:20-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-10-27T13:51:20-07:00
file_name: datasette/database.py
message:
  Make hash and size a lazy property (#1837)

  * use inspect data for hash and file size
  * make hash and cached_size lazy properties
  * move hash property near size


hash: c92c4318e9892101f75fa158410c0a12c1d80b6e
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-09-30T10:55:40-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-09-30T10:55:40-07:00
file_name: setup.py
message:
  Bump furo from 2022.9.15 to 2022.9.29 (#1827)

  Bumps [furo](https://github.com/pradyunsg/furo) from 2022.9.15 to 2022.9.29.
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2022.09.15...2022.09.29)

  ---
  updated-dependencies:
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-patch
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 64288d827f7ff97f825e10f714da3f781ecf9345
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-09-05T17:40:19-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-09-05T17:40:19-07:00
file_name: datasette/app.py
message:
  Workaround for test failure: RuntimeError: There is no current event loop (#1803)

  * Remove ensure_eventloop hack
  * Hack to recover from intermittent RuntimeError calling asyncio.Lock()


hash: b2b901e8c4b939e50ee1117ffcd2881ed8a8e3bf
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-09-05T17:05:23-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-09-05T17:09:57-07:00
file_name: tests/test_spatialite.py
message:
  Skip SpatiaLite test if no conn.enable_load_extension()

  Ran into this problem while working on #1802


hash: 30c88e3570ba3febf232c7ad429d7045ea8a9915
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-03-28T23:12:05-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-03-28T23:12:05-07:00
file_name: setup.py
message:
  Bump black from 22.12.0 to 23.3.0 (#2047)

  Bumps [black](https://github.com/psf/black) from 22.12.0 to 23.3.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/22.12.0...23.3.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-major
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: 294ecd45f7801971dbeef383d0c5456ee95ab839
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-09-05T11:51:51-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-09-05T11:51:51-07:00
file_name: setup.py
message:
  Bump black from 22.6.0 to 22.8.0 (#1797)

  Bumps [black](https://github.com/psf/black) from 22.6.0 to 22.8.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/22.6.0...22.8.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 51030df1869b3b574dd3584d1563415776b9cd4e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-09-05T11:35:40-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-09-05T11:35:40-07:00
file_name: setup.py
message:
  Don't use upper bound dependencies any more

  See https://iscinumpy.dev/post/bound-version-constraints/ for the rationale behind this change.

  Closes #1800


hash: ba35105eee2d3ba620e4f230028a02b2e2571df2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-08-23T17:11:45-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-08-23T17:11:45-07:00
file_name: .github/workflows/test.yml
message:
  Test `--load-extension` in GitHub Actions (#1792)

  * Run the --load-extension test, refs #1789
  * Ran cog, refs #1789


hash: 663ac431fe7202c85967568d82b2034f92b9aa43
author_name: Manuel Kaufmann
author_email: humitos@gmail.com
author_date: 2022-08-20T02:04:16+02:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-08-19T17:04:16-07:00
file_name: .github/workflows/documentation-links.yml
message:
  Use Read the Docs action v1 (#1778)

  Read the Docs repository was renamed from `readthedocs/readthedocs-preview` to `readthedocs/actions/`. Now, the `preview` action is under `readthedocs/actions/preview` and is tagged as `v1`


hash: 22354c48ce4d514d7a1b321e5651c7f1340e3f5e
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-07-17T18:06:37-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-07-17T18:06:37-07:00
file_name: setup.py
message:
  Update pytest-asyncio requirement from <0.19,>=0.17 to >=0.17,<0.20 (#1769)

  Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
  - [Changelog](https://github.com/pytest-dev/pytest-asyncio/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.17.0...v0.19.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-asyncio
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: ea6161f8475d9fa41c4879049511c58f692cce04
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-07-17T18:06:26-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-07-17T18:06:26-07:00
file_name: setup.py
message:
  Bump furo from 2022.4.7 to 2022.6.21 (#1760)

  Bumps [furo](https://github.com/pradyunsg/furo) from 2022.4.7 to 2022.6.21.
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2022.04.07...2022.06.21)

  ---
  updated-dependencies:
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 9f1eb0d4eac483b953392157bd9fd6cc4df37de7
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-06-28T10:40:24-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-06-28T10:40:24-07:00
file_name: setup.py
message:
  Bump black from 22.1.0 to 22.6.0 (#1763)

  Bumps [black](https://github.com/psf/black) from 22.1.0 to 22.6.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/22.1.0...22.6.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: e780b2f5d662ef3579d801d33567440055d4e84d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-06-20T10:54:23-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-06-20T10:54:23-07:00
file_name: docs/facets.rst
message:
  Trying out one-sentence-per-line

  As suggested here: https://sive.rs/1s

  Markdown and reStructuredText will display this as if it is a single paragraph, even though the sentences themselves are separated by newlines.

  This could result in more useful diffs. Trying it out on this page first.


hash: 2e9751672d4fe329b3c359d5b7b1992283185820
author_name: Naveen
author_email: 172697+naveensrinivasan@users.noreply.github.com
author_date: 2022-05-31T14:28:40-05:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-05-31T12:28:40-07:00
file_name: .github/workflows/deploy-latest.yml
message:
  chore: Set permissions for GitHub actions (#1740)

  Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

  - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

  https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

  https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

  [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

  Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>


hash: 3f00a29141bdea5be747f6d1c93871ccdb792167
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-05-02T13:15:27-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-05-02T13:15:27-07:00
file_name: datasette/app.py
message:
  Clean up compatibility with Pyodide (#1736)

  * Optional uvicorn import for Pyodide, refs #1733
  * --setting num_sql_threads 0 to disable threading, refs #1735


hash: 86e4b3d33685a31668bd4ecc56e403e419940fe6
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-04-30T08:10:55-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-04-30T08:10:55-07:00
file_name: .github/workflows/deploy-latest.yml
message:
  1-0-alpha branch with preview of TableView ?_extra=, refs #1729

  The tests don't pass yet but this will let me deploy a preview using
  the mechanism from ##1442


hash: 3001e1e394b6cb605c2cd81eed671a7da419c1b3
author_name: Tim Sherratt
author_email: tim@discontents.com.au
author_date: 2022-04-25T00:03:08+10:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-04-24T07:03:08-07:00
file_name: datasette/publish/cloudrun.py
message:
  Add timeout option to Cloudrun build (#1717)

  * Add timeout option for build phase
  * Make the --timeout setting optional
  * Add test for --timeout setting

  Thanks, @wragge


hash: 138e4d9a53e3982137294ba383303c3a848cfca4
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-04-08T16:05:09-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-04-08T16:05:09-07:00
file_name: setup.py
message:
  Update click requirement from <8.1.0,>=7.1.1 to >=7.1.1,<8.2.0 (#1694)

  Updates the requirements on [click](https://github.com/pallets/click) to permit the latest version.
  - [Release notes](https://github.com/pallets/click/releases)
  - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
  - [Commits](https://github.com/pallets/click/compare/7.1.1...8.1.0)

  ---
  updated-dependencies:
  - dependency-name: click
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 247e460e08bf823142f7b84058fe44e43626787f
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-04-08T15:51:04-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-04-08T15:51:04-07:00
file_name: setup.py
message:
  Update beautifulsoup4 requirement (#1703)

  Updates the requirements on [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/bs4/) to permit the latest version.

  ---
  updated-dependencies:
  - dependency-name: beautifulsoup4
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: b21839dd1a005f6269c4e9a9f763195fe7aa9c86
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-03-05T17:30:05-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-05T17:30:05-08:00
file_name: setup.py
message:
  Update pytest requirement from <6.3.0,>=5.2.2 to >=5.2.2,<7.1.0 (#1629)

  Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest/releases)
  - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...7.0.0)

  ---
  updated-dependencies:
  - dependency-name: pytest
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 77a904fea14f743560af9cc668146339bdbbd0a9
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-03-15T11:03:01-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-15T11:03:01-07:00
file_name: setup.py
message:
  Update pytest requirement from <7.1.0,>=5.2.2 to >=5.2.2,<7.2.0 (#1656)

  Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest/releases)
  - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...7.1.0)

  ---
  updated-dependencies:
  - dependency-name: pytest
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 1baa030eca375f839f3471237547ab403523e643
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-07T07:38:29-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-07T07:38:29-08:00
file_name: datasette/url_builder.py
message:
  Switch to dash encoding for table/database/row-pk in paths

  * Dash encoding functions, tests and docs, refs #1439
  * dash encoding is now like percent encoding but with dashes
  * Use dash-encoding for row PKs and ?_next=, refs #1439
  * Use dash encoding for table names, refs #1439
  * Use dash encoding for database names, too, refs #1439

  See also https://simonwillison.net/2022/Mar/5/dash-encoding/


hash: de810f49cc57a4f88e4a1553d26c579253ce4531
author_name: Dan Peterson
author_email: danp@danp.net
author_date: 2022-03-06T15:39:15-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-06T11:39:15-08:00
file_name: datasette/utils/__init__.py
message:
  Add /opt/homebrew to where spatialite extension can be found (#1649)

  Helps homebrew on Apple Silicon setups find spatialite without needing
  a full path.

  Similar to #1114

  Thanks, @danp


hash: d2e3fe3facf0ed0abf8b00cd54463af90dd6904d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-06T10:53:25-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-06T10:53:25-08:00
file_name: datasette/utils/__init__.py
message:
  dash encoding is now like percent encoding but with dashes

  Refs https://github.com/simonw/datasette/issues/1439#issuecomment-1059851259


hash: 7b78279b93b6e7a5fce6b53e5a85ca421a801496
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-03-05T17:41:49-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-05T17:41:49-08:00
file_name: setup.py
message:
  Update pytest-timeout requirement from <2.1,>=1.4.2 to >=1.4.2,<2.2 (#1602)

  Updates the requirements on [pytest-timeout](https://github.com/pytest-dev/pytest-timeout) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-timeout/releases)
  - [Commits](https://github.com/pytest-dev/pytest-timeout/compare/1.4.2...2.1.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-timeout
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 73f2d25f70d741c6b53f7312674c91f0aec83e17
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-03-05T17:30:27-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-05T17:30:27-08:00
file_name: setup.py
message:
  Update asgiref requirement from <3.5.0,>=3.2.10 to >=3.2.10,<3.6.0 (#1610)

  Updates the requirements on [asgiref](https://github.com/django/asgiref) to permit the latest version.
  - [Release notes](https://github.com/django/asgiref/releases)
  - [Changelog](https://github.com/django/asgiref/blob/main/CHANGELOG.txt)
  - [Commits](https://github.com/django/asgiref/compare/3.2.10...3.5.0)

  ---
  updated-dependencies:
  - dependency-name: asgiref
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 03cc697b6b3d0983618c29ee75b45b5e0ac91139
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-24T15:22:39-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-24T15:22:39-07:00
file_name: setup.py
message:
  Update pytest-asyncio requirement from <0.16,>=0.10 to >=0.10,<0.17 (#1494)

  Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
  - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.10.0...v0.16.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-asyncio
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: a22ec96c3ac555337eb49121450723a273fb52d1
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-03-05T17:29:53-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-03-05T17:29:53-08:00
file_name: setup.py
message:
  Update pytest-asyncio requirement from <0.17,>=0.10 to >=0.10,<0.19 (#1631)

  Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
  - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.10.0...v0.18.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-asyncio
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 7d24fd405f3c60e4c852c5d746c91aa2ba23cf5b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-02-09T09:47:54-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-02-09T09:47:54-08:00
file_name: docs/plugin_hooks.rst
message:
  datasette-auth-passwords is now an example of register_commands

  Refs https://github.com/simonw/datasette-auth-passwords/issues/19


hash: b5e6b1a9e1332fca3effe45d55dd06ee4249f163
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2022-02-02T14:23:51-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2022-02-02T14:23:51-08:00
file_name: setup.py
message:
  Bump black from 21.12b0 to 22.1.0 (#1616)

  Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits/22.1.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 35cba9e85a574cebf2986b64107fa84d02bd86ad
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-12-17T15:08:28-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-12-17T15:08:28-08:00
file_name: setup.py
message:
  Update janus requirement from <0.8,>=0.6.2 to >=0.6.2,<1.1 (#1562)

  Updates the requirements on [janus](https://github.com/aio-libs/janus) to permit the latest version.
  - [Release notes](https://github.com/aio-libs/janus/releases)
  - [Changelog](https://github.com/aio-libs/janus/blob/master/CHANGES.rst)
  - [Commits](https://github.com/aio-libs/janus/compare/v0.6.2...v1.0.0)

  ---
  updated-dependencies:
  - dependency-name: janus
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: aa7f0037a46eb76ae6fe9bf2a1f616c58738ecdf
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-12-17T11:02:14-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-12-17T11:02:14-08:00
file_name: datasette/filters.py
message:
  filters_from_request plugin hook, now used in TableView

  - New `filters_from_request` plugin hook, closes #473
  - Used it to extract the logic from TableView that handles `_search` and
  `_through` and `_where` - refs #1518

  Also needed for this plugin work: https://github.com/simonw/datasette-leaflet-freedraw/issues/7


hash: 4f02c8d4d7f8672cc98e5f8d435b5dc8fb5211dc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-12-14T12:28:34-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-12-14T12:29:05-08:00
file_name: tests/test_internals_request.py
message:
  Test for JSON in query_string name, refs #621

  Plus simplified implementation of test_request_blank_values


hash: f5538e7161cce92a4dfaa7c5b71fcb6755d96c05
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-12-13T15:22:29-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-12-13T15:22:29-08:00
file_name: setup.py
message:
  Bump black from 21.11b1 to 21.12b0 (#1543)

  Bumps [black](https://github.com/psf/black) from 21.11b1 to 21.12b0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 8b411a6b70e93e044820d613a28607ba5d6fe416
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-12-13T15:22:21-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-12-13T15:22:21-08:00
file_name: setup.py
message:
  Update pytest-xdist requirement from <2.5,>=2.2.1 to >=2.2.1,<2.6 (#1548)

  Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
  - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.2.1...v2.5.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-xdist
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 83eb29deced2430f40c3374ff9085d65d86d8281
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-11-29T18:37:13-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-11-29T18:37:13-08:00
file_name: setup.py
message:
  Update janus requirement from <0.7,>=0.6.2 to >=0.6.2,<0.8 (#1529)

  Updates the requirements on [janus](https://github.com/aio-libs/janus) to permit the latest version.
  - [Release notes](https://github.com/aio-libs/janus/releases)
  - [Changelog](https://github.com/aio-libs/janus/blob/master/CHANGES.rst)
  - [Commits](https://github.com/aio-libs/janus/compare/v0.6.2...v0.7.0)

  ---
  updated-dependencies:
  - dependency-name: janus
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: cc4c70b3670ce2a85bb883b8d5626574590efe14
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-11-29T18:35:28-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-11-29T18:35:28-08:00
file_name: setup.py
message:
  Bump black from 21.9b0 to 21.11b1 (#1516)

  Bumps [black](https://github.com/psf/black) from 21.9b0 to 21.11b1.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 3303514a52b7170f2f1e598cd9c5f82c22f26e6c
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-11-29T18:35:18-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-11-29T18:35:18-08:00
file_name: docs/readthedocs-requirements.txt
message:
  Update docutils requirement from <0.18 to <0.19 (#1508)

  Updates the requirements on [docutils](http://docutils.sourceforge.net/) to permit the latest version.

  ---
  updated-dependencies:
  - dependency-name: docutils
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 1beb7d939999da79bb77c4d3c777657c8a16bcd9
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-11-29T18:29:54-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-11-29T18:29:54-08:00
file_name: setup.py
message:
  Update aiofiles requirement from <0.8,>=0.4 to >=0.4,<0.9 (#1537)

  Updates the requirements on [aiofiles](https://github.com/Tinche/aiofiles) to permit the latest version.
  - [Release notes](https://github.com/Tinche/aiofiles/releases)
  - [Commits](https://github.com/Tinche/aiofiles/compare/v0.4.0...v0.8.0)

  ---
  updated-dependencies:
  - dependency-name: aiofiles
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: e0a84691c2959f2d1d76948574c9c4a910c7556c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-11-27T12:08:42-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-11-27T12:08:42-08:00
file_name: datasette/utils/__init__.py
message:
  Prototyp of link rel=alternate header for tables

  Refs https://github.com/simonw/datasette-notebook/issues/2


hash: 96a823f2834a262ae97a90ebfb6847f14763c415
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-10-24T15:19:54-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-24T15:19:54-07:00
file_name: .github/workflows/test.yml
message:
  Fix compatibility with Python 3.10 (#1481)

  * Run tests against Python 3.10
  * Upgrade to Janus 0.6.2 for Python 3.10
  * Add 3.10 to classifiers

  Closes #1482


hash: 0fdbf004843850f200e077a3c87427fe16c18b85
author_name: C. Titus Brown
author_email: titus@idyll.org
author_date: 2021-10-14T11:39:55-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-14T11:39:55-07:00
file_name: docs/custom_templates.rst
message:
  Rework the `--static` documentation

  Rework the `--static` documentation to better differentiate between the filesystem and serving locations. Closes #1457

  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: 827fa823d1b919c445f3141174ecb7a82717d99c
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-14T11:10:42-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-14T11:10:42-07:00
file_name: setup.py
message:
  Update pyyaml requirement from ~=5.3 to >=5.3,<7.0 (#1489)

  Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.
  - [Release notes](https://github.com/yaml/pyyaml/releases)
  - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
  - [Commits](https://github.com/yaml/pyyaml/compare/5.3...6.0)

  ---
  updated-dependencies:
  - dependency-name: pyyaml
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: b267b5775436577a91a9f9655143908aecff05da
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-10-14T11:03:44-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-14T11:03:44-07:00
file_name: datasette/app.py
message:
  Upgrade to httpx 0.20

  * Upgrade to httpx 0.20, closes #1488
  * TestClient.post() should not default to following redirects


hash: 2a8c6690399ee832ee62aafdede1794f5945d911
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-13T15:35:36-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-13T15:35:36-07:00
file_name: setup.py
message:
  Update beautifulsoup4 requirement (#1463)

  Updates the requirements on [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) to permit the latest version.

  ---
  updated-dependencies:
  - dependency-name: beautifulsoup4
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: e1012e7098056734d9c90f081493991009253390
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-13T14:47:42-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-13T14:47:42-07:00
file_name: setup.py
message:
  Bump black from 21.7b0 to 21.9b0 (#1471)

  Bumps [black](https://github.com/psf/black) from 21.7b0 to 21.9b0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: a673a93b57e249f06b2d0265ce33f458258feeb0
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-13T14:11:00-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-13T14:11:00-07:00
file_name: setup.py
message:
  Update pluggy requirement from ~=0.13.0 to >=0.13,<1.1 (#1448)

  Updates the requirements on [pluggy](https://github.com/pytest-dev/pluggy) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pluggy/releases)
  - [Changelog](https://github.com/pytest-dev/pluggy/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pluggy/compare/0.13.0...1.0.0)

  ---
  updated-dependencies:
  - dependency-name: pluggy
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 31352914c427162f785d2610222a54a426d5215f
author_name: Michael Tiemann
author_email: 72577720+MichaelTiemannOSC@users.noreply.github.com
author_date: 2021-10-13T17:10:23-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-13T14:10:23-07:00
file_name: docs/full_text_search.rst
message:
  Update full_text_search.rst (#1474)

  Change "above" to "below" to correct correspondence of reference to example.


hash: 5335f360f4d57d70cab3694b08f15729c4ca2fe2
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-06-19T17:17:06-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-19T17:17:06-07:00
file_name: setup.py
message:
  Update pytest-xdist requirement from <2.3,>=2.2.1 to >=2.2.1,<2.4 (#1378)

  Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
  - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.2.1...v2.3.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-xdist
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 6aab0217f07bff4556cc92885a14279d5b295f84
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-13T14:10:03-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-13T14:10:03-07:00
file_name: setup.py
message:
  Update pytest-xdist requirement from <2.4,>=2.2.1 to >=2.2.1,<2.5 (#1476)

  Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
  - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.2.1...v2.4.0)

  ---
  updated-dependencies:
  - dependency-name: pytest-xdist
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 759fd97a54638c1a5e2cac65bac0ac7c07ce2305
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-10-13T14:09:23-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-10-13T14:09:23-07:00
file_name: setup.py
message:
  Update pytest-timeout requirement from <1.5,>=1.4.2 to >=1.4.2,<2.1 (#1485)

  Updates the requirements on [pytest-timeout](https://github.com/pytest-dev/pytest-timeout) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-timeout/releases)
  - [Commits](https://github.com/pytest-dev/pytest-timeout/commits)

  ---
  updated-dependencies:
  - dependency-name: pytest-timeout
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: d84e574e59c51ddcd6cf60a6f9b3d45182daf824
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-08-19T14:09:38-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-08-19T14:09:38-07:00
file_name: .github/workflows/deploy-latest.yml
message:
  Ability to deploy demos of branches

  * Ability to deploy additional branch demos, closes #1442
  * Only run tests before deploy on main branch
  * Documentation for continuous deployment


hash: e7975657656ce02717f03703bb8ec17f2fe9b717
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-06-13T08:33:22-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-13T08:33:22-07:00
file_name: setup.py
message:
  Bump black from 21.5b2 to 21.6b0 (#1374)

  Bumps [black](https://github.com/psf/black) from 21.5b2 to 21.6b0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: a1a33bb5822214be1cebd98cd858b2058d91a4aa
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-08-24T18:29:55-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-08-24T18:29:55-07:00
file_name: setup.py
message:
  Bump black from 21.6b0 to 21.7b0 (#1400)

  Bumps [black](https://github.com/psf/black) from 21.6b0 to 21.7b0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 5161422b7fa249c6b7d6dc47ec6f483d3fdbd170
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-08-24T18:29:26-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-08-24T18:29:26-07:00
file_name: setup.py
message:
  Update trustme requirement from <0.9,>=0.7 to >=0.7,<0.10 (#1433)

  Updates the requirements on [trustme](https://github.com/python-trio/trustme) to permit the latest version.
  - [Release notes](https://github.com/python-trio/trustme/releases)
  - [Commits](https://github.com/python-trio/trustme/compare/v0.7.0...v0.9.0)

  ---
  updated-dependencies:
  - dependency-name: trustme
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 93c3a7ffbfb3378f743ebce87d033cf1ce7689e0
author_name: Tim Sherratt
author_email: tim@discontents.com.au
author_date: 2021-08-25T11:28:58+10:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-08-24T18:28:58-07:00
file_name: docs/full_text_search.rst
message:
  Remove underscore from search mode parameter name (#1447)

  The text refers to the parameter as `searchmode` but the `metadata.json` example uses `search_mode`. The latter doesn't actually seem to work.


hash: 2208c3c68e552d343e6a2872ff6e559fca9d1b38
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-08-03T09:36:38-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-08-03T09:36:38-07:00
file_name: .github/workflows/spellcheck.yml
message:
  Spelling corrections plus CI job for codespell

  * Use codespell to check spelling in documentation, refs #1417
  * Fixed spelling errors spotted by codespell, closes #1417
  * Make codespell a docs dependency

  See also this TIL:  https://til.simonwillison.net/python/codespell


hash: d71cac498138ddd86f18607b9043e70286ea884a
author_name: Aslak Raanes
author_email: aslakr@gmail.com
author_date: 2021-07-13T20:32:49+02:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-07-13T11:32:49-07:00
file_name: docs/deploying.rst
message:
  How to configure Unix domain sockets with Apache

  Example on how to use Unix domain socket option on Apache. Not testet.

  (Usually I would have used [`ProxyPassReverse`](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassreverse) in combination with `ProxyPass` , i.e.

  ```apache
  ProxyPass /my-datasette/ http://127.0.0.1:8009/my-datasette/
  ProxyPassReverse /my-datasette/ http://127.0.0.1:8009/my-datasette/
  ```

  and

  ```apache
  ProxyPass /my-datasette/ unix:/tmp/datasette.sock|http://localhost/my-datasette/
  ProxyPassReverse /my-datasette/ unix:/tmp/datasette.sock|http://localhost/my-datasette/
  ```


hash: f83c84fd51d144036924ae77d99f12b0a69e7e6f
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-07-10T18:36:18-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-07-10T18:36:18-07:00
file_name: setup.py
message:
  Update asgiref requirement from <3.4.0,>=3.2.10 to >=3.2.10,<3.5.0 (#1386)

  Updates the requirements on [asgiref](https://github.com/django/asgiref) to permit the latest version.
  - [Release notes](https://github.com/django/asgiref/releases)
  - [Changelog](https://github.com/django/asgiref/blob/main/CHANGELOG.txt)
  - [Commits](https://github.com/django/asgiref/commits)

  ---
  updated-dependencies:
  - dependency-name: asgiref
    dependency-type: direct:production
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: baf986c871708c01ca183be760995cf306ba21bf
author_name: Brandon Roberts
author_email: brandon@bxroberts.org
author_date: 2021-06-26T15:24:54-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-26T15:24:54-07:00
file_name: .gitignore
message:
  New get_metadata() plugin hook for dynamic metadata

  The following hook is added:

      get_metadata(
        datasette=self, key=key, database=database, table=table,
        fallback=fallback
      )

  This gets called when we're building our metdata for the rest
  of the system to use. We merge whatever the plugins return
  with any local metadata (from metadata.yml/yaml/json) allowing
  for a live-editable dynamic Datasette.

  As a security precation, local meta is *not* overwritable by
  plugin hooks. The workflow for transitioning to live-meta would
  be to load the plugin with the full metadata.yaml and save.
  Then remove the parts of the metadata that you want to be able
  to change from the file.

  * Avoid race condition: don't mutate databases list

  This avoids the nasty "RuntimeError: OrderedDict mutated during
  iteration" error that randomly happens when a plugin adds a
  new database to Datasette, using `add_database`. This change
  makes the add and remove database functions more expensive, but
  it prevents the random explosion race conditions that make for
  confusing user experience when importing live databases.

  Thanks, @brandonrobertz


hash: 953a64467d78bca29fe6cc18bdb2baa7848e53ff
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-06-24T09:42:02-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-24T09:42:02-07:00
file_name: .github/workflows/publish.yml
message:
  Only publish stable docs on non-preview release

  Refs https://github.com/simonw/datasette.io/issues/67


hash: a6c55afe8c82ead8deb32f90c9324022fd422324
author_name: Chris Amico
author_email: eyeseast@gmail.com
author_date: 2021-06-21T11:57:38-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-21T08:57:38-07:00
file_name: datasette/app.py
message:
  Ensure db.path is a string before trying to insert into internal database (#1370)

  Thanks, @eyeseast


hash: 83e9c8bc7585dcc62f200e37c2daefcd669ee05e
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-06-13T08:38:47-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-13T08:38:47-07:00
file_name: setup.py
message:
  Update trustme requirement from <0.8,>=0.7 to >=0.7,<0.9 (#1373)

  Updates the requirements on [trustme](https://github.com/python-trio/trustme) to permit the latest version.
  - [Release notes](https://github.com/python-trio/trustme/releases)
  - [Commits](https://github.com/python-trio/trustme/compare/v0.7.0...v0.8.0)

  ---
  updated-dependencies:
  - dependency-name: trustme
    dependency-type: direct:development
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 0dfb9241718139f8ad626d22aac25bcebd3a9c9c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-06-05T15:55:07-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-05T15:55:07-07:00
file_name: .github/workflows/push_docker_tag.yml
message:
  Temporarily reverting buildx support

  I need to push a container for 0.57 using this action, and I'm not ready to ship other architecture builds until we have tested them in #1344.


hash: 368aa5f1b16ca35f82d90ff747023b9a2bfa27c1
author_name: louispotok
author_email: louispotok@users.noreply.github.com
author_date: 2021-06-06T02:48:51+07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-05T12:48:51-07:00
file_name: docs/settings.rst
message:
  Update docs: explain allow_download setting (#1291)

  * Update docs: explain allow_download setting

  This fixes one possible source of confusion seen in #502 and clarifies
  when database downloads will be shown and allowed.


hash: a63412152518581c6a3d4e142b937e27dabdbfdb
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-06-05T11:59:54-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-05T11:59:54-07:00
file_name: datasette/app.py
message:
  Make custom pages compatible with base_url setting

  Closes #1238

  - base_url no longer causes custom page routing to fail
  - new route_path key in request.scope storing the path that was used for routing with the base_url prefix stripped
  - TestClient used by tests now avoids accidentally double processing of the base_url prefix


hash: 9552414e1f968c6fc704031cec349c05e6bc2371
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-06-01T23:46:20-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-01T20:46:20-07:00
file_name: datasette/renderer.py
message:
  Re-display user's query with an error message if an error occurs (#1346)

  * Ignore _shape when returning errors


hash: 03b35d70e281ea48bd9b8058738ed87b13cea2de
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-06-01T19:56:44-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-06-01T19:56:44-07:00
file_name: setup.py
message:
  Bump black from 21.5b1 to 21.5b2 (#1352)

  Bumps [black](https://github.com/psf/black) from 21.5b1 to 21.5b2.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: f1c29fd6a184254aa68efadf096bcf21e848f921
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-05-26T21:17:43-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-05-26T21:17:43-07:00
file_name: datasette/static/table.js
message:
  ?_col=/?_nocol= to show/hide columns on the table page

  Closes #615

  * Cog icon for hiding columns
  * Show all columns cog menu item
  * Do not allow hide column on primary keys
  * Allow both ?_col= and ?_nocol=
  * De-duplicate if ?_col= passed multiple times
  * 400 error if user tries to ?_nocol= a primary key
  * Documentation for ?_col= and ?_nocol=


hash: 5e9672c9bb33e41686472db4aa427168f9e67dbe
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-05-22T16:55:39-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-05-22T16:55:39-07:00
file_name: setup.py
message:
  Bump black from 21.4b2 to 21.5b1 (#1321)

  Bumps [black](https://github.com/psf/black) from 21.4b2 to 21.5b1.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 5c3b3ef97eed55895cf48d4a9ee0635c1c4d03b8
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-05-22T16:54:48-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-05-22T16:54:48-07:00
file_name: setup.py
message:
  Update click requirement from ~=7.1.1 to >=7.1.1,<8.1.0 (#1323)

  Updates the requirements on [click](https://github.com/pallets/click) to permit the latest version.
  - [Release notes](https://github.com/pallets/click/releases)
  - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
  - [Commits](https://github.com/pallets/click/compare/7.1.1...8.0.0)

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: b64d87204612a84663616e075f542499a5d82a03
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-05-22T16:54:24-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-05-22T16:54:24-07:00
file_name: setup.py
message:
  Update itsdangerous requirement from ~=1.1 to >=1.1,<3.0 (#1325)

  Updates the requirements on [itsdangerous](https://github.com/pallets/itsdangerous) to permit the latest version.
  - [Release notes](https://github.com/pallets/itsdangerous/releases)
  - [Changelog](https://github.com/pallets/itsdangerous/blob/main/CHANGES.rst)
  - [Commits](https://github.com/pallets/itsdangerous/compare/1.1.0...2.0.0)

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 593d3e8173b45e20ff3c95afb3df7ceb85bf7fef
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-05-22T16:53:56-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-05-22T16:53:56-07:00
file_name: setup.py
message:
  Update aiofiles requirement from <0.7,>=0.4 to >=0.4,<0.8 (#1330)

  Updates the requirements on [aiofiles](https://github.com/Tinche/aiofiles) to permit the latest version.
  - [Release notes](https://github.com/Tinche/aiofiles/releases)
  - [Commits](https://github.com/Tinche/aiofiles/compare/v0.4.0...v0.7.0)

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 9b3b7e280ca718254b4ca15d40864297146a85b3
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2021-05-17T10:19:40-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-05-17T10:19:40-07:00
file_name: setup.py
message:
  Update jinja2 requirement from <2.12.0,>=2.10.3 to >=2.10.3,<3.1.0 (#1324)

  Updates the requirements on [jinja2](https://github.com/pallets/jinja) to permit the latest version.
  - [Release notes](https://github.com/pallets/jinja/releases)
  - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
  - [Commits](https://github.com/pallets/jinja/compare/2.10.3...3.0.0)

  Signed-off-by: dependabot[bot] <support@github.com>

  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 1b697539f5b53cec3fe13c0f4ada13ba655c88c7
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2021-04-29T08:47:49-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-04-29T08:47:49-07:00
file_name: setup.py
message:
  Bump black from 20.8b1 to 21.4b2 (#1313)

  Bumps [black](https://github.com/psf/black) from 20.8b1 to 21.4b2.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
  - [Commits](https://github.com/psf/black/commits)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 5e60bad40460f68122006ce704cfc163d6076f34
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2021-04-29T08:47:21-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-04-29T08:47:21-07:00
file_name: .github/dependabot.yml
message:
  Upgrade to GitHub-native Dependabot (#1314)

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 6ed9238178a56da5fb019f37fb1e1e15886be1d1
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2021-04-19T11:18:17-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-04-19T11:18:17-07:00
file_name: setup.py
message:
  Update pytest-asyncio requirement from <0.15,>=0.10 to >=0.10,<0.16 (#1303)

  Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
  - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.10.0...v0.15.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 0a7621f96f8ad14da17e7172e8a7bce24ef78966
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-04-02T20:42:28-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-04-02T20:42:28-07:00
file_name: .github/workflows/test.yml
message:
  Use pytest-xdist to speed up tests (#1290)

  * Run tests in CI using pytest-xdist
  * Documentation for pytest-xdist

  Closes #1289


hash: 87b583a128986982552421d2510e467e74ac5046
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-04-02T13:20:51-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-04-02T13:20:51-07:00
file_name: README.md
message:
  Clearer help text for --reload

  Immutable databases are not commonly used, but it's useful to clarify
  that --reload will pick up on changes to metadata.


hash: af5a7f1c09f6a902bb2a25e8edf39c7034d2e5de
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-03-28T17:41:12-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-03-28T17:41:12-07:00
file_name: datasette/version.py
message:
  Release 0.56

  Refs #1005, #1031, #1141, #1229, #1236, #1239, #1246, #1247, #1252, #1266, #1276, #1278


hash: f92d823766872a6fd7e76c5249a6b2de1ab0f447
author_name: Campbell Allen
author_email: campbell.allen@gmail.com
author_date: 2021-03-29T01:17:31+01:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-03-28T17:17:31-07:00
file_name: datasette/app.py
message:
  ensure immutable databses when starting in configuration directory mode with (#1229)

  * check if immutables is empty list of None
  * update docs on how to create the inspect-data.json


hash: e72397d65b06b019521b6411243687464ac8d8ca
author_name: Bob Whitelock
author_email: bob.whitelock1@gmail.com
author_date: 2021-03-29T01:14:04+01:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-03-28T17:14:04-07:00
file_name: datasette/static/app.css
message:
  Add styling to lists within table cells (fixes #1141) (#1252)

  This overrides the Datasette reset (see
  https://github.com/simonw/datasette/blob/d0fd833b8cdd97e1b91d0f97a69b494895d82bee/datasette/static/app.css#L35-L38),
  to add back the default styling of list items displayed within Datasette
  table cells.


hash: 8e18c7943181f228ce5ebcea48deb59ce50bee1f
author_name: Konstantin Baikov
author_email: 4488943+kbaikov@users.noreply.github.com
author_date: 2021-03-11T17:15:49+01:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-03-11T08:15:49-08:00
file_name: datasette/app.py
message:
  Use context manager instead of plain open (#1211)

  Context manager with open closes the files after usage.

  When the object is already a pathlib.Path i used read_text
  write_text functions

  In some cases pathlib.Path.open were used in context manager,
  it is basically the same as builtin open.

  Thanks, Konstantin Baikov!


hash: d0fd833b8cdd97e1b91d0f97a69b494895d82bee
author_name: Bob Whitelock
author_email: bob.whitelock1@gmail.com
author_date: 2021-03-07T07:41:17Z
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-03-06T23:41:17-08:00
file_name: Dockerfile
message:
  Add compile option to Dockerfile to fix failing test (fixes #696) (#1223)

  This test was failing when run inside the Docker container:
  `test_searchable[/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw-expected_rows3]`,

  with this error:

  ```
      def test_searchable(app_client, path, expected_rows):
          response = app_client.get(path)
  >       assert expected_rows == response.json["rows"]
  E       AssertionError: assert [[1, 'barry c...sel', 'puma']] == []
  E         Left contains 2 more items, first extra item: [1, 'barry cat', 'terry dog', 'panther']
  E         Full diff:
  E         + []
  E         - [[1, 'barry cat', 'terry dog', 'panther'],
  E         -  [2, 'terry dog', 'sara weasel', 'puma']]
  ```

  The issue was that the version of sqlite3 built inside the Docker
  container was built with FTS3 and FTS4 enabled, but without the
  `SQLITE_ENABLE_FTS3_PARENTHESIS` compile option passed, which adds
  support for using `AND` and `NOT` within `match` expressions (see
  https://sqlite.org/fts3.html#compiling_and_enabling_fts3_and_fts4 and
  https://www.sqlite.org/compile.html).

  Without this, the `AND` used in the search in this test was being
  interpreted as a literal string, and so no matches were found. Adding
  this compile option fixes this.

  Thanks, @bobwhitelock


hash: 6f41c8a2bef309a66588b2875c3e24d26adb4850
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-02-18T14:09:12-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-02-18T14:09:12-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  --crossdb option for joining across databases (#1232)

  * Test for cross-database join, refs #283
  * Warn if --crossdb used with more than 10 DBs, refs #283
  * latest.datasette.io demo of --crossdb joins, refs #283
  * Show attached databases on /_memory page, refs #283
  * Documentation for cross-database queries, refs #283


hash: 0b9ac1b2e9c855f1b823a06a898891da87c720ef
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-01-25T09:33:29-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-01-25T09:33:29-08:00
file_name: datasette/version.py
message:
  Release 0.54

  Refs #509, #1091, #1150, #1151, #1166, #1167, #1178, #1181, #1182, #1184, #1185, #1186, #1187, #1194, #1198


hash: a5ede3cdd455e2bb1a1fb2f4e1b5a9855caf5179
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-01-24T21:13:05-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-01-24T21:13:05-08:00
file_name: datasette/url_builder.py
message:
  Fixed bug loading database called 'test-database (1).sqlite'

  Closes #1181.

  Also now ensures that database URLs have special characters URL-quoted.


hash: 57f4d7b82f9c74298c67c5640207241925b70c02
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-01-19T12:47:30-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-01-19T12:47:30-08:00
file_name: datasette/version.py
message:
  Release 0.54a0

  Refs #1091, #1145, #1151, #1156, #1157, #1158, #1166, #1170, #1178, #1182, #1184, #1185, #1186, #1187


hash: ef2ecc1b8987d10d375e350a51d1339172a07c55
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-01-11T13:33:54-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-01-11T13:33:54-08:00
file_name: docs/binary_data.rst
message:
  Standardize on 'query string', not 'querystring', in docs

  The request property is request.query_string so this is more consistent.


hash: 3054e0f7307da4c31850b74bd73238b33d6c750a
author_name: Ben Pickles
author_email: spideryoung@gmail.com
author_date: 2021-01-04T19:52:33Z
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2021-01-04T11:52:33-08:00
file_name: .github/workflows/prettier.yml
message:
  Install Prettier via package.json (#1170)

  * Error if Prettier isn't already installed
  * Temporarily run Prettier check on every commit
  * Install and run Prettier via package.json
  * Trigger another prettier check on CI


hash: a882d679626438ba0d809944f06f239bcba8ee96
author_name: Miroslav Šedivý
author_email: 6774676+eumiro@users.noreply.github.com
author_date: 2020-12-23T18:04:32+01:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-12-23T09:04:32-08:00
file_name: datasette/app.py
message:
  Modernize code to Python 3.6+ (#1158)

  * Compact dict and set building
  * Remove redundant parentheses
  * Simplify chained conditions
  * Change method name to lowercase
  * Use triple double quotes for docstrings

  Thanks, @eumiro!


hash: 8919f99c2f7f245aca7f94bd53d5ac9d04aa42b5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-12-22T12:04:18-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-12-22T12:04:18-08:00
file_name: datasette/app.py
message:
  Improved .add_database() method design

  Closes #1155 - _internal now has a sensible name

  Closes #509 - Support opening multiple databases with the same stem


hash: 270de6527bc2afb8c5996c400099321c320ded31
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-12-22T11:48:54-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-12-22T11:48:54-08:00
file_name: datasette/utils/internal_db.py
message:
  Foreign keys for _internal database

  Refs #1099 - Datasette now uses compound foreign keys internally,
  so it would be great to link them correctly.


hash: 6119bd797366a899119f1bba51c1c8cba2efc8fc
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-12-16T13:44:39-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-12-16T13:44:39-08:00
file_name: setup.py
message:
  Update pytest requirement from <6.2.0,>=5.2.2 to >=5.2.2,<6.3.0 (#1145)

  Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest/releases)
  - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...6.2.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 705d1a1555c4791e9be3b884285b047223ab184f
author_name: Abdussamet Koçak
author_email: abdus@abdus.dev
author_date: 2020-12-05T22:35:03+03:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-12-05T11:35:03-08:00
file_name: datasette/utils/asgi.py
message:
  Fix startup error on windows (#1128)

  Fixes https://github.com/simonw/datasette/issues/1094

  This import isn't used at all, and causes error on startup on Windows.


hash: 88ac538b41a4753c3de9b509c3a0e13077f66182
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-12-02T15:47:37-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-12-02T15:47:37-08:00
file_name: datasette/views/database.py
message:
  transfer-encoding: chunked for DB downloads, refs #749

  This should get >32MB downloads working on Cloud Run.


hash: a970276b9999687b96c5e11ea1c817d814f5d267
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-11-30T17:19:09-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-11-30T17:19:09-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  Try pysqlite3 on latest.datasette.io

  --install=pysqlite3-binary to get a working demo of generated columns, refs #1119


hash: 461670a0b87efa953141b449a9a261919864ceb3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-11-30T13:29:57-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-11-30T13:29:57-08:00
file_name: datasette/utils/__init__.py
message:
  Support for generated columns

  * Support for generated columns, closes #1116
  * Show SQLite version in pytest report header
  * Use table_info() if SQLite < 3.26.0
  * Cache sqlite_version() rather than re-calculate every time
  * Adjust test_database_page for SQLite 3.26.0 or higher


hash: dea3c508b39528e566d711c38a467b3d372d220b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-11-30T12:09:22-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-11-30T12:09:32-08:00
file_name: datasette/utils/__init__.py
message:
  Revert "Support for generated columns, closes #1116" - it failed CI

  This reverts commit 37f87b5e52e7f8ddd1c4ffcf368bd7a62a406a6d.


hash: 5a77f7a6494c74372bedfef6185e1beed7bea5dc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-11-24T13:22:33-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-11-24T13:22:33-08:00
file_name: .github/workflows/deploy-latest.yml
message:
  Updated docs renaming config to settings

  - config.html is now settings.html
  - ConfigOption in app.py is now Setting
  - updated documentation unit tests

  Refs #1106


hash: 30e64c8d3b3728a86c3ca42a75322cc3feb5b0c8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-11-15T15:24:22-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-11-15T15:24:22-08:00
file_name: datasette/app.py
message:
  Use f-strings in place of .format()

  Code transformed like so:

      pip install flynt
      flynt .
      black .


hash: d53d747e6a9dbc294c0565bc5eefe9aa16989316
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-31T15:13:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-31T15:21:49-07:00
file_name: README.md
message:
  Release 0.51

  Refs #1014, #1016, #1019, #1023, #1027, #1028, #1033, #1034, #1036, #1039

  Closes #1076


hash: 11eb1e026f3d84cb771f8d6e204939cbaee130cd
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-31T11:16:28-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-31T11:16:28-07:00
file_name: datasette/app.py
message:
  datasette.urls.table(..., format="json"), closes #1035

  Also improved tests for datasette.urls and added format= to some other methods


hash: f0a740ac21cba11ded8717f49d664f9549cd2f83
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-31T09:21:22-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-31T09:21:22-07:00
file_name: datasette/app.py
message:
  Remove load_plugin hook - closes #1073

  Refs #1042

  This reverts commit 81dea4b07ab2b6f4eaaf248307d2b588472054a1.


hash: 0cb29498c796267c5e4a5545ede8058b7ca03a94
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-30T10:54:47-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-30T10:54:47-07:00
file_name: datasette/views/base.py
message:
  Fixed bug with python tests/fixtures.py

  https://github.com/simonw/datasette/runs/1333357885?check_suite_focus=true


hash: 0e1e89c6ba3d0fbdb0823272952cf356f3016def
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-29T22:34:52-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-29T22:35:23-07:00
file_name: datasette/version.py
message:
  Release 0.51a1

  Refs #1056, #1039, #998, #1045, #1033, #1036, #1034, #976, #1057, #1058, #1053, #1064, #1066


hash: 561c1d2d36a89675764e4410a2a127323402eaa3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-29T20:51:37-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-29T20:51:37-07:00
file_name: datasette/app.py
message:
  Show logout link if they are logged in AND have ds_actor cookie

  Otherwise an expired cookie will still cause the logout link to show.


hash: 78b3eeaad9189eb737014f53212082684f4bb0d4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-29T15:01:38-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-29T15:01:38-07:00
file_name: datasette/app.py
message:
  .blob output renderer

  * _blob_hash= checking plus refactored to use new BadRequest class, refs #1050
  * Replace BlobView with new .blob renderer, closes #1050
  * .blob downloads on arbitrary queries, closes #1051


hash: 879617265262024edd93722adcdcb6c21e57f5f7
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-10-28T10:08:27-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-28T10:08:27-07:00
file_name: setup.py
message:
  Update aiofiles requirement from <0.6,>=0.4 to >=0.4,<0.7 (#1059)

  Updates the requirements on [aiofiles](https://github.com/Tinche/aiofiles) to permit the latest version.
  - [Release notes](https://github.com/Tinche/aiofiles/releases)
  - [Commits](https://github.com/Tinche/aiofiles/compare/v0.4.0...v0.6.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 10c35bd371faaa0f3c98067c08f26334c9f5ea52
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-24T13:03:40-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-24T13:03:40-07:00
file_name: datasette/app.py
message:
  urls.static_plugins() method, closes #1033

  Also documented how to package static assets and templates in plugins, closes #575


hash: d0cc6f4c32e1f89238ddec782086b3122f445bd4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-21T21:57:00-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-21T21:57:00-07:00
file_name: .github/workflows/deploy-latest.yml
message:
  Use sphinx-to-sqlite==0.1a1

  To address this bug: https://github.com/simonw/sphinx-to-sqlite/issues/2


hash: b0b04bb7c185bed9bdbb9a3f3f24f264999296b6
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-18T11:37:35-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-18T11:37:35-07:00
file_name: .readthedocs.yml
message:
  Delete .readthedocs.yml

  It worked fine without configuration, and my attempt to build the xml version failed with an error message:

      Problem in your project's configuration. Invalid "formats": expected one of (htmlzip, pdf, epub), got xml


hash: 4f7c0ebd85ccd8c1853d7aa0147628f7c1b749cc
author_name: Jacob Fenton
author_email: jsfenfen@gmail.com
author_date: 2020-10-14T16:46:46-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-14T16:46:46-07:00
file_name: docs/spatialite.rst
message:
  Fix table name in spatialite example command (#1022)

  The example query for creating a new point geometry seems to be using a table called 'museums' but at one point it instead uses 'events'. I *believe* it is intended to be museums.


hash: 7f2edb5dd2074dce0090659021991695a984844b
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-10-14T14:52:07-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-14T14:52:07-07:00
file_name: setup.py
message:
  Update janus requirement from <0.6,>=0.4 to >=0.4,<0.7 (#1017)

  Updates the requirements on [janus](https://github.com/aio-libs/janus) to permit the latest version.
  - [Release notes](https://github.com/aio-libs/janus/releases)
  - [Changelog](https://github.com/aio-libs/janus/blob/master/CHANGES.rst)
  - [Commits](https://github.com/aio-libs/janus/compare/v0.4.0...v0.6.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: b4a8e70957517ff44d6a9121422d266a3c5fd664
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-10-14T14:51:34-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-14T14:51:34-07:00
file_name: setup.py
message:
  Update asgiref requirement from ~=3.2.10 to >=3.2.10,<3.4.0 (#1018)

  Updates the requirements on [asgiref](https://github.com/django/asgiref) to permit the latest version.
  - [Release notes](https://github.com/django/asgiref/releases)
  - [Changelog](https://github.com/django/asgiref/blob/master/CHANGELOG.txt)
  - [Commits](https://github.com/django/asgiref/compare/3.2.10...3.3.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 8f97b9b58e77f82fef1f10e9c9f6754b993544b6
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-09T09:11:24-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-09T09:11:24-07:00
file_name: datasette/app.py
message:
  datasette.client internal requests mechanism

  Closes #943

  * Datasette now requires httpx>=0.15
  * Support OPTIONS without 500, closes #1001
  * Added internals tests for datasette.client methods
  * Datasette's own test mechanism now uses httpx to simulate requests
  * Tests simulate HTTP 1.1 now
  * Added base_url in a bunch more places
  * Mark some tests as xfail - will remove that when new httpx release ships: #1005


hash: 703439bdc37e724b01bc6d7a1fc1d955795132f2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-08T16:50:43-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-08T16:50:43-07:00
file_name: docs/deploying.rst
message:
  Don't suggest datasette-graphql in bulidpacks demo

  Refs #997 - it's not a great suggestion because the fivethirtyeight.db
  database has so many tables.


hash: ca5ba6b77b4c973fa7ba91008a2e99debfa306b4
author_name: Geoffrey Hing
author_email: geoffhing@gmail.com
author_date: 2020-10-06T11:25:37-05:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-10-06T09:25:37-07:00
file_name: docs/publish.rst
message:
  Document setting Google Cloud SDK properties (#995)

  Document setting Google Cloud SDK properties to avoid having to respond to interactive prompts when running `datasette publish cloudrun`.

  Thanks, @ghing!


hash: 5a184a5d211d3226e0417ee5cf8476cd887cd35e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-10-05T17:32:10-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-10-05T17:32:10-07:00
file_name: datasette/database.py
message:
  Display column type in column action menu, closes #993

  Also added new documented db.table_column_details() introspection method.


hash: 0f2626868bd635f44f2c04d57a5e8ced1229737e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-09-30T16:01:19-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-09-30T16:01:37-07:00
file_name: datasette/static/table.js
message:
  Much improved column menu display logic, refs #981

  * Menu links now take into account existing querystring
  * No longer shows facet option for primary key columns
  * Conditionally displays sort/sort-desc if already sorted
  * Does not show facet option if already faceted by this


hash: c5c12a797f0b81cd5862dcd50354b4b571e9bf5a
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-07-29T14:26:03-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-07-29T14:26:03-07:00
file_name: setup.py
message:
  Update pytest requirement from <5.5.0,>=5.2.2 to >=5.2.2,<6.1.0 (#910)

  Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest/releases)
  - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...6.0.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 1f021c37110fc9019b0ef70062c28c335e568ae2
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-09-28T15:16:34-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-09-28T15:16:34-07:00
file_name: setup.py
message:
  Update pytest requirement from <6.1.0,>=5.2.2 to >=5.2.2,<6.2.0 (#977)

  Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest/releases)
  - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...6.1.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: d0c752d50c9ddd1d094a26837347c970a9b34872
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-09-07T08:43:37-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-09-07T08:43:37-07:00
file_name: datasette/templates/patterns.html
message:
  Fixed a couple of tiny HTML bugs, thanks curlylint

      curlylint datasette/templates

  https://github.com/thibaudcolas/curlylint


hash: 5e0b72247ecab4ce0fcec599b77a83d73a480872
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-08-17T22:09:34-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-08-17T22:09:34-07:00
file_name: .dockerignore
message:
  Run CI on GitHub Actions, not Travis

  * Run CI on GitHub Actions, not Travis - refs #940
  * Update documentation refs to Travis
  * Release action now runs parallel tests, then pushes to PyPI, then Docker Hub


hash: b86f94883b1d827f85b07009e8346b8e9c6eeefa
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-08-15T15:35:31-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-08-15T15:35:31-07:00
file_name: datasette/database.py
message:
  Don't hang in db.execute_write_fn() if connection fails

  Closes #935

  Refs https://github.com/simonw/latest-datasette-with-all-plugins/issues/3


hash: 1a805288abe8d155b6dad227221e5f70311d06c3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-08-11T17:31:53-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-08-11T17:31:56-07:00
file_name: docs/installation.rst
message:
  Updating homebrew plugin installation instructions

  This will start working as soon as Datasette 0.47 ships. Refs #923


hash: e139a7619f63d45ca2ff1ee108b933e17b5675b3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-08-11T17:24:40-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-08-11T17:24:40-07:00
file_name: datasette/cli.py
message:
  'datasette --get' option, closes #926

  Also made a start on the datasette.utils.testing module, refs #898


hash: 3fa261d1d2034b9444526ad764600f9798d9058c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-08-10T20:26:42-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-08-10T20:26:42-07:00
file_name: docs/installation.rst
message:
  Removed Python 3.5 installation instructions

  Suggested here: https://github.com/simonw/datasette/discussions/921#discussioncomment-49362


hash: 2d7fa8b9058dfbf9c7c371cdeec115d32a177dc9
author_name: fcatus
author_email: 56323389+fcatus@users.noreply.github.com
author_date: 2020-07-31T13:42:38-05:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-07-31T11:42:38-07:00
file_name: datasette/filters.py
message:
  Use None as a default arg (#901)

  Thanks, @fcatus!

  * Use None as a default arg
  * Black formatting fix

  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: 092874202c8748d6e0d4800eaf707c0145d95ffe
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-07-24T17:04:06-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-07-24T17:04:06-07:00
file_name: datasette/templates/allow_debug.html
message:
  Improvements to allow block logic and debug tool

  true and false allow block values are now supported, closes #906

  Added a bunch of demo links to the documentation, refs #908


hash: 6be5654ffab282e8cf39cc138ba2d4496ebc7407
author_name: abeyerpath
author_email: abeyer@path.org
author_date: 2020-07-24T13:39:53-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-07-24T13:39:53-07:00
file_name: setup.py
message:
  Exclude tests from package, properly this time

  The `exclude` argument to `find_packages` needs an iterable of package
  names.

  Closes #456 - thanks, @abeyerpath!


hash: ea99a4431ce5bc2d65a3496da5b38e1986550a96
author_name: Amjith Ramanujam
author_email: amjith.r@gmail.com
author_date: 2020-07-02T20:08:32-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-07-02T20:08:32-07:00
file_name: datasette/app.py
message:
  Only load Python files from plugins-dir

  Pull request #890. Thanks, @amjith!

  * Load only python files from plugins-dir
  * Add a test to verify non-python files are not loaded as plugins


hash: f1f581b7ffcd5d8f3ae6c1c654d813a6641410eb
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-07-01T14:43:07-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-07-01T14:43:07-07:00
file_name: README.md
message:
  Release notes for 0.45

  Refs #687, #807, #812, #832, #834, #835, #840, #842, #846, #852, #854, #863, #864, #870


hash: f7c3fc978ca787e9bbd49357c649d93042396b44
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-07-01T12:26:30-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-07-01T12:26:30-07:00
file_name: docs/ecosystem.rst
message:
  datasette-auth-tokens improved description

  Refs https://github.com/simonw/datasette-auth-tokens/issues/1


hash: d6e03b04302a0852e7133dc030eab50177c37be7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-30T16:40:50-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-30T16:40:50-07:00
file_name: datasette/views/base.py
message:
  Cascading view permissions, closes #832

  - If you have table permission but not database permission you can now view the table page
  - New BaseView.check_permissions() method


hash: ab76eddf31bef99630cc78f462a0b67624db60ac
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-30T15:49:06-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-30T15:49:06-07:00
file_name: datasette/default_permissions.py
message:
  Express no opinion if allow block is missing

  Default permission policy was returning True by default for permission
  checks - which means that if allow was not defined for a level it would
  be treated as a passing check.

  This is better: we now return None of the allow block is not defined,
  which means 'I have no opinion on this' and allows other code to make
  its own decisions.

  Added while working on #832


hash: 9ac6292614a332ddc5d0868abe4a72f8f48bc7ac
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-30T15:00:17-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-30T15:00:17-07:00
file_name: datasette/default_magic_parameters.py
message:
  _header_x now defaults to empty string

  Prior to this a request to e.g. https://latest.datasette.io/fixtures/magic_parameters
  which did not include a User-Agent header would trigger a 500 error.


hash: 563f5a2d3ab30ad08daee38f5ec3ed6429ac9206
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-27T19:58:16-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-06-27T19:58:16-07:00
file_name: datasette/database.py
message:
  Magic parameters for canned queries

  Closes #842

  Includes a new plugin hook, register_magic_parameters()


hash: 1bb33dab49fd25f77b9f8e7ab7ee23b3d64c123c
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-06-24T11:50:55-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-06-24T11:50:55-07:00
file_name: setup.py
message:
  Update pytest-asyncio requirement from <0.13,>=0.10 to >=0.10,<0.15 (#866)

  Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
  - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.10.0...v0.14.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 1f423790899f2867cb24f3705f4afdef363f01f1
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-21T17:52:58-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-21T17:52:58-07:00
file_name: docs/plugin_hooks.rst
message:
  Improved intro on plugin_hooks.rst page, refs #687

  https://datasette.readthedocs.io/en/latest/plugin_hooks.html


hash: b906030235efbdff536405d66078f4868ce0d3bd
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-11T18:19:30-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-11T18:19:30-07:00
file_name: README.md
message:
  Release Datasette 0.44

  Refs #395, #519, #576, #699, #706, #774, #777, #781, #784, #788, #790, #797,
  #798, #800, #802, #804, #819, #822, #825, #826, #827, #828, #829, #830,
  #833, #836, #837, #839

  Closes #806.


hash: 198545733b7a34d7b36ab6510ed30fb7687bcc7e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-10T16:56:53-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-10T16:56:53-07:00
file_name: docs/authentication.rst
message:
  Document that "allow": {} denies all

  https://github.com/simonw/datasette/issues/831#issuecomment-642324847


hash: 9f236c4c00689a022fd1d508f2b809ee2305927f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-10T13:06:46-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-10T13:06:46-07:00
file_name: docs/contributing.rst
message:
  Warn that register_facet_classes may change, refs #830

  Also documented policy that plugin hooks should not be shipped without a real example. Refs #818


hash: 57e812d5de9663a3c177e0344f4d1e552a74d484
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-10T12:39:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-10T12:39:54-07:00
file_name: datasette/actor_auth_cookie.py
message:
  ds_author cookie can now expire, closes #829

  Refs https://github.com/simonw/datasette-auth-github/issues/62#issuecomment-642152076


hash: 49d6d2f7b0f6cb02e25022e1c9403811f1fa0a7c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-08T17:05:44-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-08T17:05:44-07:00
file_name: datasette/app.py
message:
  allow_sql block to control execute-sql upermission in metadata.json, closes #813

  Also removed the --config allow_sql:0 mechanism in favour of the new allow_sql block.


hash: e0a4664fbab5556454dac7f3c798253a34db2928
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-08T15:09:57-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-08T15:09:57-07:00
file_name: datasette/default_permissions.py
message:
  Better example plugin for permission_allowed

  Also fixed it so default permission checks run after plugin permission checks, refs #818


hash: dcec89270a2e3b9fabed93f1d7b9be3ef86e9ed2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-08T11:20:21-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-08T11:20:59-07:00
file_name: datasette/templates/database.html
message:
  View list respects view-table permission, refs #811

  Also makes a small change to the /fixtures.json JSON:

      "views": ["view_name"]

  Is now:

      "views": [{"name": "view_name", "private": true}]


hash: 9b42e1a4f5902fb7d6ad0111189900e2656ffda3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-07T20:50:37-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-07T20:50:37-07:00
file_name: datasette/default_permissions.py
message:
  view-database permission

  Also now using 🔒 to indicate private resources - resources that
  would not be available to the anonymous user. Refs #811


hash: 613fa551a1be31645deb0ece4b46638c181827e0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-07T20:14:27-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-07T20:14:27-07:00
file_name: datasette/views/table.py
message:
  Removed view-row permission, for the moment - refs #811

  https://github.com/simonw/datasette/issues/811#issuecomment-640338347


hash: 84a9c4ff75460f91c049bd30bba3cee1fd89d9e2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-05T12:05:57-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-06-05T12:05:57-07:00
file_name: datasette/app.py
message:
  CSRF protection (#798)

  Closes #793.

  * Rename RequestParameters to MultiParams, refs #799
  * Allow tuples as well as lists in MultiParams, refs #799
  * Use csrftokens when running tests, refs #799
  * Use new csrftoken() function, refs https://github.com/simonw/asgi-csrf/issues/7
  * Check for Vary: Cookie hedaer, refs https://github.com/simonw/asgi-csrf/issues/8


hash: aa82d0370463580f2cb10d9617f1bcbe45cc994a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-03T08:16:50-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-06-03T08:16:50-07:00
file_name: datasette/templates/query.html
message:
  Basic writable canned queries

  Refs #698. First working version of this feature.

  * request.post_vars() no longer discards empty values


hash: a7137dfe069e5fceca56f78631baebd4a6a19967
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-06-02T14:49:28-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-06-02T14:49:28-07:00
file_name: datasette/app.py
message:
  /-/plugins now shows details of hooks, closes #794

  Also added /-/plugins?all=1 parameter to see default plugins.


hash: dfdbdf378aba9afb66666f66b78df2f2069d2595
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-31T22:00:36-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-31T22:00:36-07:00
file_name: datasette/app.py
message:
  Added /-/permissions debug tool, closes #788

  Also started the authentication.rst docs page, refs #786.

  Part of authentication work, refs #699.


hash: 461c82838d65dd9f61c5be725343a82c61b5c3f3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-30T15:06:33-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-31T18:16:42-07:00
file_name: datasette/app.py
message:
  Implemented actor_from_request with tests, refs #699

  Also added datasette argument to permission_allowed hook


hash: 124acf34a678f0af438dc31a2dceebf28612f249
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-30T11:39:46-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-30T11:39:46-07:00
file_name: datasette/database.py
message:
  Removed db.get_outbound_foreign_keys method

  It duplicated the functionality of db.foreign_keys_for_table.


hash: ca56c226a9f1b02e871d7d7b392619a805b7f1ed
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-30T07:33:02-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-30T07:33:02-07:00
file_name: tests/test_database.py => tests/test_internals_database.py
message:
  Renamed test_database.py to test_internals_database.py

  Also added a db fixture to remove some boilerplate.


hash: 81be31322a968d23cf57cee62b58df55433385e3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-29T16:18:01-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-29T16:22:22-07:00
file_name: datasette/renderer.py
message:
  New implementation for RequestParams

  - no longer subclasses dict
  - request.args[key] now returns first item, not all items
  - removed request.raw_args entirely

  Closes #774


hash: 84616a2364df56f966f579eecc0716b9877f0d70
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-29T15:51:30-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-29T15:51:30-07:00
file_name: datasette/utils/__init__.py
message:
  request.args.getlist() returns [] if missing, refs #774

  Also added some unit tests for request.args


hash: 6d95cb4f9146a5c4584a147bdf243c778a0f23f5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-27T21:09:16-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-05-27T21:09:16-07:00
file_name: tests/plugins/my_plugin.py
message:
  Unit test for register_facet_classes plugin, closes #773

  I was a bit lazy with this one. I didn't hook up a test for the facet_results mechanism.
  The custom facet hook isn't a great design so I will probably rethink it at some point
  in the future anyway.


hash: 4433306c1855ad69840cc76cbd41086137572be2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-05-08T09:05:46-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-08T09:05:46-07:00
file_name: datasette/app.py
message:
  Improvements + docs for db.execute() and Results class

  * Including new results.first() and results.single_value() methods. Closes #685


hash: b314e088c59425122fb2b2abde8741010d9d274a
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T10:40:48-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T10:40:48-07:00
file_name: setup.py
message:
  Update pytest-asyncio requirement from ~=0.10.0 to >=0.10,<0.13 (#753)

  Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
  - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.10.0...v0.12.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 707fe039947b3e48f2b6dcfe8e577d76b617f2a5
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T10:14:46-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T10:14:46-07:00
file_name: setup.py
message:
  Update beautifulsoup4 requirement from ~=4.8.1 to >=4.8.1,<4.10.0 (#720)

  Updates the requirements on [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) to permit the latest version.

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: dbd2d70b3819a7041bb36a527033d77c85683c05
author_name: Colin Dellow
author_email: cldellow@gmail.com
author_date: 2020-05-04T13:14:25-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T10:14:25-07:00
file_name: datasette/utils/asgi.py
message:
  asgi: check raw_path is not None (#719)

  The ASGI spec
  (https://asgi.readthedocs.io/en/latest/specs/www.html#http) seems to
  imply that `None` is a valid value, so we need to check the value
  itself, not just whether the key is present.

  In particular, the [mangum](https://github.com/erm/mangum) adapter
  passes `None` for this key.


hash: c91fb9e3d4f0632d4ef25a21165739ab88a9d491
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T10:13:41-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T10:13:41-07:00
file_name: setup.py
message:
  Update pytest requirement from ~=5.2.2 to >=5.2.2,<5.5.0 (#721)

  Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
  - [Release notes](https://github.com/pytest-dev/pytest/releases)
  - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
  - [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...5.4.1)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: aa064de3f400899dbf61f2d33a035fba4017596c
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T10:13:15-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T10:13:15-07:00
file_name: setup.py
message:
  Update jinja2 requirement from ~=2.10.3 to >=2.10.3,<2.12.0 (#722)

  Updates the requirements on [jinja2](https://github.com/pallets/jinja) to permit the latest version.
  - [Release notes](https://github.com/pallets/jinja/releases)
  - [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
  - [Commits](https://github.com/pallets/jinja/compare/2.10.3...2.11.1)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 109c5a430d53fe38b1300e0daa20f5cef047a08e
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T09:48:03-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T09:48:03-07:00
file_name: setup.py
message:
  Update janus requirement from ~=0.4.0 to >=0.4,<0.6 (#734)

  Updates the requirements on [janus](https://github.com/aio-libs/janus) to permit the latest version.
  - [Release notes](https://github.com/aio-libs/janus/releases)
  - [Changelog](https://github.com/aio-libs/janus/blob/master/CHANGES.rst)
  - [Commits](https://github.com/aio-libs/janus/compare/v0.4.0...v0.5.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: e232f77055880b38cc0b738607cd50cde9188eaf
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T09:45:49-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T09:45:49-07:00
file_name: setup.py
message:
  Update mergedeep requirement from ~=1.1.1 to >=1.1.1,<1.4.0 (#728)

  Updates the requirements on [mergedeep](https://github.com/clarketm/mergedeep) to permit the latest version.
  - [Release notes](https://github.com/clarketm/mergedeep/releases)
  - [Commits](https://github.com/clarketm/mergedeep/compare/v1.1.1...v1.3.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: 985e59493e44d6fcebf7a30f693f4edecee3e90d
author_name: dependabot-preview[bot]
author_email: 27856297+dependabot-preview[bot]@users.noreply.github.com
author_date: 2020-05-04T09:17:48-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-05-04T09:17:48-07:00
file_name: setup.py
message:
  Update aiofiles requirement from ~=0.4.0 to >=0.4,<0.6 (#725)

  Refs #754

  Updates the requirements on [aiofiles](https://github.com/Tinche/aiofiles) to permit the latest version.
  - [Release notes](https://github.com/Tinche/aiofiles/releases)
  - [Commits](https://github.com/Tinche/aiofiles/compare/v0.4.0...v0.5.0)

  Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

  Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>


hash: e37f4077c0f1cd09d4102213d4e2a512af471b8d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-04-27T15:02:02-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-04-27T15:02:28-07:00
file_name: datasette/cli.py
message:
  Remove 'Serve!' line from serve CLI output

  It wasn't adding anything, and it was confusing when run in
  conjunction with the new config directory mode from #731


hash: b07312c2b3bc7e4a9298c1f291f420bd92b6f842
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-04-02T17:54:27-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-04-02T17:54:27-07:00
file_name: tests/fixtures.py
message:
  dedent SQL for neighborhood_search fixture

  Makes this page a little prettier:
  https://latest.datasette.io/fixtures/neighborhood_search


hash: 7656fd64d8b6a32ebc34d89c1b8711cc5ea240f7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-03-24T17:18:43-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-03-24T17:18:43-07:00
file_name: datasette/app.py
message:
  base_url configuration setting, closes #394

  * base_url configuration setting
  * base_url works for static assets as well


hash: dc80e779a2e708b2685fc641df99e6aae9ad6f97
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-03-02T12:01:10-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-03-02T15:34:04-08:00
file_name: datasette/utils/asgi.py
message:
  Handle scope path if it is a string

  I ran into this while running a unit test with httpx.AsyncClient


hash: 3041c6b6412bbe317f8b9afd6529a15954f2c47e
author_name: Kevin Keogh
author_email: kevin.d.keogh@gmail.com
author_date: 2020-02-25T15:19:29-05:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2020-02-25T12:19:29-08:00
file_name: datasette/views/table.py
message:
  Use inspect-file, if possible, for total row count (#666)

  For large tables, counting the number of rows in the table can take a
  significant amount of time. Instead, where an inspect-file is provided
  for an immutable database, look up the row-count for a plain count(*).

  Thanks, @kevindkeogh


hash: d6335f1f3184683b05131dd12a73ff1115aefba3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-02-21T18:53:35-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-02-21T18:53:35-08:00
file_name: docs/ecosystem.rst
message:
  Added shapefile-to-sqlite, datasette-mask-columns, datasette-auth-existing-cookies, datasette-auth-existing-cookies

  Refs #679


hash: efa54b439fd0394440c302602b919255047b59c5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-02-13T17:58:32-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-02-13T17:58:32-08:00
file_name: docs/datasette.rst
message:
  Docs for .render_template(), refs #577

  Also improved parameter documentation for other methods, refs #576


hash: 3ffb8f3b98252531d11897fd431711e9b8045ace
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-02-13T17:25:27-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-02-13T17:27:57-08:00
file_name: datasette/app.py
message:
  .add_database() and .remove_database() methods, refs #671

  Also made a start on the Datasette class documentation, refs #576


hash: 32a2f5793a5276c1033bb96b79b9ee1c0e748219
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-02-13T12:15:37-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-02-13T12:15:41-08:00
file_name: datasette/postgresql_database.py
message:
  Start of PostgreSQL prototype, refs #670

  This prototype demonstrates the database page working against a
  hard-coded connection string to a PostgreSQL database. It lists
  tables and their columns and their row count.,


hash: 0091dfe3e5a3db94af8881038d3f1b8312bb857d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2020-02-12T22:36:42-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2020-02-12T22:36:42-08:00
file_name: datasette/facets.py
message:
  More reliable tie-break ordering for facet results

  I was seeing a weird bug where the order of results running tests
  on my laptop was inconsistent, causing pytest failures even though
  the order of tests in Travis CI was fine.

  I think the fix is to explicitly state how facet ordering ties on
  the count should be resolved.


hash: f80ff9b07b5ecdfeca4aa81f5728812a22bfb019
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-07T13:16:48-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-07-07T13:16:48-07:00
file_name: datasette/static/app.css
message:
  min-height on .hd

  Now it should be the same size on the homepage as it is on pages with breadcrumbs


hash: 3c861f363df02a59a67c59036278338e4760d2ed
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-12-29T18:48:13Z
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-12-29T18:48:30Z
file_name: datasette/plugins.py
message:
  _search= queries now correctly escaped, fixes #651

  Queries with reserved words or characters according to the SQLite
  FTS5 query language could cause errors.

  Queries are now escaped like so:

      dog cat => "dog" "cat"


hash: df2879ee2a88f94ae590067e019237afc2189e00
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-25T18:31:42-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-25T18:31:42-08:00
file_name: datasette/cli.py
message:
  Better documentation for --static, closes #641

  https://datasette.readthedocs.io/en/stable/custom_templates.html#serving-static-files


hash: dcc5cd425a4e6608d8f43b6df8ec689790ad775f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-17T22:33:43-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-17T22:33:52-08:00
file_name: datasette/app.py
message:
  Moved expand_foreign_keys method to Database

  Refs #620

  Also fixed a few places that were calling ds.execute() instead of
  db.execute()


hash: 7f89928062b1a1fdb2625a946f7cd5161e597401
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-11T21:33:51-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-11T21:33:51-08:00
file_name: setup.py
message:
  Removed code that conditionally installs black

  Since we no longer support Python 3.5 we don't need this any more.


hash: cf7776d36fbacefa874cbd6e5fcdc9fff7661203
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-11T21:09:11-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-11-11T21:09:11-08:00
file_name: .travis.yml
message:
  Support Python 3.8, stop supporting Python 3.5 (#627)

  * Upgrade to uvicorn 0.10.4
  * Drop support for Python 3.5
  * Bump all dependencies to latest releases
  * Update docs to reflect we no longer support 3.5
  * Removed code that skipped black unit test on 3.5

  Closes #622


hash: 18cc795b5c6ec9223a5cbc4f30b19710c17f7eaa
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-11T20:56:09-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-11T20:56:09-08:00
file_name: README.md
message:
  Update docs to reflect we no longer support 3.5

  Also removed code that skipped black test for 3.5.


hash: 1c063fae9dba70f70244db010d55a18846640f07
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-10T19:45:34-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-11-10T19:45:34-08:00
file_name: .travis.yml
message:
  Test against Python 3.8 in Travis (#623)

  * Test against Python 3.8 in Travis
  * Avoid current_task warnings in Python 3.8


hash: 10b9d85edaaf198879344aa1c498000cfb27dff8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-11-08T18:15:13-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-11-08T18:15:13-08:00
file_name: docs/getting_started.rst
message:
  datasette-csvs on Glitch now uses sqlite-utils

  It previously used csvs-to-sqlite but that had heavy dependencies.

  See https://support.glitch.com/t/can-you-upgrade-python-to-latest-version/7980/33


hash: ee330222f4c3ee66c2fe41ebc76fed56b9cb9a00
author_name: Tobias Kunze
author_email: r@rixx.de
author_date: 2019-11-04T03:39:55+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-03T18:39:55-08:00
file_name: datasette/templates/_codemirror_foot.html
message:
  Offer to format readonly SQL (#602)

  Following discussion in #601, this PR adds a "Format SQL" button to
  read-only SQL (if the SQL actually differs from the formatting result).

  It also removes a console error on readonly SQL queries.

  Thanks, @rixx!


hash: cd1b22f100ba7299f7ec28417d555f6e51080016
author_name: Tobias Kunze
author_email: r@rixx.de
author_date: 2019-10-14T05:46:12+02:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-10T19:15:14-08:00
file_name: datasette/static/app.css
message:
  Button to format SQL, closes #136

  SQL code will be formatted on page load, and can additionally
  be formatted by clicking the "Format SQL" button.

  Thanks, @rixx!


hash: 5a43d8e3d1e9d4a4a5af400094f766fc3df9cee0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-09-02T17:32:27-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-10T19:15:14-08:00
file_name: datasette/utils/__init__.py
message:
  detect_fts now works with alternative table escaping (#571)

  Fixes #570. See also https://github.com/simonw/sqlite-utils/pull/57


hash: 51e136317912826b9951745e93d62876c74b910b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-13T15:34:57-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-10T19:15:13-08:00
file_name: setup.py
message:
  Bump to uvicorn 0.8.4 (#559)

  https://github.com/encode/uvicorn/commits/0.8.4

  Query strings will now be included in log files: https://github.com/encode/uvicorn/pull/384


hash: 82889507cafa4b823e89af90b6674fd76653fb86
author_name: Abdus
author_email: sssmmt@gmail.com
author_date: 2019-07-11T19:13:19+03:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-11-10T19:15:13-08:00
file_name: datasette/utils/__init__.py
message:
  Fix static mounts using relative paths and prevent traversal exploits (#554)

  Thanks, @abdusco! Closes #555


hash: 973f8f139df6ad425354711052cfc2256de2e522
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-07T19:06:31-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-07-07T19:06:31-07:00
file_name: datasette/publish/cloudrun.py
message:
  --plugin-secret option for datasette publish

  Closes #543

  Also added new --show-files option to publish now and publish cloudrun - handy for debugging.


hash: fcfcae21e67cc15090942b1d2a47b5f016279337
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-05T17:05:56-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-07-05T17:05:56-07:00
file_name: datasette/hookspecs.py
message:
  extra_template_vars plugin hook (#542)

  * extra_template_vars plugin hook

  Closes #541

  * Workaround for cwd bug

  Based on https://github.com/pytest-dev/pytest/issues/1235#issuecomment-175295691


hash: f0d32da0a9af87bcb15e34e35424f0c0053be83a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-02T21:32:55-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-07-02T21:32:55-07:00
file_name: datasette/utils/__init__.py
message:
  Switch to ~= dependencies, closes #532 (#536)

  * Switch to ~= dependencies, closes #532
  * Bump click and click-default-group
  * imp. is deprecated, use types.ModuleType instead - thanks https://stackoverflow.com/a/32175781
  * Upgrade to pytest 5


hash: a5591236c46f507b9e46b1b52e51d5f46ffd6913
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-23T20:23:07-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-06-23T20:23:07-07:00
file_name: .travis.yml
message:
  Install test dependencies so deploy can work

  python tests/fixtures.py needs asgiref or it fails with an error


hash: ba8db9679f3bd2454c9e76e7e6c352126848b57a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-23T20:13:09-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-06-23T20:13:09-07:00
file_name: datasette/app.py
message:
  Port Datasette from Sanic to ASGI + Uvicorn (#518)

  Datasette now uses ASGI internally, and no longer depends on Sanic.

  It now uses Uvicorn as the underlying HTTP server.

  This was thirteen months in the making... for full details see the issue:

  https://github.com/simonw/datasette/issues/272

  And for a full sequence of commits plus commentary, see the pull request:

  https://github.com/simonw/datasette/pull/518


hash: 39d66f17c1a97c571998a1067fb8263509473a6f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-18T17:22:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-18T17:24:13-07:00
file_name: datasette/utils.py
message:
  Revert "New encode/decode_path_component functions"

  Refs #272

  This reverts commit 9fdb47ca952b93b7b60adddb965ea6642b1ff523.

  Now that ASGI supports raw_path we don't need our own encoding scheme!


hash: d4df640d187d01a0ee81c238082a690bbefd0800
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-15T12:41:34-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-15T12:41:34-07:00
file_name: datasette/views/base.py
message:
  Refactored view class hierarchy, refs #272

  See https://github.com/simonw/datasette/issues/272#issuecomment-502393107


hash: 947645d84710677ea50762016081a9fbc6b014a8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-26T13:18:19+03:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-07-26T13:18:19+03:00
file_name: datasette/app.py
message:
  First working -d based Datasette Library

  Refs #417

  First proof-of-concept for Datasette Library. Run like this:

      datasette -d ~/Library

  Uses a new plugin hook - available_databases()

  BUT... I don't think this is quite the way I want to go.


hash: 029e3d53634cc38690d5b56427a3c87851a61b09
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-12T15:30:25-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-07-12T15:30:25-07:00
file_name: setup.py
message:
  Bump to uvicorn 0.8.4

  https://github.com/encode/uvicorn/commits/0.8.4

  Query strings will now be included in log files: https://github.com/encode/uvicorn/pull/384


hash: 741760d05c6836396756ff6be44a4d375a83a06f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-07T16:57:04-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-07-07T16:57:04-07:00
file_name: datasette/publish/now.py
message:
  Unit tests for now --plugin-secret option

  Also added new --show-files option to  - useful for debugging.


hash: 109c2e26b0f4f38f3afca2f4a0f1770e49e8e66f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-07-05T16:29:51-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-07-05T16:29:51-07:00
file_name: tests/conftest.py
message:
  Workaround for cwd bug

  Based on https://github.com/pytest-dev/pytest/issues/1235#issuecomment-175295691


hash: 6a348e3c2c774cff01fa6c506f6adfa3b9d77239
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-23T22:15:31-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-23T22:15:31-07:00
file_name: datasette/cli.py
message:
  Removed unnecessary imports with autoflake

  I ran this:

      autoflake --in-place --recursive tests datasette


hash: d2daa1b9f74ef33c4a819aa1d968e442328ec987
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-23T07:36:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-23T07:36:54-07:00
file_name: datasette/app.py
message:
  Database download works again, refactored utils.py #272

  Refactored utils.py into a datasette/utils package, refactored some of
  the ASGI helper code into datasette/utils/asgi.py


hash: b7a00dbde3b9a0b37381111329e462d4f213fd66
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-23T07:01:38-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-23T07:01:38-07:00
file_name: datasette/app.py
message:
  Include "asgi": "3.0" in /-/versions, refs #272

  Mainly so you can tell if a Datasette instance is running
  on ASGI or not.


hash: ca03940f6d9313543e134e11c1e509f931be82c3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-22T20:58:31-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-22T20:58:31-07:00
file_name: datasette/app.py
message:
  Basic static files now work, refs #272

  Not yet using aiofiles so will not correctly handle larger static assets.

  Still needs security tightening.

  Still needs tests.

  But the CSS and JS now work


hash: d8dcc34e36da26ebbfadb36ed8fa15cc2ba01b59
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-22T20:21:23-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-22T20:21:23-07:00
file_name: datasette/app.py
message:
  All API tests now pass, refs #272

  CSV tests still all fail.

  Also I marked test_trace() as skip because I have not yet re-implemented trace.


hash: 180d5be8118560d348dd546d51070fd703b37f02
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-06-22T18:06:24-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-06-22T18:07:44-07:00
file_name: datasette/app.py
message:
  First partially working version of ASGI-powered Datasette #272

  Lots still to do:

  * Static files are not being served
  * Streaming CSV files don't work
  * Tests all fail
  * Some URLs (e.g. the 'next' link on tables) are incorrect

  But... the server does start up and you can browse databases/tables


hash: edb36629e7356f70f42b9d37fea5dfe9cc3c364a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-27T11:41:44-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-27T11:41:44-07:00
file_name: datasette/database.py
message:
  Database.get_outbound_foreign_keys() refactor

  Following this, the only module that ever makes calls to the low-level
  execute_against_connection_in_thread() method is datasette/database.py


hash: 20f98c3e20902c62db610e43155c476508ead4a4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-27T11:27:42-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-27T11:27:42-07:00
file_name: datasette/database.py
message:
  Databse.primary_keys(table) / fts_table(table) refactor, closes #488

  Also cleaned up some unused imports spotted by the linter.


hash: 172da009d890aa029cff7138b4dcfd4f60948525
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-22T22:44:34-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-22T22:45:12-07:00
file_name: datasette/views/table.py
message:
  Added ?_through= table argument, closes #355

  Also added much more interesting many-to-many fixtures - roadside attractions!


hash: 7d8573d6724a13d5003e48d75682323ee1e55692
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-19T11:06:51-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-19T11:06:51-07:00
file_name: .travis.yml
message:
  Rename "datasette publish now" to "datasette publish nowv1"

  Also added an alias so "datasette publish now" continues to work.

  Closes #472


hash: 909e66dfdb9b43eed718004eba903497bc67b25a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-16T07:14:10-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-16T07:15:24-07:00
file_name: datasette/app.py
message:
  Removed .inspect() and /-/inspect.json

  Refs #462

  /-/inspect.json may return in some shape in #465


hash: 623c552ff4e2eda9cc710063a7cc674aa49264f4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-15T21:57:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-15T21:57:36-07:00
file_name: docs/getting_started.rst
message:
  'Try Datasette without installing anything using Glitch'

  Also new 'Play with a live demo' section, both at the top of the Getting
  Started documentation page.

  https://datasette.readthedocs.io/en/latest/getting_started.html

  Closes #464


hash: 2ad9d15cd6901654e6801e2faa29e6fc08bae5fa
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-15T20:55:28-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-15T20:55:28-07:00
file_name: datasette/app.py
message:
  Table counts now handles SQL Logic Error too

  I tried running Datasette against 22 database files at once and ran into
  a weird error where the table counts broke with an SQL Logic Error
  exception. Easy fix: catch that exception too and treat it the same as a
  regular Interrupted error.


hash: 689cf9c139f57d6a3fd61e0c62fe66c793f234ae
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-15T20:02:33-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-15T20:02:33-07:00
file_name: datasette/templates/index.html
message:
  Index page only shows row counts for smaller databases

  The index page now only shows row counts for immutable databases OR for
  databases with less than 30 tables provided it could get a count for
  each of those tables in less than 10ms.

  Closes #467, Refs #460


hash: 79303163b249829182f2e8d8c2d45e4526aa174f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-15T17:40:10-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-15T17:40:10-07:00
file_name: datasette/views/index.py
message:
  Row count fix + sort index page databases alphabetically

  Sorting alphabetically should fix a test failure in Python 3.5

  Refs #460


hash: 5d6b2c30f15c36bcf49906acda7f15ec6232c984
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-15T17:28:07-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-15T17:28:07-07:00
file_name: datasette/templates/index.html
message:
  Include views on homepage, fix table counts

  If we have less than 5 tables we now also show one or more views in the
  summary on the homepage.

  Also corrected the logic for the row counts - we now count hidden and
  visible tables separately.

  Closes #373, Refs #460


hash: e04511410f57e88c806455b9182a853bf07122a2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-14T08:46:57-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-14T08:46:57-07:00
file_name: datasette/views/index.py
message:
  Don't show hidden tables on index page, closes #455

  Refs #460. Also bulked out HTML index page unit tests.


hash: 24bf79d2f01f373eafcb41eaa1279a13711eff25
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-11T16:22:55-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-11T16:22:55-07:00
file_name: datasette/app.py
message:
  Run sanity checks, not .inspect(), on startup

  Also fixes tests that did NOT like a call to run_until_complete in the Datasette() constructor.


hash: da0b3ce2b76227f1cd0cfdd3df361712c17ddcd0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-11T15:55:30-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-11T15:55:30-07:00
file_name: .gitignore
message:
  New run_sanity_checks mechanism, for SpatiLite

  Moved VirtualSpatialIndex check into a new mechanism that should allow
  us to add further sanity checks in the future.

  To test this I've had to commit a binary sample SpatiaLite database to
  the repository. I included a build script for creating that database.

  Closes #466


hash: c0d1b4c32297453adaa4c159edee9be0a9617f2b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-11T14:36:57-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-11T14:36:57-07:00
file_name: datasette/cli.py
message:
  "datasette inspect foo.db" now just calculates table counts

  Refs #462

  * inspect command now just outputs table counts
  * test_inspect.py is now only tests for that CLI command
  * Updated some relevant documentation
  * Removed docs for /-/inspect since that is about to change


hash: 09ef305c687399384fe38487c075e8669682deb4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-11T13:20:36-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-11T13:20:36-07:00
file_name: .travis.yml
message:
  Fixed "datasette publish now ... --alias=x"

  The --alias argument can now be passed more than once.

  Also updated our Travis configuration to use this.

  Fixes #459


hash: a0d444837f6ce3fdaf6b0664605f74dd4a7f8215
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-11T12:06:22-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-11T12:06:22-07:00
file_name: datasette/app.py
message:
  Finished implementation of ?_trace=1 debug tool

  I redesigned the JSON output and added a handy "traceback" key showing
  three relevant lines of the current traceback for each logged query.

  Closes #435


hash: e7b31ae8c1a28cab9db8e165b3f21407c2e581e6
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-11T10:06:23-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-05-11T10:06:23-07:00
file_name: .travis.yml
message:
  Use now --target production instead of now alias

  Fix for this error:

      $ now alias --token=$NOW_TOKEN
      > WARN! The `now alias` command (no arguments) was deprecated in favour of `now --target production`.
      > Error! Couldn't find a deployment to alias. Please provide one as an argument.
      The command "now alias --token=$NOW_TOKEN" exited with 1.

  https://travis-ci.org/simonw/datasette/jobs/530597261


hash: 2db977d8f30e0eb8b7cda1481a4a8852b414915d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-05T22:50:33-04:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-09T09:44:21-07:00
file_name: tests/fixtures.py
message:
  tests/fixtures.py can now write out plugins too

  This command:

      python tests/fixtures.py \
          fixtures.db \
          metadata.json \
          fixtures-plugins/

  Will now create the fixtures.db and metadata.json files, AND create
  a folder called fixtures-plugins/ containing two test plugins.

  You can then run it like this:

      datasette fixtures.db \
          -m metadata.json --plugins-dir=fixtures-plugins/


hash: 9fdb47ca952b93b7b60adddb965ea6642b1ff523
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-05T18:36:04-04:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-09T09:44:21-07:00
file_name: datasette/utils.py
message:
  New encode/decode_path_component functions

  ASGI cannot differentiate between / and %2F in a URL, so we need an
  alternative scheme for encoding the names of tables that contain special
  characters such as /

  For background, see
      https://github.com/django/asgiref/issues/51#issuecomment-450603464

  Some examples:

      "table/and/slashes" => "tableU+002FandU+002Fslashes"
      "~table" => "U+007Etable"
      "+bobcats!" => "U+002Bbobcats!"
      "U+007Etable" => "UU+002B007Etable"


hash: bfa2ae0d16d39bb82dbe4da4f3fdc3c7f6257418
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-08T17:02:47-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-05-08T17:02:47-07:00
file_name: README.md
message:
  Promote Glitch instead of Datasette Publish

  Datasette Publish is currently broken due to Zeit API and platform changes.


hash: ade6bae47271c15a32397c33f8ecb022d0fe4c58
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-03T21:25:49-04:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T21:25:49-04:00
file_name: tests/conftest.py
message:
  Ensure test_black.py executes first under pytest

  Otherwise it throws an exception because it gets disrupted by the
  asyncio activity in the other tests.


hash: f9193e7a18645397dc4c88b6b10bbcadc06d3fd4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-03T21:06:47-04:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T21:06:47-04:00
file_name: setup.py
message:
  Unit test enforcing black formatting

  Only runs for Python 3.6 at the moment.

  See https://github.com/python/black/issues/425


hash: 35d6ee2790e41e96f243c1ff58be0c9c0519a8ce
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-03T22:15:14-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-05-03T22:15:14-04:00
file_name: datasette/__init__.py
message:
  Apply black to everything, enforce via unit tests (#449)

  I've run the black code formatting tool against everything:

      black tests datasette setup.py

  I also added a new unit test, in tests/test_black.py, which will fail if the code does not
  conform to black's exacting standards.

  This unit test only runs on Python 3.6 or higher, because black itself doesn't run on 3.5.


hash: 66c87cee0c7344c7877373c60b180c766c206101
author_name: Jaap Roes
author_email: jaap.roes@gmail.com
author_date: 2019-05-03T23:11:19+02:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T17:11:19-04:00
file_name: .gitattributes
message:
  Mark codemirror files as vendored (#367)

  This should stop GitHub from incorrectly stating that Datasette is 46% JavaScript.


hash: d555baf508de71a5e3dc9a9aed2c13f6f202956d
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2019-05-03T17:44:48+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T12:44:48-04:00
file_name: datasette/views/table.py
message:
  Suppress rendering of binary data - thanks @russss (#442)

  Binary columns (including spatialite geographies) get shown as ugly
  binary strings in the HTML by default. Nobody wants to see that mess.

  Show the size of the column in bytes instead. If you want to decode
  the binary data, you can use a plugin to do it.


hash: 75a21fc2a136ccfc9da7bbf521cf288e63c9707f
author_name: Romain Primet
author_email: romain.primet@inria.fr
author_date: 2019-05-03T15:59:01+02:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T09:59:01-04:00
file_name: datasette/plugins.py
message:
  datasette publish cloudrun (#434) - thanks, @rprimet

  New publish subcommand that publishes using the
  new Google Cloud Run platform.

      datasette publish cloudrun database.db


hash: bf229c9bd88179c8ec16bd65fd4fb28ab4241c2e
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2019-05-03T14:12:19+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T09:12:19-04:00
file_name: datasette/hookspecs.py
message:
  Pass view_name to extra_body_script hook (#443)

  At the moment it's not easy to tell whether the hook is being called
  in (for example) the row or table view, as in both cases the
  `database` and `table` parameters are provided.

  This passes the `view_name` added in #441 to the `extra_body_script`
  hook.


hash: 470cf0b05d4fda0d2563f81c7e32af13fe346ccc
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2019-05-03T14:11:27+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-03T09:11:27-04:00
file_name: setup.cfg
message:
  Add a max-line-length setting for flake8 (#444)

  This stops my automatic editor linting from flagging lines which are too
  long. It's been lingering in my checkout for ages.

  160 is an arbitrary large number - we could alter it if we have any
  opinions (but I find the line length limit to be my least favourite part
  of PEP8).


hash: ea66c45df96479ef66a89caa71fff1a97a862646
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-02T17:11:26-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-05-02T17:11:26-07:00
file_name: datasette/app.py
message:
  Extract facet code out into a new plugin hook, closes #427 (#445)

  Datasette previously only supported one type of faceting: exact column value counting.

  With this change, faceting logic is extracted out into one or more separate classes which can implement other patterns of faceting - this is discussed in #427, but potential upcoming facet types include facet-by-date, facet-by-JSON-array, facet-by-many-2-many and more.

  A new plugin hook, register_facet_classes, can be used by plugins to add in additional facet classes.

  Each class must implement two methods: suggest(), which scans columns in the table to decide if they might be worth suggesting for faceting, and facet_results(), which executes the facet operation and returns results ready to be displayed in the UI.


hash: efc93b8ab5a21e3802f75f08d5e41409f5684b5d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-01T22:29:47-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-01T22:29:47-07:00
file_name: README.md
message:
  Entirely removed table_rows_count table property

  We were not displaying this anywhere, and it is now expensive to calculate.

  Refs #419, #420


hash: f553a670216960043ec7e62ff35d42db78903ff0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-01T22:09:03-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-01T22:09:03-07:00
file_name: datasette/plugins.py
message:
  Don't load setuptools plugins during test runs

  Uses pattern from https://docs.pytest.org/en/latest/example/simple.html#detect-if-running-from-within-a-pytest-run

  Closes #438


hash: e7151ccccf4a0d10e1fcf3832e18c5199c16dea0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-05-01T17:39:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-01T17:39:39-07:00
file_name: datasette/app.py
message:
  Index page no longer uses inspect data - refs #420

  Also introduced a mechanism whereby table counts are calculated against a time limit
  but immutable databases have their table counts calculated on server startup.


hash: cf406c075433882b656e340870adf7757976fa4c
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2019-05-02T00:01:56+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-05-01T16:01:56-07:00
file_name: datasette/app.py
message:
  New plugin hook: register_output_renderer hook (#441)

  Thanks @russss!

  * Add register_output_renderer hook

  This changeset refactors out the JSON renderer and then adds a hook and
  dispatcher system to allow custom output renderers to be registered.

  The CSV output renderer is untouched because supporting streaming
  renderers through this system would be significantly more complex, and
  probably not worthwhile.

  We can't simply allow hooks to be called at request time because we need
  a list of supported file extensions when the request is being routed in
  order to resolve ambiguous database/table names. So, renderers need to
  be registered at startup.

  I've tried to make this API independent of Sanic's request/response
  objects so that this can remain stable during the switch to ASGI. I'm
  using dictionaries to keep it simple and to make adding additional
  options in the future easy.

  Fixes #440


hash: bac4e01f40ae7bd19d1eab1fb9349452c18de8f5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-21T12:02:24-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-21T12:02:24-07:00
file_name: datasette/utils.py
message:
  Ensure sqlite_timelimit correctly clears handler

  If an error occurred inside the block the progress handler (used to
  enforce a time limit) was not being correctly cleared, resulting in
  timeout errors potentially occurring during subsequent SQL queries.

  The fix is described here: https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager


hash: 58a862cee4a065d463da0a08b87134efb6b6e18d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-21T10:41:16-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-21T10:41:16-07:00
file_name: datasette/app.py
message:
  ?_trace=1 now adds SQL trace info to JSON/HTML response

  Also added documentation for it. Refs #435


hash: 2b11948d7c5f4548325c941d92eaf428852a19d8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-20T10:50:45-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-20T10:50:45-07:00
file_name: datasette/app.py
message:
  New ConnectedDatabase.mtime_ns property

  I plan to use this for some clever table count caching tricks


hash: 5c198f7ca5d2aff49180820271ba8d06b79aefb1
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-18T09:29:43-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-18T09:29:43-07:00
file_name: datasette/facets.py
message:
  Include table metadata when calculating applied facets

  Still need to ensure facets from metadata cannot be hidden in the UI


hash: 2c19a27d15a913e5f3dd443f04067169a6f24634
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-15T15:41:11-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-15T15:41:11-07:00
file_name: docs/json_api.rst
message:
  Documentation for filters, plus new documentation unit test

  https://simonwillison.net/2018/Jul/28/documentation-unit-tests/


hash: 6da567dda953c7ac0e5500f17d8e220467a3499e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-15T14:51:20-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-15T14:51:20-07:00
file_name: datasette/filters.py
message:
  Extract and refactor filters into filters.py

  This will help in implementing __in as a filter, refs #433


hash: 62810f8f7af56f44505d80062ea39245c43aa920
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-15T07:01:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-15T07:01:39-07:00
file_name: datasette/app.py
message:
  Continue sketching out new facet design, refs #427

  Includes various new partially implemented facet classes, to help exercise the API design.


hash: 78e45ead4d771007c57b307edf8fc920101f8733
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-10T08:17:19-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-10T08:27:52-07:00
file_name: datasette/utils.py
message:
  New ?tags__arraycontains=tag lookup against JSON fields

  Part one of supporting facet-by-JSON-array, refs #359


hash: 3a208a41d4dce35b97eca8b25f37055c3fda5aed
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-04-06T20:47:10-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-04-06T20:47:10-07:00
file_name: datasette/views/table.py
message:
  TableView.data() no longer uses .inspect, refs #420

  BUT... it does a count(*) against the whole table which may take unbounded time.

  Fixing this is part of #422


hash: 82fec6048148b58748040a7e2caa163387e982a3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-03-17T16:36:35-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-03-17T16:36:35-07:00
file_name: datasette/app.py
message:
  Fix for TypeError

      File "../datasette/app.py", line 138, in __init__
        self.files = files + immutables
      TypeError: can only concatenate tuple (not "list") to tuple


hash: 6f6d0ff2b41f1cacaf42287b1b230b646bcba9ee
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2019-03-17T15:55:04-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-03-17T15:55:04-07:00
file_name: datasette/app.py
message:
  URL hashing is now off by default - closes #418

  Prior to this commit Datasette would calculate the content hash of every
  database and redirect to a URL containing that hash, like so:

      https://v0-27.datasette.io/fixtures => https://v0-27.datasette.io/fixtures-dd88475

  This assumed that all databases were opened in immutable mode and were not
  expected to change.

  This will be changing as a result of #419 - so this commit takes the first step
  in implementing that change by changing this default behaviour. Datasette will
  now only redirect hash-free URLs under two circumstances:

  * The new `hash_urls` config option is set to true (it defaults to false).
  * The user passes `?_hash=1` in the URL


hash: 9e8c36793bfbb17c2f67371cc7f9aa8b9202fdc4
author_name: joelondon
author_email: joelondon@users.noreply.github.com
author_date: 2019-03-15T05:06:45Z
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2019-03-14T22:06:45-07:00
file_name: docs/spatialite.rst
message:
  Update spatialite.rst (#413)

  a line of sql added to create the idx_<table_name> in the python recipe


hash: 9743e1d91b5f0a2b3c1c0bd6ffce8739341f43c4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-03-14T16:42:38-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-03-14T20:54:42-07:00
file_name: datasette/app.py
message:
  Support for :memory: databases

  If you start Datasette with no files, it will connect to :memory: instead.

  When starting it with files you can add --memory to also get a :memory: database.


hash: 1f91065b20cbc691f464bccfd8eef7d1ce4b14a8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-02-08T08:06:10-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-02-08T08:06:10-08:00
file_name: docs/ecosystem.rst
message:
  Added socrata2sql to the ecosystem page

  A fantastic new tool created by @achavez at the Dallas Morning News.


hash: 195a5b36349d0d24a6bbb758cebb719b6de303b6
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2019-02-05T20:15:46-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2019-02-05T20:15:46-08:00
file_name: datasette/publish/heroku.py
message:
  Heroku --include-vcs-ignore (#407)

  Means `datasette publish heroku` can work under Travis, unlike this failure:

  https://travis-ci.org/simonw/fivethirtyeight-datasette/builds/488047550

  ```
  2.25s$ datasette publish heroku fivethirtyeight.db -m metadata.json -n fivethirtyeight-datasette
  tar: unrecognized option '--exclude-vcs-ignores'
  Try 'tar --help' or 'tar --usage' for more information.
   ▸    Command failed: tar cz -C /tmp/tmpuaxm7i8f --exclude-vcs-ignores --exclude
   ▸    .git --exclude .gitmodules . >
   ▸    /tmp/f49440e0-1bf3-4d3f-9eb0-fbc2967d1fd4.tar.gz
   ▸    tar: unrecognized option '--exclude-vcs-ignores'
   ▸    Try 'tar --help' or 'tar --usage' for more information.
   ▸    
  The command "datasette publish heroku fivethirtyeight.db -m metadata.json -n fivethirtyeight-datasette" exited with 0.
  ```

  The fix for that issue is to call the heroku command like this:

      heroku builds:create -a app_name --include-vcs-ignore


hash: cc4a21e0da33c2ca90dc4ba9d4571953a7378d65
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-02-02T21:07:27-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-02-02T21:07:27-08:00
file_name: datasette/publish/heroku.py
message:
  --include-vcs-ignore

  Seeing if I can get this branch to be able to run
  datasette heroku deploy on Travis CI running Ubuntu Trusty


hash: b944bcd0f0e0914a9f308945faffed88ad6c3b4c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-01-31T19:36:07-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-01-31T19:36:07-08:00
file_name: docs/Makefile
message:
  Added documentation on the Datasette Ecosystem

  https://datasette.readthedocs.io/en/latest/ecosystem.html


hash: d95b46b09bf53530b212cc17202a242daa62fd64
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2019-01-01T21:14:46-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2019-01-01T21:15:54-08:00
file_name: datasette/publish/now.py
message:
  datasette publish now --alias option

  You can now use --alias to attempt to alias after you deploy.

  Also updated now.json to use version: 1


hash: 0f3b35d4e8a2e3711c84f4c608cfc15b0c11b0f5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-12-30T21:00:54-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-12-30T21:00:54-08:00
file_name: datasette/app.py
message:
  Experimental new table / encoding schema

  See https://github.com/django/asgiref/issues/51#issuecomment-450603464


hash: 3de8fac1d322cbab6c8c55899e0e8511b36337d0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-11-20T09:16:31-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-11-20T09:46:47-08:00
file_name: tests/fixtures.py
message:
  New make_app_client() pattern

  Because next version of pytest discourages calling fixture factories as functions


hash: d0393e821e5914a7c1d659eaf0a5d612a1aa8e01
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-11-04T22:45:38-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-11-04T22:45:38-08:00
file_name: .travis.yml
message:
  Travis to use Python 3.7-dev for a little longer

  3.7 produces a 403 forbidden error: https://travis-ci.org/simonw/datasette/jobs/450716231#L6


hash: 7dda8898c12720f1494cfd4761399e95211520a1
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-10-27T10:12:19-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-10-27T10:13:08-07:00
file_name: docs/contributing.rst
message:
  Started contributing docs: setting up a dev environment

  https://datasette.readthedocs.io/en/latest/contributing.html


hash: b7257a21bf3dfa7353980f343c83a616da44daa7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-08-28T17:55:30+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-08-28T17:55:30+01:00
file_name: tests/test_plugins.py
message:
  Fix json.loads in Python 3.5

  3.5 requires a str, not a bytes

  https://travis-ci.org/simonw/datasette/jobs/421660555


hash: b7c6a9f9bd2bbd06ef64fef4a1fcc86fa0039039
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-08-28T11:56:57+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-08-28T11:56:57+01:00
file_name: datasette/app.py
message:
  extra_css_urls(template, database, table, datasette)

  The extra_css_urls and extra_js_urls hooks now take additional optional
  parameters.

  Also refactored them out of the Datasette class and into RenderMixin.

  Plus improved plugin documentation to explicitly list parameters.


hash: 2e836f72d9a4e61341d75ea48e88314e0d006b65
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-08-28T03:03:01-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-08-28T03:03:01-07:00
file_name: datasette/hookspecs.py
message:
  render_cell(value, column, table, database, datasette)

  The render_cell plugin hook previously was only passed value.

  It is now passed (value, column, table, database, datasette).


hash: 4ac913224061f2dc4f673efab1a5ac6bc748854f
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-08-04T17:14:56-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-08-04T17:14:56-07:00
file_name: datasette/app.py
message:
  render_cell(value) plugin hook, closes #352

  New plugin hook for customizing the way cells values are rendered in HTML.

  The first full example of this hook in use is https://github.com/simonw/datasette-json-html


hash: 04c7fd62077e7daffdaa92f00a2e4e51cbbad3a1
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-30T20:54:38-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-30T20:54:38-07:00
file_name: datasette/views/table.py
message:
  Handle multiple m2m args of same name

  e.g. ?_m2m_ad_targets__target_id=ec3ac&_m2m_ad_targets__target_id=e128e


hash: 0cf91e3f8822476eedc8a8703ca1b729a94e9a1a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-30T08:16:56-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-30T08:16:56-07:00
file_name: datasette/views/table.py
message:
  Started playing with m2m options

  This query is really slow. I think this pattern would be faster:

  	select ads.id, ads.text, ads.url
  	from ads
  	  inner join ad_targets ad_targets_1 on ad_targets_1.ad_id = ads.id
  	  inner join ad_targets ad_targets_2 on ad_targets_2.ad_id = ads.id
  	  where ad_targets_1.target_id = "cd0d0"
  	  and ad_targets_2.target_id = "26eb3"
  	order by ads.id


hash: 8128497b7946ab68fff703e207fc7c5b26b6e9c9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-27T21:49:20-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-27T21:49:20-07:00
file_name: tests/test_docs.py
message:
  Only run documented_views() fixture once per session

  Speeds up tests, because previously it ran once per view class.


hash: 788a542d3c739da5207db7d1fb91789603cdd336
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-27T21:21:42-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-27T21:21:42-07:00
file_name: docs/config.rst
message:
  Docs for IndexView, TableView, RowView, closes #299

  Also removed xfail from test_view_classes_are_documented, so any future *View
  classes that are added without documentation will cause the tests to fail.


hash: e8625695a3b7938f37b64dff09c14e47d9428fe5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-27T20:13:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-27T20:13:26-07:00
file_name: tests/test_docs.py
message:
  xfail documentation unit tests for view classes, refs #299

  More documentation unit tests. These ones check that every single **View class
  imported into the datasette/app.py module are covered by our documentation.

  Just one problem: they aren't documented yet. So I'm using the xfail pytest
  decorator to mark these tests as allowed-to-fail. When you run the test suite
  you now get a report of how many views still need to be documented, but it
  doesn't fail the tests.

  The output looks something like this:

      $ pytest tests/test_docs.py
      collected 31 items

      tests/test_docs.py ..........................XXXxx.                [100%]

      ============ 26 passed, 2 xfailed, 3 xpassed in 1.06 seconds ============

  Once I have documented all the views I will remove the xfail so any future
  views that are added without documentation will cause a test failure.

  We can detect that a view is documented by looking for ReST label in the docs,
  for example:

      .. _IndexView:

  Some view classes can be used to power multiple URLs - the JsonDataView class
  for example is used to power /-/metadata and /-/config and /-/plugins

  In this case, the second part of the label can indicate the variety of page, e.g:

      .. _JsonDataView_metadata:

  The test will pass as long as there is at least one label that starts with
  _JsonDataView.


hash: 1fb518618c1c246c58daf5085247b430f2aea29f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-25T22:43:01-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-25T22:43:01-07:00
file_name: datasette/utils.py
message:
  "datasette publish heroku" improvements

  * Fixed bug where --title= didn't work if -m not provided
  * Now using Python 3.6.6 instead of Python 3.6.3


hash: dbbe707841973b50a76d2703003ae2c40e7ad1fd
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-07-25T22:15:59-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-07-25T22:15:59-07:00
file_name: datasette/app.py
message:
  publish_subcommand hook + default plugins mechanism, used for publish heroku/now (#349)

  This change introduces a new plugin hook, publish_subcommand, which can be
  used to implement new subcommands for the "datasette publish" command family.

  I've used this new hook to refactor out the "publish now" and "publish heroku"
  implementations into separate modules. I've also added unit tests for these
  two publishers, mocking the subprocess.call and subprocess.check_output
  functions.

  As part of this, I introduced a mechanism for loading default plugins. These
  are defined in the new "default_plugins" list inside datasette/app.py

  Closes #217 (Plugin support for datasette publish)
  Closes #348 (Unit tests for "datasette publish")
  Refs #14, #59, #102, #103, #146, #236, #347


hash: 74ad3ff4af4ebb499b07c6ce984def7d88fcbbb7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-24T09:00:10-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-24T09:01:23-07:00
file_name: docs/datasette-package-help.txt
message:
  Ensure --help examples in docs are always up to date, closes #336

  Unit tests now check that docs/*.txt help examples are all up-to-date.

  I ran into a problem here in that the terminal_width needed to be more
  accurately defined - so I replaced update-docs-help.sh with update-docs-
  help.py which hard-codes the terminal width.


hash: 3a46d5e3c4278e74c3694f36995ea134bff800bc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-23T21:48:36-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-07-23T21:48:36-07:00
file_name: .travis.yml
message:
  Removed docker -e flag

  docker -e flag is now deprecated: https://docs.docker.com/engine/deprecated/#-e-and---email-flags-on-docker-login


hash: 2bdab66772dca51b0c729b4e1063610cb2edd890
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-23T21:17:57-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-07-23T21:17:57-07:00
file_name: .travis.yml
message:
  Build and push new tagged releases to Docker Hub

  Based on method described in https://sebest.github.io/post/using-travis-ci-to-build-docker-images/


hash: 6e37f091edec35e2706197489f54fff5d890c63c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-15T19:33:30-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-15T19:33:30-07:00
file_name: datasette/app.py
message:
  Support title/description for canned queries, closes #342

  Demo here: https://latest.datasette.io/fixtures/neighborhood_search


hash: 58fec99ab0a31bcf25968f2aa05d37de8139b83c
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2018-07-14T14:10:49+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-07-14T07:04:42-07:00
file_name: datasette/cli.py
message:
  Allow app names for `datasette publish heroku`

  Lets you supply the `-n` parameter for Heroku deploys, which also lets
  you update existing Heroku deployments.


hash: 31a5d8fa77be68d4f837f0a80a611675dce49f4b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-12T10:41:20-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-07-12T11:07:37-07:00
file_name: setup.py
message:
  Bump aiohttp to fix compatibility with Python 3.7

  Tests failed here: https://travis-ci.org/simonw/datasette/jobs/403223333


hash: aec3ae53237e43b0c268dbf9b58fa265ef38cfe1
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-07-10T19:04:13-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-10T19:05:46-07:00
file_name: docs/datasette-package-help.txt
message:
  Docs for datasette publish and package, closes #337

  Also introduced a new mechanism for ensuring the --help examples in the
  documentation reflect the current output of the --help commands, via a new
  update-docs-help.sh script. Closes #336


hash: d08faa89872d9ec8d3c8e76d85164ccd84596811
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-29T07:52:51-05:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-07-07T19:58:11-07:00
file_name: datasette/app.py
message:
  Fix for weird nested exception in RequestTimeout

  I saw this error:

      sanic.exceptions.RequestTimeout: Request Timeout

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/Users/simonw/Dropbox/Development/datasette/venv/lib/python3.6/site-packages/sanic/handlers.py", line 82, in response
          response = handler(request=request, exception=exception)
        File "/Users/simonw/Dropbox/Development/datasette/datasette/app.py", line 512, in on_exception
          if request.path.split("?")[0].endswith(".json"):
      AttributeError: 'NoneType' object has no attribute 'path'

  Strangely "if request and request.path..." did not work here, because the
  Sanic Request class extends builtins.dict and hence evaluates to False if it
  has no headers.


hash: 139a6e9e41dc3dd006483a4d53259addc4401fa1
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-06-23T18:03:51-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-06-23T18:03:51-07:00
file_name: .travis.yml
message:
  Revert "Speed up Travis by reusing pip wheel cache across builds (#324)"

  This reverts commit 47e689a89b3f5f0969595b17d2ec59ea3caffb3b.


hash: 47e689a89b3f5f0969595b17d2ec59ea3caffb3b
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-06-23T18:03:46-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-06-23T18:03:46-07:00
file_name: .travis.yml
message:
  Speed up Travis by reusing pip wheel cache across builds (#324)

  * Cache pip wheels between runs in Travis, refs #323
  * Run pytest manually - "python setup.py test" appeared to still download a bunch of stuff: https://travis-ci.org/simonw/datasette/jobs/395306188

  * Use extras_require so pip can install test dependencies: https://github.com/pypa/pip/issues/1197#issuecomment-228939212


hash: 7d7f5f61fd6dca3385386a657a13057680d8ddd7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-21T20:03:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-21T20:03:54-07:00
file_name: setup.py
message:
  Use extras_require so pip can install test dependencies

  https://github.com/pypa/pip/issues/1197#issuecomment-228939212


hash: 69b3a6c7ddf0e4e188a600ae50949c2b6ddc166a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-21T19:59:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-21T19:59:26-07:00
file_name: .travis.yml
message:
  Run pytest manually

  python setup.py test appeared to still download a bunch of stuff
  https://travis-ci.org/simonw/datasette/jobs/395306188


hash: aeeb50f61b7b1bf8ccb61448f8b8253db457d350
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-20T21:30:13-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-20T21:30:13-07:00
file_name: datasette/templates/table.html
message:
  Correctly display facets with value of 0 - fixes #318

  Also added comprehensive unit test for facet display HTML.


hash: 398d29c2873ad22a8e779fab12e65bdbf598f823
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T23:14:48-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T23:14:48-07:00
file_name: datasette/templates/query.html
message:
  Don't link to #export on custom query results

  The advanced CSV export options don't work for custom SQL queries.

  Refs #266


hash: fc3660cfad7668dbce6ead12766e048fc1f78b11
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-06-17T20:21:02-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-06-17T20:21:02-07:00
file_name: .travis.yml
message:
  Streaming mode for downloading all rows as a CSV (#315)

  * table.csv?_stream=1 to download all rows - refs #266

  This option causes Datasette to serve ALL rows in the table, by internally
  following the _next= pagination links and serving everything out as a stream.

  Also added new config option, allow_csv_stream, which can be used to disable
  this feature.

  * New config option max_csv_mb limiting size of CSV export


hash: 619a9ddb338e2b11419477a6f16c6ef5bd57d32b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T19:31:09-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T19:31:09-07:00
file_name: datasette/app.py
message:
  table.csv?_stream=1 to download all rows - refs #266

  This option causes Datasette to serve ALL rows in the table, by internally
  following the _next= pagination links and serving everything out as a stream.

  Also added new config option, allow_csv_stream, which can be used to disable
  this feature.


hash: 6a32684ebba89dfe882e1147b23aa8778479f5d8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T15:19:21-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T15:24:47-07:00
file_name: .travis.yml
message:
  Release tagged versions to PyPI and now alias

  When a new tagged version is pushed, this should:

  * bdist_wheel it and release to https://pypi.python.org/pypi/datasette
  * Set an alias of v0-22-1.datasette.io for the deployed demo


hash: f0c17229b7a7914d3da02e087dfd0e25d8321448
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T14:24:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T14:24:39-07:00
file_name: .travis.yml
message:
  Deploy latest.datasette.io on commit to master - #313

  If the tests pass in Travis CI, deploy an instance containing Datasette's test
  fixtures to https://latest.datasette.io/

  Also set up an alias of truncated-commit-hash.datasette.io


hash: db1e6bc182d11f333e6addaa1a6be87625a4e12b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T13:14:55-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T14:19:39-07:00
file_name: README.md
message:
  --version-note for datasette, datasette publish and datasette package

  This is a relatively obscure new command-line argument that helps solve the
  problem of showing accurate version information in deployed instances of
  Datasette even if they were deployed directly from source code.

  You can pass --version-note to datasette publish and package and it will then
  in turn be passed to datasette when it starts:

      datasette --version-note=hello fixtures.db

  Now if you visit /-/versions.json you will see this:

      {
          "datasette": {
              "note": "hello",
              "version": "0+unknown"
          },
          "python": {
              "full": "3.6.5 (default, Jun  6 2018, 19:19:24) \n[GCC 6.3.0 20170516]",
              "version": "3.6.5"
          },
          ...
      }

  I plan to use this in some Travis CI configuration, refs #313


hash: 538565de3a126a6aa1cdb4b4ba91135507411af0
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T12:46:52-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T14:16:08-07:00
file_name: README.md
message:
  datasette publish now --token=X argument

  Lets you specify the auth token to use when deploying to Now.

  Tokens can be created at https://zeit.co/account/tokens


hash: 6a32df334de1a7e3579879dd7ee073613be9b91b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-17T12:16:04-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-17T12:16:04-07:00
file_name: tests/fixtures.py
message:
  Improved fixtures to support publication

  The fixtures database created by our unit tests makes for a good "live" demo
  of Datasette in action.

  I've improved the metadata it ships with to better support this use-case.

  I've also improved the mechanism for writing out fixtures: you can do this:

  	python tests/fixtures.py fixtures.db

  To get just the fixtures database written out... or you can do this:

  	python tests/fixtures.py fixtures.db fixtures.json

  To get metadata which you can then serve like so:

  	datasette fixtures.db -m fixtures.json

  Refs #313


hash: 68302b6ca2fff79fd6d2a7296dead8dc1c59f04c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-16T21:45:30-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-16T21:45:30-07:00
file_name: datasette/templates/_rows_and_columns.html
message:
  Refactored everything to use new qs instead of request

  I don't like this, I think I will go back to the request object but with my
  own custom request object that has a request.qs property.


hash: ed631e690b81e34fcaeaba1f16c9166f1c505990
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-16T15:18:57-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-16T15:18:57-07:00
file_name: datasette/utils.py
message:
  ?_labels= and ?_label=COL to expand foreign keys in JSON/CSV

  These new querystring arguments can be used to request expanded foreign keys
  in both JSON and CSV formats.

  ?_labels=on turns on expansions for ALL foreign key columns

  ?_label=COLUMN1&_label=COLUMN2 can be used to pick specific columns to expand

  e.g. `Street_Tree_List.json?_label=qSpecies&_label=qLegalStatus`

      {
          "rowid": 233,
          "TreeID": 121240,
          "qLegalStatus": {
              "value" 2,
              "label": "Private"
          }
          "qSpecies": {
              "value": 16,
              "label": "Sycamore"
          }
          "qAddress": "91 Commonwealth Ave",
          ...
      }

  The labels option also works for the HTML and CSV views.

  HTML defaults to `?_labels=on`, so if you pass `?_labels=off` you can disable
  foreign key expansion entirely - or you can use `?_label=COLUMN` to request
  just specific columns.

  If you expand labels on CSV you get additional columns in the output:

  `/Street_Tree_List.csv?_label=qLegalStatus`

      rowid,TreeID,qLegalStatus,qLegalStatus_label...
      1,141565,1,Permitted Site...
      2,232565,2,Undocumented...

  I also refactored the existing foreign key expansion code.

  Closes #233. Refs #266.


hash: 0c22fa8f09e9fce7434d5fc83bcfb73c25795205
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-16T10:33:17-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-16T10:33:17-07:00
file_name: datasette/app.py
message:
  Cleaned up view_definition/table_definition code in table view

  Also moved those out of standard JSON into just the HTML template context


hash: 40287b1ba09d6e75f0db1458fe78d8c055f128af
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-16T15:00:14-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-16T15:08:11-07:00
file_name: datasette/views/base.py
message:
  ?_labels= and ?_label=COL to expand foreign keys in JSON/CSV

  These new querystring arguments can be used to request expanded foreign keys
  in both JSON and CSV formats.

  ?_labels=on turns on expansions for ALL foreign key columns

  ?_label=COLUMN1&_label=COLUMN2 can be used to pick specific columns to expand

  e.g. `Street_Tree_List.json?_label=qSpecies&_label=PlantType&_shape=array`

      [
        {
          "rowid": 1,
          "TreeID": 141565,
          "qLegalStatus": 1,
          "qSpecies": {
            "value": 1,
            "label": "Myoporum laetum :: Myoporum"
          },
          "qAddress": "501X Baker St",
          "SiteOrder": 1,
          "qSiteInfo": 1,
          "PlantType": {
            "value": 1,
            "label": "Tree"
          },
          "qCaretaker": 1,
          "qCareAssistant": null,
          "PlantDate": "07/21/1988 12:00:00 AM",
          "DBH": 21,
          "PlotSize": "Width 0ft",
          "PermitNotes": "Permit Number 25401",
          "XCoord": 6000609,
          "YCoord": 2110829,
          "Latitude": 37.7759676911831,
          "Longitude": -122.441396661871,
          "Location": "(37.7759676911831, -122.441396661871)"
        },
        {
          "rowid": 2,
          "TreeID": 232565,
          "qLegalStatus": 2,
          "qSpecies": {
            "value": 2,
            "label": "Metrosideros excelsa :: New Zealand Xmas Tree"
          },
          "qAddress": "940 Elizabeth St",
          "SiteOrder": 1,
          "qSiteInfo": 2,
          "PlantType": {
            "value": 1,
            "label": "Tree"
          },
          "qCaretaker": 1,
          "qCareAssistant": null,
          "PlantDate": "03/20/2017 12:00:00 AM",
          "DBH": 3,
          "PlotSize": "Width 4ft",
          "PermitNotes": "Permit Number 779625",
          "XCoord": 6000396.48544,
          "YCoord": 2101998.8644,
          "Latitude": 37.7517102172731,
          "Longitude": -122.441498017841,
          "Location": "(37.7517102172731, -122.441498017841)"
        }
      ]

  The labels option also works for the HTML and CSV views.

  HTML defaults to `?_labels=on`, so if you pass `?_labels=off` you can disable
  foreign key expansion entirely - or you can use `?_label=COLUMN` to request
  just specific columns.

  If you expand labels on CSV you get additional columns in the output:

  `/Street_Tree_List.csv?_label=qLegalStatus`

      rowid,TreeID,qLegalStatus,qLegalStatus_label...
      1,141565,1,Permitted Site...
      2,232565,2,Undocumented...

  I also refactored the existing foreign key expansion code.

  Closes #233. Refs #266.


hash: dd781e680cf236c3f0ed511a8602f7dc61ff6d6c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-16T09:28:55-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-16T15:07:01-07:00
file_name: datasette/utils.py
message:
  Switch back from python:3.6-slim-stretch to python:3.6

  Turns out slim-stretch doesn't include gcc which means it can't build various
  Sanic dependencies. So `datasette publish now ...` was broken.

  Fixes #310


hash: 825b8a2557dc2b42d008c102cc1477662094b172
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-15T08:52:43-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-15T08:52:43-07:00
file_name: datasette/utils.py
message:
  .json?_labels=1 to expand foreign keys, refs #233

  Output looks something like this:

      {
          "rowid": 233,
          "TreeID": 121240,
          "qLegalStatus": {
              "value" 2,
              "label": "Private"
          }
          "qSpecies": {
              "value": 16,
              "label": "Sycamore"
          }
          "qAddress": "91 Commonwealth Ave",
          ...
      }


hash: 5bda4a477c52b6d1cd7d0ca25382dbb20bda40ea
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-15T00:01:48-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-15T00:01:48-07:00
file_name: tests/test_csv.py
message:
  Fixed CSV tests - Python 3.6.5 and 3.6.3 apparently differ

  The test used to expect CSV to come back like this:

  	hello
  	world
  	""

  With the final blank value encoded in quotes.

  Judging by Travis failures, this behaviour changed between Python 3.6.3 and
  3.6.5:

  	https://travis-ci.org/simonw/datasette/jobs/392586661


hash: 3a79ad98eafb9da527a3b9d9d8fbeb81936b02e7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-14T23:51:23-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-14T23:51:23-07:00
file_name: datasette/app.py
message:
  Basic CSV export, refs #266

  Tables and custom SQL query results can now be exported as CSV.

  The easiest way to do this is to use the .csv extension, e.g.

  	/test_tables/facet_cities.csv

  By default this is served as Content-Type: text/plain so you can see it in
  your browser. If you want to download the file (using text/csv and with an
  appropriate Content-Disposition: attachment header) you can do so like this:

  	/test_tables/facet_cities.csv?_dl=1

  We link to the CSV and downloadable CSV URLs from the table and query pages.

  The links use ?_size=max and so by default will return 1,000 rows.

  Also fixes #303 - table names ending in .json or .csv are now detected and
  URLs are generated that look like this instead:

  	/test_tables/table%2Fwith%2Fslashes.csv?_format=csv

  The ?_format= option is available for everything else too, but we link to the
  .csv / .json versions in most cases because they are aesthetically pleasing.


hash: 864328e074d771a9b50fb1b01392541d7045fbb5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-06-04T20:53:12-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-06-04T20:53:12-07:00
file_name: tests/fixtures.py
message:
  Test client wrapper removing need for gather_request - refs #272

  As part of decoupling from Sanic, this will make it easier to run tests
  against ASGI instead.


hash: b18e4515855c3f1eeca3dfcccdbb6df05869084a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-31T07:16:50-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-31T07:16:50-07:00
file_name: README.md
message:
  datasette publish/package --spatialite, closes #243

  New command-line argument which causes SpatiaLite to be installed and
  configured for the published Datasette.

  	datasette publish now --spatialite mydb.db


hash: 969771770fcf795daace72e2310804e699067cfe
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-31T06:40:30-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-31T06:42:37-07:00
file_name: setup.py
message:
  Upgrade pytest to 3.6.0

  https://github.com/pytest-dev/pytest/issues/1875 made it impossible to declare
  a function as a fixture multiple times, which we were doing across different
  modules. The fix was to move our @pytest.fixture calls into decorators in the
  tests/fixtures.py module.


hash: a4d6acc23943759b46fa90ec68e500016b933410
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-28T13:41:06-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-28T13:41:06-07:00
file_name: tests/test_api.py
message:
  Use scope='session' for all fixtures

  This means they will only be executed once which makes sense
  since the database they create is immutable.


hash: 76d11eb768e2f05f593c4d37a25280c0fcdf8fd6
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-28T11:08:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-28T11:08:39-07:00
file_name: datasette/views/base.py
message:
  New ?_json=colname argument for returning unescaped JSON

  Also extracted docs for special JSON arguments into a new section.

  Closes #31


hash: 2ef42bb9808d8d731783ac6624dc045d9c87047e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-27T08:53:42-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-27T08:53:42-07:00
file_name: datasette/views/table.py
message:
  First working prototype of columns and column_selects metadata

  refs #292

  Currently breaks if you forget to include the primary keys in the columns setting
  as we can no longer calculate the _next link using the returned data.

  Needs a whole lotta unit tests and documentation.


hash: 37f8361c6f7b3eeaa351c0cd93b6db1fdd2744ab
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-26T11:04:09-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-26T11:04:09-07:00
file_name: docs/index.rst
message:
  Initial documentation on using SpatiaLite

  https://datasette.readthedocs.io/en/latest/spatialite.html


hash: 81df47e8d95df895bec792466b3d7b34c8d5c509
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-24T17:15:37-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-24T17:15:53-07:00
file_name: datasette/app.py
message:
  Moved .execute() method from BaseView to Datasette class

  Also introduced new Results() class with results.truncated, results.description, results.rows


hash: bd30c696e18927207358ee9d63174a5c41c8297e
author_name: Ravi Kotecha
author_email: kotecha.ravi+github@gmail.com
author_date: 2018-05-23T18:43:34+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-05-23T10:43:34-07:00
file_name: Dockerfile
message:
  Build Dockerfile with recent Sqlite + Spatialite (#280)

  Closes #278

  ```bash
    $ docker run --rm -it datasette spatialite
    SpatiaLite version ..: 4.4.0-RC0	Supported Extensions:
      - 'VirtualShape'	[direct Shapefile access]
      - 'VirtualDbf'		[direct DBF access]
      - 'VirtualXL'		[direct XLS access]
      - 'VirtualText'		[direct CSV/TXT access]
      - 'VirtualNetwork'	[Dijkstra shortest path]
      - 'RTree'		[Spatial Index - R*Tree]
      - 'MbrCache'		[Spatial Index - MBR cache]
      - 'VirtualSpatialIndex'	[R*Tree metahandler]
      - 'VirtualElementary'	[ElemGeoms metahandler]
      - 'VirtualKNN'	[K-Nearest Neighbors metahandler]
      - 'VirtualXPath'	[XML Path Language - XPath]
      - 'VirtualFDO'		[FDO-OGR interoperability]
      - 'VirtualGPKG'	[OGC GeoPackage interoperability]
      - 'VirtualBBox'		[BoundingBox tables]
      - 'SpatiaLite'		[Spatial SQL - OGC]
    PROJ.4 version ......: Rel. 4.9.3, 15 August 2016
    GEOS version ........: 3.5.1-CAPI-1.9.1 r4246
    TARGET CPU ..........: x86_64-linux-gnu
    the SPATIAL_REF_SYS table already contains some row(s)
    SQLite version ......: 3.23.1
    Enter ".help" for instructions
    SQLite version 3.23.1 2018-04-10 17:39:29
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    spatialite>
  ```

  ```bash
  $ docker run --rm -it datasette python -c "import sqlite3; print(sqlite3.sqlite_version)"
  3.23.1
  ```

  Also updates the query used to check for FTS5 as the old version wasn't
  detecting FTS5 for some reason.


hash: fc47dacbbd4c4d245d7144e4cc014d3303f84b9a
author_name: Robert Gieseke
author_email: rob.g@web.de
author_date: 2018-05-22T19:18:00+02:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-05-22T12:35:21-07:00
file_name: datasette/__init__.py
message:
  Add `__version_info__` derived from `__version__`

  This might be tuple of more than two values (major and minor
  version) if commits have been made after a release.


hash: a113c28ea1924d83e6789ae5e0805312e55b4490
author_name: Robert Gieseke
author_email: robert.gieseke@pik-potsdam.de
author_date: 2018-05-22T17:33:29+02:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-05-22T12:35:21-07:00
file_name: .gitattributes
message:
  Add version number support with Versioneer

  Repo:
  https://github.com/warner/python-versioneer

  Versioneer Licence:
  Public Domain (CC0-1.0)

  Closes #273


hash: bd3353a31f930c2e504094d79513cadbade43cda
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-20T14:28:53-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-20T14:28:53-07:00
file_name: docs/config.rst
message:
  Added docs for introspection endpoints

  https://datasette.readthedocs.io/en/latest/introspection.html


hash: f6183ff5fa715c68d13d6ae8c7b3b9f2c6ffc9f8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-20T10:01:49-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-20T10:01:49-07:00
file_name: README.md
message:
  Renamed --limit to --config, added --help-config, closes #274

  Removed the --page_size= argument to datasette serve in favour of:

      datasette serve --config default_page_size:50 mydb.db

  Added new help section:

      $ datasette --help-config
      Config options:
        default_page_size            Default page size for the table view
                                     (default=100)
        max_returned_rows            Maximum rows that can be returned from a table
                                     or custom query (default=1000)
        sql_time_limit_ms            Time limit for a SQL query in milliseconds
                                     (default=1000)
        default_facet_size           Number of values to return for requested facets
                                     (default=30)
        facet_time_limit_ms          Time limit for calculating a requested facet
                                     (default=200)
        facet_suggest_time_limit_ms  Time limit for calculating a suggested facet
                                     (default=50)


hash: 918de9403e09ba607996a985be1779eddcf76151
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-20T08:10:46-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-20T08:10:46-07:00
file_name: datasette/static/app.css
message:
  Only apply responsive table styles to .rows-and-column

  Otherwise they interfere with tables in the description, e.g. on
  https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo


hash: b8227556c6ef040e2299b113d1ec6e220586ffc3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-18T09:18:41-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-18T09:18:51-07:00
file_name: datasette/templates/table.html
message:
  Suggested facets now use #fragment links

  Useful for pages with large amounts of content at the top like on
  https://fivethirtyeight.datasettes.com/fivethirtyeight-469e30d/nba-elo%2Fnbaallelo


hash: 08f4b7658fec97419eb34118a2cd5c8be805673f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-17T23:07:45-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-17T23:11:23-07:00
file_name: datasette/templates/table.html
message:
  Show facets that timed out using new InterruptedError

  If the user requests some _facet= options that do not successfully execute in
  the configured facet_time_limit_ms, we now show a warning message like this:

      These facets timed out: rowid, Title

  To build this I had to clean up our SQLite interrupted logic. We now raise a
  custom InterruptedError exception when SQLite terminates due to exceeding a
  time limit.

  In implementing this I found and fixed a logic error where invalid SQL was
  being generated in some cases for our faceting calculations but the resulting
  sqlite3.OperationalError had been incorrectly captured and treated as a
  timeout.

  Refs #255
  Closes #269


hash: cef9a9a8701af86cc7df8b7939398185f0a76f5f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-17T22:08:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-17T22:08:26-07:00
file_name: README.md
message:
  --limit= mechanism plus new limits for facets

  Replaced the --max_returned_rows and --sql_time_limit_ms options to
  "datasette serve" with a new --limit option, which supports a larger
  list of limits.

  Example usage:

  	datasette serve --limit max_returned_rows:1000 \
  		--limit sql_time_limit_ms:2500 \
  		--limit default_facet_size:50 \
  		--limit facet_time_limit_ms:1000 \
  		--limit facet_suggest_time_limit_ms:500

  New docs: https://datasette.readthedocs.io/en/latest/limits.html

  Closes #270
  Closes #264


hash: 142a550a99f3c78349a10ed79f1b513fe704a169
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-15T06:50:27-03:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-05-16T08:27:24-07:00
file_name: datasette/templates/table.html
message:
  Facet results now have "truncated" field

   To indicate if there was more than 20 distinct values. Refs #255


hash: 70ff615f1b831c4dce936e9f9fc57a9e8e71e547
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-12T18:35:25-03:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-12T18:44:09-03:00
file_name: datasette/utils.py
message:
  utils.path_with_added_args() improvements

  * Now covered by unit tests
  * Preserves original order
  * Can handle multiple args of the same name, e.g. ?bar=1&bar=2


hash: 62c08d0d7197264af678c2f6e0c6403196217184
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-05T20:22:21-03:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-05T20:22:21-03:00
file_name: .travis.yml
message:
  Revert "Travis should now deploy new tags to PyPI if tests pass"

  This reverts commit d39b2e357e34469728f300273ab07c3904ea7a2b.

  It failed with this error: https://travis-ci.org/simonw/datasette/jobs/375398977

  	Uploading distributions to https://upload.pypi.org/legacy/
  	Uploading datasette-0.21-py3-none-any.whl
  	100% 182k/182k [00:00<00:00, 694kB/s]
  	HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/


hash: 801381b7657dd084c11ac2fb6e3d0194cfaa3455
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-05T19:41:37-03:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-05T19:44:32-03:00
file_name: tests/fixtures.py
message:
  Default tests to using a longer timelimit

  Every now and then a test will fail in Travis CI on Python 3.5 because it hit
  the default 20ms SQL time limit.

  Test fixtures now default to a 200ms time limit, and we only use the 20ms time
  limit for the specific test that tests query interruption. This should make
  our tests on Python 3.5 in Travis much more stable.


hash: bb87cf873017c70a2e9155c336067d4e82481dd6
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-02T01:46:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-05-03T11:09:27-03:00
file_name: datasette/app.py
message:
  Added /-/versions and /-/versions.json, closes #244

  Sample output:

      {
        "python": {
          "version": "3.6.3",
          "full": "3.6.3 (default, Oct  4 2017, 06:09:38) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]"
        },
        "datasette": {
          "version": "0.20"
        },
        "sqlite": {
          "version": "3.23.1",
          "extensions": {
            "json1": null,
            "spatialite": "4.3.0a"
          }
        }
      }


hash: 690736436bac599ca042d1caa465c6d66d2651f9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-01T17:17:39-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-05-01T17:20:39-07:00
file_name: tests/test_api.py
message:
  Bump up time limit for test_paginate_tables_and_views

  It was intermittently failing in Travis CI on Python 3.5:

  https://travis-ci.org/simonw/datasette/jobs/373713476


hash: a4cc5dc81364a7300f0ba0bd5711633e803c250a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-05-01T17:08:16-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-05-01T17:20:39-07:00
file_name: datasette/app.py
message:
  New ?_shape=array option + tweaks to _shape, closes #245

  * Default is now ?_shape=arrays (renamed from lists)
  * New ?_shape=array returns an array of objects as the root object
  * Changed ?_shape=object to return the object as the root
  * Updated docs


hash: f188ceaa2a3a5b2eab83425ad0f00cb0d364e24a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-25T21:47:12-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-25T21:47:12-07:00
file_name: datasette/app.py
message:
  New ?_size=XXX querystring parameter for table view, closes #229

  Also added documentation for all of the _special arguments.

  Plus deleted some duplicate logic implementing _group_count.


hash: 4504d5160b2d86d4dae17b7c2f72bc3b02509c2c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-25T21:04:12-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-25T21:04:12-07:00
file_name: datasette/app.py
message:
  If max_returned_rows==page_size, increment max_returned_rows

  Fixes #230, where if the two were equal pagination didn't work correctly.


hash: 404fa2252b070952ff1d1fc8bafc153789f36ada
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-18T07:48:34-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-18T07:55:36-07:00
file_name: datasette/cli.py
message:
  datasette publish/package --install option, closes #223

  Allows you to specify one or more additional packages to be installed,
  useful for deploying plugins.


hash: 2b344f6a34d2adaa305996a1a580ece06397f6e4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-18T07:14:21-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-18T07:52:17-07:00
file_name: datasette/cli.py
message:
  Ran black against datasette/cli.py

  https://pypi.org/project/black/

  cli.py was getting a bit untidy due to all of the heavily annotated
  click function methods - used black to clean it up and make it
  easier to read.


hash: 4be6deb94776744071311777f0b18efb993c0cfa
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-04-17T20:24:20-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-04-17T20:24:20-07:00
file_name: datasette/app.py
message:
  Fix for plugins in Python 3.5 (#222)

  ModuleNotFoundError is not a thing in Python 3.5, so catch KeyError/ImportError instead.


hash: dfb87d012c30a5a3e2d6c4f2cf0a94d2fd080723
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-17T18:19:21-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-17T18:19:21-07:00
file_name: datasette/templates/_rows_and_columns.html
message:
  Use to_css_class for table cell column classes

  This ensures that columns with spaces in the name will still
  generate usable CSS class names. Refs #209


hash: 4586aa506a054d07e674cde8143a3008e6bc5d78
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2018-04-15T22:49:01+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-17T18:13:02-07:00
file_name: datasette/app.py
message:
  Don't duplicate simple primary keys in the link column

  When there's a simple (single-column) primary key, it looks weird to
  duplicate it in the link column.

  This change removes the second PK column and treats the link column as
  if it were the PK column from a header/sorting perspective.


hash: aaf59db570ab7688af72c08bb5bc1edc145e3e07
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-17T18:08:51-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-17T18:09:48-07:00
file_name: tests/fixtures.py
message:
  Longer time limit for test_paginate_compound_keys

  It was failing intermittently in Travis - see #209


hash: 902a5bf28f6df995ca38d9cf8a54a47dd43a8f84
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-17T17:36:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-17T17:36:39-07:00
file_name: datasette/app.py
message:
  About to try to get these tests to pass in Travis

  Merge branch 'cleaner-link-column' of https://github.com/russss/datasette into cleaner-link-column-pass-tests


hash: 5ebc7137d736d8fa47b24cc799fb93909f49cabb
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-17T17:31:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-17T17:31:54-07:00
file_name: datasette/app.py
message:
  Use application/octet-stream for downloadable databses

  I'd also like to send the Content-Length here but that's not currently
  possible in Sanic - see bug report here:

  https://github.com/channelcat/sanic/issues/1194


hash: e7c769ef30add8f984eab920b2f503d4b8096bde
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-16T18:41:17-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-16T18:41:55-07:00
file_name: datasette/app.py
message:
  Working implementation of #216 which passes the tests

  Reverted commit 5364fa7f3357f2de24fd45c85832205377642f19 (where I removed the
  code that didn't work).

  Added primary keys to order-by clause for sorting to get tests to pass


hash: 5364fa7f3357f2de24fd45c85832205377642f19
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-16T17:52:22-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-16T17:53:37-07:00
file_name: datasette/app.py
message:
  Revert #216 until I can get tests to pass in Travis

  Revert "Fix for _sort_desc=sortable_with_nulls test, refs #216"

  This reverts commit 07fc2d113e462bfd8d7d56152c0d1fc55e0fdbe9.

  Revert "Fixed #216 - paginate correctly when sorting by nullable column"

  This reverts commit 2abe539a0f9f967ec0de6894774cb7ee83c4b3b9.


hash: 904f1c75a3c17671d25c53b91e177c249d14ab3b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-16T08:12:09-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-16T08:12:09-07:00
file_name: README.md
message:
  Initial documentation for plugins, closes #213

  https://datasette.readthedocs.io/en/latest/plugins.html


hash: b2955d9065ea019500c7d072bcd9d49d1967f051
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-04-15T22:22:01-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-04-15T22:22:01-07:00
file_name: datasette/app.py
message:
  New --plugins-dir=plugins/ option (#212)

  * New --plugins-dir=plugins/ option

  New option causing Datasette to load and evaluate all of the Python files in
  the specified directory and register any plugins that are defined in those
  files.

  This new option is available for the following commands:

      datasette serve mydb.db --plugins-dir=plugins/
      datasette publish now/heroku mydb.db --plugins-dir=plugins/
      datasette package mydb.db --plugins-dir=plugins/

  * Unit tests for --plugins-dir=plugins/

  Closes #211


hash: 1500b379133b53dc82e451f2bcbec8eed365d4cc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-15T19:18:37-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-15T19:21:46-07:00
file_name: datasette/app.py
message:
  New --plugins-dir=plugins/ option, refs #211

  New option causing Datasette to load and evaluate all of the Python files in
  the specified directory and register any plugins that are defined in those
  files.

  This new option is available for the following commands:

      datasette serve mydb.db --plugins=plugins/
      datasette publish now/heroku mydb.db --plugins=plugins/
      datasette package mydb.db --plugins=plugins/


hash: 33c7c53ff87c25445c68088ede49d062d9c31fe8
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-04-15T17:56:15-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-04-15T17:56:15-07:00
file_name: datasette/__init__.py
message:
  Start of the plugin system, based on pluggy (#210)

  Uses https://pluggy.readthedocs.io/ originally created for the py.test project

  We're starting with two plugin hooks:

  prepare_connection(conn)

  This is called when a new SQLite connection is created. It can be used to register custom SQL functions.

  prepare_jinja2_environment(env)

  This is called with the Jinja2 environment. It can be used to register custom template tags and filters.

  An example plugin which uses these two hooks can be found at https://github.com/simonw/datasette-plugin-demos or installed using `pip install datasette-plugin-demos`

  Refs #14


hash: db02933f1ea48e62fe8f0138c46dcd773e51a68c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-15T17:47:05-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-15T17:47:05-07:00
file_name: setup.py
message:
  Import version datasette.version to avoid dependency error

  Running `from datasette import __version__` in `setup.py` was throwing
  an error `ModuleNotFoundError: No module named 'pluggy'`

  See https://packaging.python.org/guides/single-sourcing-package-version/

  Refs #14


hash: f2720b0c6b7172ebe88209853d0d59866d519246
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-15T16:17:36-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-15T16:17:36-07:00
file_name: datasette/__init__.py
message:
  First working prototype of plugins, refs #14

  Uses pluggy: https://pluggy.readthedocs.io/

  Two example plugins - an uppercase template filter and a convert_units() SQL function.


hash: efbb4e83374a2c795e436c72fa79f70da72309b8
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2018-04-14T17:11:16+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-14T11:00:38-07:00
file_name: datasette/app.py
message:
  Return HTTP 405 on InvalidUsage rather than 500

  This also stops it filling up the logs. This happens for HEAD requests
  at the moment - which perhaps should be handled better, but that's a
  different issue.


hash: 932e0a3f91e4cee92b0e30c528300ec1d348d26c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-04-14T08:21:37-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-04-14T08:21:37-07:00
file_name: .travis.yml
message:
  Don't attempt to deploy new tags to PyPI

  This isn't working through Travis at the moment, so I'm disabling it and switching back to manual deploys.


hash: f2b940d6026677f6859d46a4f16fa402745d261d
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2018-04-14T14:17:20+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-14T07:59:59-07:00
file_name: datasette/app.py
message:
  Link foreign keys which don't have labels

  This renders unlabeled FKs as simple links. I can't see why this would
  cause any major problems.

  Also includes bonus fixes for two minor issues:

  * In foreign key link hrefs the primary key was escaped using HTML
    escaping rather than URL escaping. This broke some non-integer PKs.
  * Print tracebacks to console when handling 500 errors.


hash: 1cc5161089e559c8b16049b20f7a5b3a43290c21
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2018-04-14T13:06:00+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-14T07:24:24-07:00
file_name: datasette/app.py
message:
  Fix sqlite error when loading rows with no incoming FKs

  This fixes `ERROR: conn=<sqlite3.Connection object at 0x10bbb9f10>, sql
  = 'select ', params = {'id': '1'}` caused by an invalid query when
  loading incoming FKs.

  The error was ignored due to async but it still got printed to the
  console.


hash: ec6abc81e433c9bac1b9f085111785fc227e9e34
author_name: Russ Garrett
author_email: russ@garrett.co.uk
author_date: 2018-04-13T22:17:59+01:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-13T20:32:53-07:00
file_name: datasette/app.py
message:
  Initial units support

  Add support for specifying units for a column in metadata.json and
  rendering them on display using
  [pint](https://pint.readthedocs.io/en/latest/).

  ref #203


hash: 9f28bbe43dc277a3963a12aaae37b5ee3c277207
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-13T11:17:22-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-13T11:17:22-07:00
file_name: datasette/app.py
message:
  Better mechanism for handling errors; 404s for missing table/database

  New error mechanism closes #193

  404s for missing tables/databesse closes #184

  Makes pull request #202 unnecessary.


hash: 57b19f09d1ee24b7369ceca8937ce67df2ca1abc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-09T17:30:44-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-09T17:34:32-07:00
file_name: datasette/app.py
message:
  Ability to sort using form fields (for mobile portrait mode)

  We now display sort options as a select box plus a descending checkbox, which
  means you can apply sort orders even in portrait mode on a mobile phone where
  the column headers are hidden.

  Closes #199


hash: a290f28caae61b47e76e825c06984f22fc41a694
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T22:24:24-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-08T22:24:24-07:00
file_name: README.md
message:
  table_rows => table_rows_count, filtered_table_rows => filtered_table_rows_count

  Renamed properties. Closes #194


hash: c1d37fdf2be84fb07155bb1b1f61057444b03300
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T22:07:18-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-08T22:10:22-07:00
file_name: datasette/templates/table.html
message:
  Fixed bug with human filter description, refs #189

  We were showing this:

      201 rows where sorted by sortable_with_nulls

  We now show this:

      201 rows sorted by sortable_with_nulls


hash: 23e0fdb0f3196ffa4d8bc4944c8bc9cb0f89129b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T22:02:19-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-08T22:10:22-07:00
file_name: datasette/app.py
message:
  Removed unnecessary enumerate template helper

  I made this obsolete in d1756d773685ca4f9c5b57fb40e1aa743bc95525

  Refs #189


hash: b13f0986f26d88938519b07871c961c0b5a97802
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T21:58:25-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-08T22:10:22-07:00
file_name: datasette/app.py
message:
  New sortable_columns option in metadata.json to control sort options

  You can now explicitly set which columns in a table can be used for sorting
  using the _sort and _sort_desc arguments using metadata.json:

      {
          "databases": {
              "database1": {
                  "tables": {
                      "example_table": {
                          "sortable_columns": [
                              "height",
                              "weight"
                          ]
                      }
                  }
              }
          }
      }

  Refs #189


hash: a87df963a08054ad7a652f0218e70ddb7f9cc8bd
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T21:07:31-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-08T22:10:22-07:00
file_name: datasette/app.py
message:
  Error handling for ?_sort and ?_sort_desc

  Verifies that they match an existing column, and only one or the other option
  is provided - refs #189

  Eses a new DatasetteError exception that closes #193


hash: 9f2ec39fbc5481b0fa6585ccdd159ba9fd989bcc
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T18:01:23-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-08T22:10:22-07:00
file_name: datasette/app.py
message:
  Current sort order now reflected in human filter description

  Plus renamed human_description to human_description_en

  Refs #189


hash: f3a3820ff5c5ba9b4af102e65ed1f084b1fe704d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-08T17:06:10-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-08T22:10:22-07:00
file_name: datasette/app.py
message:
  _sort and _sort_desc parameters for table views

  Allows for paginated sorted results based on a specified column.

  Refs #189


hash: 446d47fdb005b3776bc06ad8d1f44b01fc2e938b
author_name: Ryan Pitts
author_email: ryan.a.pitts@gmail.com
author_date: 2018-04-03T08:24:04-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2018-04-03T08:24:04-07:00
file_name: datasette/templates/query.html
message:
  make html title more readable in query template (#180)

  tiny tweak to make this easier to visually parse—I think it matches your style in other templates


hash: 0abd3abacb309a2bd5913a7a2df4e9256585b1bb
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2018-04-03T07:52:54-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2018-04-03T07:52:54-07:00
file_name: README.md
message:
  New ?_shape=objects/object/lists param for JSON API (#192)

  New _shape= parameter replacing old .jsono extension

  Now instead of this:

  	/database/table.jsono

  We use the _shape parameter like this:

  	/database/table.json?_shape=objects

  Also introduced a new _shape called 'object' which looks like this:

  	/database/table.json?_shape=object

  Returning an object for the rows key:

  	...
  	"rows": {
  		"pk1": {
  			...
  		},
  		"pk2": {
  			...
  		}
  	}

  Refs #122


hash: dd0566ff8eda7fa2f0d92e51809581fae62cffed
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-03T06:46:11-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-03T06:46:11-07:00
file_name: tests/fixtures.py
message:
  Utility for writing test database fixtures to a .db file

  	python tests/fixtures.py /tmp/hello.db

  This is useful for making a SQLite database of the test fixtures for
  interactive exploration.


hash: 8f0d44d6468a96e9b78487c36da20ddc2ae9d937
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-04-03T06:39:50-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-04-03T06:40:49-07:00
file_name: datasette/app.py
message:
  escape_sqlite_table_name => escape_sqlite, handles reserved words

  It can be used for column names as well as table names.

  Reserved word list from https://www.sqlite.org/lang_keywords.html


hash: 89d9fbb91bfc0dd9091b34dbf3cf540ab849cc44
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2018-03-27T09:18:32-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2018-03-27T09:18:32-07:00
file_name: datasette/app.py
message:
  Database/Table views inherit source/license/source_url/license_url metadata

  If you set the source_url/license_url/source/license fields in your root
  metadata those values will now be inherited all the way down to the database
  and table templates.

  The title/description are NOT inherited.

  Also added unit tests for the HTML generated by the metadata.

  Refs #185


hash: 1aad396c9ef46837b224607086c09f48ac921165
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-12T21:32:43-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-12T21:36:03-08:00
file_name: datasette/app.py
message:
  Fixed bug with .json path regular expression

  I had a table called "geojson" and it caused an exception because the regex
  was matching .json and not \.json


hash: 68a34bc222af586c75daa5166c937f3f26cfefac
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-09T18:01:17-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-09T18:01:17-08:00
file_name: datasette/utils.py
message:
  Deploy to Heroku with Python 3.6.3

  Heroku deploys are currently showing the following warning:

      The latest version of Python 3 is python-3.6.3 (you are using python-3.6.2, which is unsupported).
      We recommend upgrading by specifying the latest version (python-3.6.3).


hash: ae940068096ad9ff2f27f4e1784c87788d53eb3d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-09T17:31:08-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-09T17:31:08-08:00
file_name: datasette/app.py
message:
  No longer include database hash in hyperlinks

  It was making the unit tests unreliable. Also we do not do that for foreign key links.


hash: 7a7e4b2ed8c76c6d002a9d707dbc840f6a2abf7f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-09T15:32:54-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-09T15:32:54-08:00
file_name: datasette/app.py
message:
  Started unit tests for row/table HTML pages

  Refs #167

  Thanks to the new tests, spotted and fixed a bug where pages that were
  supposed to have 100 things on them were actually displaying 101.


hash: c195ee4d46f2577b1943836a8270d84c8341d138
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-09T10:19:39-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-09T10:28:49-08:00
file_name: datasette/cli.py
message:
  package and publish commands now accept --static and --template-dir

  Example usage:

      datasette package --static css:extra-css/ --static js:extra-js/ \
      	sf-trees.db --template-dir templates/ --tag sf-trees --branch master

  This creates a local Docker image that includes copies of the templates/,
  extra-css/ and extra-js/ directories. You can then run it like this:

  	docker run -p 8001:8001 sf-trees

  For publishing to Zeit now:

  	datasette publish now --static css:extra-css/ --static js:extra-js/ \
  		sf-trees.db --template-dir templates/ --name sf-trees --branch master

  Example: https://sf-trees-wbihszoazc.now.sh/sf-trees-02c8ef1/Street_Tree_List

  For publishing to Heroku:

  	datasette publish heroku --static css:extra-css/ --static js:extra-js/ \
  		sf-trees.db --template-dir templates/ --branch master

  Closes #157, #160


hash: 2cc14a236c601ee2a6b81d8580e70989574baec9
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-12-08T19:47:50-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2017-12-08T19:47:50-08:00
file_name: datasette/cli.py
message:
  Ditched short form options for --static and --template-dir

  The -t clashes with the package --tag option


hash: 16dfccb1c569359fa2a03639ada233e7661156af
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-08T19:10:09-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-08T19:10:09-08:00
file_name: datasette/app.py
message:
  Include sha1 hash in /static/app.css URL

  This means that when Datasette's CSS changes the new CSS will be loaded
  even though browsers may have cached the previous version.

  Closes #154


hash: 9af2964f6fd4ae876ef8ecd2c14c2ffa61542fdb
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-07T09:19:35-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-07T09:19:35-08:00
file_name: docs/index.rst
message:
  Documentation for metadata.json and "datasette skeleton" command

  http://datasette.readthedocs.io/en/latest/metadata.html

  Closes #166


hash: 80bf3afa43e3cb396c7a7c9b168eedbc6fe0fa15
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-07T08:42:54-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-07T08:47:07-08:00
file_name: datasette/app.py
message:
  metadata.json support for per-table/per-database metadata

  Also added support for descriptions and HTML descriptions.

  Here's an example metadata.json file illustrating custom per-database and per-
  table metadata:

      {
          "title": "Overall datasette title",
          "description_html": "This is a <em>description with HTML</em>.",
          "databases": {
              "db1": {
                  "title": "First database",
                  "description": "This is a string description & has no HTML",
                  "license_url": "http://example.com/",
          		"license": "The example license",
                  "queries": {
                  	"canned_query": "select * from table1 limit 3;"
                  },
                  "tables": {
                      "table1": {
                          "title": "Custom title for table1",
                          "description": "Tables can have descriptions too",
                          "source": "This has a custom source",
                          "source_url": "http://example.com/"
                      }
                  }
              }
          }
      }

  Closes #165, Refs #164


hash: 7e1ba161ec87b02cf7665a73188258f14036f892
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-06T22:11:22-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-06T22:11:22-08:00
file_name: datasette/app.py
message:
  Ability to easily customize _rows_and_columns.html per database table

  Also added documentation for this.

  Refs #158, Closes #159.


hash: afbda9e210b6e5eae10a537c121cbb5e92cc8502
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-06T21:58:42-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-06T21:58:42-08:00
file_name: datasette/templates/database.html
message:
  All extra_head blocks now call super

  This means you can provide a custom base.html template that populates
  extra_head and any of the default child templates will still render content
  you included in that block.

  Refs #158


hash: 7a4da7e5aedff3f61648d5530c4dc34de011ea8a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-05T09:43:59-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-05T09:43:59-08:00
file_name: docs/index.rst
message:
  Documentation for custom SQL queries

  http://datasette.readthedocs.io/en/latest/sql_queries.html

  Closes #20


hash: a743cdeafca0e5d011c282a53baf753c85d01516
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-05T08:17:02-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-05T08:17:02-08:00
file_name: datasette/app.py
message:
  Canned query support + database/query template refactor

  Named canned queries can now be defined in metadata.json like this:

      {
          "databases": {
              "timezones": {
                  "queries": {
                      "timezone_for_point": "select tzid from timezones ..."
                  }
              }
          }
      }

  These will be shown in a new "Queries" section beneath "Views" on the database page.

  As part of this, I refactored the logic for the database index page. It used
  to combine the functionality for listing available tables and the
  functionality for executing custom SQL queries in a single template and view.
  I have split that template out into database.html and query.html and reworked
  the view to more clearly separate the custom SQL executing code.

  Refs #20


hash: e981ac7d4d1e1603257369eb5edba0fc4fdf5ae9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-12-03T08:33:36-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-12-03T08:33:36-08:00
file_name: datasette/app.py
message:
  --static option for datasette serve

  You can now tell Datasette to serve static files from a specific location at a
  specific mountpoint.

  For example:

  	datasette serve mydb.db --static extra-css:/tmp/static/css

  Now if you visit this URL:

  	http://localhost:8001/extra-css/blah.css

  The following file will be served:

  	/tmp/static/css/blah.css

  Refs #160


hash: 601934936c9e6e0007aca13547b73c3b36343f7f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-30T09:09:48-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-30T09:09:48-08:00
file_name: docs/custom_templates.rst
message:
  Documentation for custom CSS/JavaScript/Templates

  Will go live at http://datasette.readthedocs.io/en/latest/custom_templates.html

  Closes #156


hash: 3cd06729f457d690603b6060dc552b535517ab09
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-30T08:30:10-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-30T08:38:16-08:00
file_name: datasette/app.py
message:
  Ability to over-ride templates for individual tables/databases

  It is now possible to over-ride templates on a per-database / per-row or per-
  table basis.

  When you access e.g. /mydatabase/mytable Datasette will look for the following:

      - table-mydatabase-mytable.html
      - table.html

  If you provided a --template-dir argument to datasette serve it will look in
  that directory first.

  The lookup rules are as follows:

      Index page (/):
          index.html

      Database page (/mydatabase):
          database-mydatabase.html
          database.html

      Table page (/mydatabase/mytable):
          table-mydatabase-mytable.html
          table.html

      Row page (/mydatabase/mytable/id):
          row-mydatabase-mytable.html
          row.html

  If a table name has spaces or other unexpected characters in it, the template
  filename will follow the same rules as our custom <body> CSS classes
  introduced in 8ab3a169d42d096f - for example, a table called "Food Trucks"
  will attempt to load the following templates:

      table-mydatabase-Food-Trucks-399138.html
      table.html

  It is possible to extend the default templates using Jinja template
  inheritance. If you want to customize EVERY row template with some additional
  content you can do so by creating a row.html template like this:

      {% extends "default:row.html" %}

      {% block content %}
      <h1>EXTRA HTML AT THE TOP OF THE CONTENT BLOCK</h1>
      <p>This line renders the original block:</p>
      {{ super() }}
      {% endblock %}

  Closes #12, refs #153


hash: 7ff51598c468deb1d2c0d4c23a808458c9b1e3a2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-30T08:05:01-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-30T08:05:01-08:00
file_name: datasette/app.py
message:
  git commit -m "datasette --template-dir=mytemplates/" argument

  You can now pass an additional argument specifying a directory to look for
  custom templates in.

  Datasette will fall back on the default templates if a template is not
  found in that directory.

  Refs #12, #153


hash: ffa77f62b46e1ddf2f848f5da10a1e958323a084
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-30T07:51:40-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-30T07:51:40-08:00
file_name: datasette/app.py
message:
  Removed dependency on sanic-jinja2

  I wasn't using any of the functionality it adds on top of raw Jinja2.

  Refs #12 and #153


hash: 8ab3a169d42d096f2c7979c6d3d7746618d30f0b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-29T23:09:54-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-29T23:09:54-08:00
file_name: datasette/app.py
message:
  CSS styling hooks as classes on the body

  Refs #153

  Every template now gets CSS classes in the body designed to support custom
  styling.

  The index template (the top level page at /) gets this:

      <body class="index">

  The database template (/dbname/) gets this:

      <body class="db db-dbname">

  The table template (/dbname/tablename) gets:

      <body class="table db-dbname table-tablename">

  The row template (/dbname/tablename/rowid) gets:

      <body class="row db-dbname table-tablename">

  The db-x and table-x classes use the database or table names themselves IF
  they are valid CSS identifiers. If they aren't, we strip any invalid
  characters out and append a 6 character md5 digest of the original name, in
  order to ensure that multiple tables which resolve to the same stripped
  character version still have different CSS classes.

  Some examples (extracted from the unit tests):

      "simple" => "simple"
      "MixedCase" => "MixedCase"
      "-no-leading-hyphens" => "no-leading-hyphens-65bea6"
      "_no-leading-underscores" => "no-leading-underscores-b921bc"
      "no spaces" => "no-spaces-7088d7"
      "-" => "336d5e"
      "no $ characters" => "no--characters-59e024"


hash: 0120c24927af364304574ab1a58e417094e01c22
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-28T18:38:15-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-28T18:38:15-08:00
file_name: datasette/app.py
message:
  extra_css_urls/extra_js_urls in metadata, refs #153

  A mechanism in the metadata.json format for adding custom CSS and JS urls.

  Create a metadata.json file that looks like this:

      {
          "extra_css_urls": [
              "https://simonwillison.net/static/css/all.bf8cd891642c.css"
          ],
          "extra_js_urls": [
              "https://code.jquery.com/jquery-3.2.1.slim.min.js"
          ]
      }

  Then start datasette like this:

      datasette mydb.db --metadata=metadata.json

  The CSS and JavaScript files will be linked in the <head> of every page.

  You can also specify a SRI (subresource integrity hash) for these assets:

      {
          "extra_css_urls": [
              {
                  "url": "https://simonwillison.net/static/css/all.bf8cd891642c.css",
                  "sri": "sha384-9qIZekWUyjCyDIf2YK1FRoKiPJq4PHt6tp/ulnuuyRBvazd0hG7pWbE99zvwSznI"
              }
          ],
          "extra_js_urls": [
              {
                  "url": "https://code.jquery.com/jquery-3.2.1.slim.min.js",
                  "sri": "sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
              }
          ]
      }

  Modern browsers will only execute the stylsheet or JavaScript if the SRI hash
  matches the content served. You can generate hashes using www.srihash.org


hash: a30c5b220c15360d575e94b0e67f3255e120b916
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-23T13:09:45-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-23T13:09:45-08:00
file_name: datasette/app.py
message:
  Fixed bug on rows page, added unit test

  Rows page for rows that linked to the same table in more
  than one columns were display incorrectly. Fixed that and added a test.

  Also introduced /db/table/row-pk.json?_extras=foreign_key_tables

  This is used by the new unit test, but is the first example of a new
  ?_extras=comma-separated-list pattern I am introducing.


hash: 53534b6e9d3956cdb6aa9c062d2beffdd89fa7d9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-22T20:03:46-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-22T20:03:46-08:00
file_name: datasette/app.py
message:
  Even more complicated redirect scheme

  This:

      ?_filter_column_1=name&_filter_op_1=contains&_filter_value_1=hello
      &_filter_column_2=age&_filter_op_2=gte&_filter_value_2=12

  Now redirects to this:

      ?name__contains=hello&age__gte=12

  This is needed for the filter editing interface, refs #86


hash: f96e55bce55d26c4d5b198edc536e1b8e9bbea43
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-22T12:15:29-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-22T12:17:51-08:00
file_name: setup.py
message:
  Fix pytest version conflict

  https://travis-ci.org/simonw/datasette/jobs/305929426

      pkg_resources.VersionConflict: (pytest 3.2.1 (/home/travis/virtualenv/python3.5.3/lib/python3.5/site-packages), 
      Requirement.parse('pytest==3.2.3'))


hash: fb505de11c882fa7f2522160509172561b5b8270
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-22T09:42:29-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-22T09:42:29-08:00
file_name: datasette/cli.py
message:
  Back-ported format strings for compatibility with Py 3.5

  Also fixed a encoding error where Heroku --json return needs to be treated as UTF8


hash: e47117ce1d15f11246a3120aa49de70205713d05
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-21T12:55:04-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2017-11-21T12:55:04-08:00
file_name: datasette/cli.py
message:
  Add publish to heroku support (merge pull request #104 from jacobian)

      datasette publish heroku mydb.db


hash: 771b0ee34789750fdec176c3129eeaa6a6523041
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-19T22:04:13-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-19T22:04:13-08:00
file_name: datasette/app.py
message:
  Initial implementation of ?_group_count=column

  URL shortcut for counting rows grouped by one or more columns.

  ?_group_count=column1&_group_count=column2 works as well.

  SQL generated looks like this:

      select "qSpecies", count(*) as "count"
      from Street_Tree_List
      group by "qSpecies"
      order by "count" desc limit 100

  Or for two columns like this:

      select "qSpecies", "qSiteInfo", count(*) as "count"
      from Street_Tree_List
      group by "qSpecies", "qSiteInfo"
      order by "count" desc limit 100

  Refs #44

  Still todo: clean up code a bunch (it currently fakes being a 'view'), get
  foreign key expansion working.


hash: a5881e105a02830d26f07e98177248d5910893da
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-19T12:33:30-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-19T12:33:30-08:00
file_name: datasette/app.py
message:
  ?_filter_column=col&_filter_op=isnull__1 redirect

  if filter_op contains a __ the value is set to the right hand side.

  e.g.

      ?_filter_column=col&_filter_op=isnull__1&_filter_value=x

  Redirects to:

      ?col__isnull=1

  Refs #86


hash: 386fb11d42767039bb2b389ce98996673d780a42
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-19T12:25:29-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-19T12:25:29-08:00
file_name: datasette/app.py
message:
  ?_filter_column=col&_filter_op=op&_filter_value=value redirect

  Part of implementing the filters UI (refs #86) - the following:

      /trees/Trees?_filter_column=SiteOrder&_filter_op=gt&_filter_value=2

  Now redirects to this;

      /trees/Trees?SiteOrder__gt=2


hash: ddc808f387be62cf776b815bb0eda77616c412ae
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2017-11-19T10:20:17-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2017-11-19T10:20:17-08:00
file_name: README.md
message:
  Added --build=master option to datasette publish and package

  The `datasette publish` and `datasette package` commands both now accept an
  optional `--build` argument. If provided, this can be used to specify a branch
  published to GitHub that should be built into the container.

  This makes it easier to test code that has not yet been officially released to
  PyPI, e.g.:

      datasette publish now mydb.db --branch=master


hash: 1b04662585ea1539014bfbd616a8112b650d5699
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-17T19:09:32-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-17T19:15:49-08:00
file_name: datasette/app.py
message:
  Table views now show expanded foreign key references, if possible

  If a table has foreign key columns, and those foreign key tables have
  label_columns, the TableView will now query those other tables for the
  corresponding values and display those values as links in the corresponding
  table cells.

  label_columns are currently detected by the inspect() function, which looks
  for any table that has just two columns - an ID column and one other - and
  sets the label_column to be that second non-ID column.


hash: 0b702f3679a2ffd4e3efb5c34b9fe30221172ccb
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-17T08:18:26-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-17T08:18:26-08:00
file_name: datasette/utils.py
message:
  Fixed weird edge-case with foreign key detection

  It turns out it is possible for a SQLite table to define a foreign key
  relationship to a table that does not actually exist

  We should still be able to handle these databases.


hash: e16ca1169cc49fbb5b0325564d248becad3a4b7f
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-17T07:39:36-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-17T07:39:36-08:00
file_name: datasette/app.py
message:
  Refactored table column/row display logic

  Simplified the template and made the way for upcoming foreign key work.

  Refs #85

  Also fixed &nbsp; bug on database page - closes #113


hash: 03572ae35573c2ea802a540624ce116f540ba1ac
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-17T06:13:35-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-17T06:13:35-08:00
file_name: datasette/cli.py
message:
  Allow --load-extension to be set via environment variable

  I tesed this by first building and running a container using the new
  Dockerfile from #114:

      docker build .
      docker run -it -p 8001:8001 6c9ca7e29181 /bin/sh

  Then I ran this inside the container itself:

      apt update && apt-get install wget -y \
          && wget http://www.gaia-gis.it/spatialite-2.3.1/test-2.3.sqlite.gz \
          && gunzip test-2.3.sqlite.gz \
          && mv test-2.3.sqlite test23.sqlite \
          && datasette -h 0.0.0.0 test23.sqlite

  I visited this URL to confirm I got an error due to spatialite not being
  loaded:

  http://localhost:8001/test23-c88bc35?sql=select+ST_AsText%28Geometry%29+from+HighWays+limit+1

  Then I checked that loading it with `--load-extension` worked correctly:

      datasette -h 0.0.0.0 test23.sqlite \
          --load-extension=/usr/lib/x86_64-linux-gnu/mod_spatialite.so

  Then, finally, I tested it with the new environment variable option:

      SQLITE_EXTENSIONS=/usr/lib/x86_64-linux-gnu/mod_spatialite.so \
          datasette -h 0.0.0.0 test23.sqlite

  Running it with an invalid environment variable option shows an error:

      $ SQLITE_EXTENSIONS=/usr/lib/x86_64-linux-gnu/blah.so datasette \
          -h 0.0.0.0 test23.sqlite
      Usage: datasette -h [OPTIONS] [FILES]...

      Error: Invalid value for "--load-extension": Path "/usr/lib/x86_64-linux-gnu/blah.so" does not exist.

  Closes #112


hash: ed2b3f25beac720f14869350baacc5f62b065194
author_name: Ray N
author_email: 3433657+raynae@users.noreply.github.com
author_date: 2017-11-17T08:29:22-05:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-17T05:29:22-08:00
file_name: datasette/utils.py
message:
  add support for ?field__isnull=1 (#107)

  * add support for ?field__isnull=1

  * Add unit test and conditional formatting for ?field__isnull


hash: b9af49be6c68d6e551c1ae23132711f22cb7c63c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-17T05:26:05-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2017-11-17T05:26:05-08:00
file_name: setup.py
message:
  Fix case for Sanic dependency

  On PyPI it has a capital letter: https://pypi.python.org/pypi/Sanic

  I think this is why the list of "Requires Distributions" on https://pypi.python.org/pypi/datasette links to all of the other dependencies but does not link to Sanic.


hash: b7c4165346ee8b6a6fbd72d6ba2275a24a8a8ae3
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-16T08:46:04-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-16T08:48:49-08:00
file_name: README.md
message:
  Added --load-extension argument to datasette serve

  Allows loading of SQLite extensions. Refs #110.


hash: 01e0c3fa18cd0dd7970e208790ffd683a420c924
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-16T07:29:52-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-16T07:29:52-08:00
file_name: datasette/templates/table.html
message:
  Fixed &nbsp; bug

  &nbsp; was showing for all None values in table cells, thanks to the
  autoescaping change introduced in 82261a638bd35c9


hash: e6ca88588395a9b8266c0e14121668990d34ff67
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-16T07:11:00-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-16T07:11:00-08:00
file_name: docs/.gitignore
message:
  Added initial docs, including a changelog

  Docs initialized using this helpful guide:

  http://docs.readthedocs.io/en/latest/getting_started.html

  I used https://pypi.python.org/pypi/gitchangelog to kick-start the changelog.

  Closes #99

  Refs #109


hash: 82261a638bd35c9d69a9582a898cf4dab374f76c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-15T17:59:42-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-15T17:59:42-08:00
file_name: datasette/app.py
message:
  Turn on auto-escaping in Jinja

  We had XSS holes! Since we don't do cookies or authentication
  they shouldn't cause any actual harm, but still really not good.

  https://github.com/pallets/jinja/issues/528


hash: 7fe1e8b4827aa1d7e72825da563effdf44ae7233
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-14T21:02:11-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-14T21:02:11-08:00
file_name: README.md
message:
  Added extra metadata options to publish and package commands

  You can now run these commands like so:

      datasette now publish mydb.db \
          --title="My Title" \
          --source="Source" \
          --source_url="http://www.example.com/" \
          --license="CC0" \
          --license_url="https://creativecommons.org/publicdomain/zero/1.0/"

  This will write those values into the metadata.json that is packaged with the
  app. If you also pass --metadata= that file will be updated with the extra
  values before being written into the Docker image.

  Closes #92


hash: 9cb69cbd45ed8fd93190c47060c19abec80bc4ef
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-14T18:55:10-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-14T18:55:10-08:00
file_name: datasette/app.py
message:
  New ?_sql_time_limit_ms=10 argument to database and table page

  Allows callers to opt for a lower time limit.

  Closes #95


hash: 0b8c1b0a6da9cb8ac0d28cc90dd783de87554036
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-14T18:41:03-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-14T18:43:34-08:00
file_name: datasette/app.py
message:
  Test for sql_time_limit_ms + sqlite_functions mechanism

  Added a unit test for the sql_time_limit_ms option.

  To test this, I needed to add a custom SQLite sleep() function. I've added a
  simple mechanism to the Datasette class for registering custom functions.

  I also had to modify the sqlite_timelimit() function. It makes use of a magic
  value, N, which is the number of SQLite virtual machine instructions that
  should execute in between calls to my termination decision function.

  The value of N was not finely grained enough for my test to work - so I've
  added logic that says that if the time limit is less than 50ms, N is set to 1.
  This got the tests working.

  Refs #95


hash: 4f7281af8ce421d2f8c57ba43108261ba89d2cd6
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-14T18:04:04-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-14T18:04:04-08:00
file_name: datasette/templates/database.html
message:
  Apply a default height to CodeMirror

  Makes it a bit more obvious that it's an editable textarea even
  if the SQL in it is only one line long.


hash: fc7c04fe0b2f9daf8875ccaa9625ec80d8eeafe2
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T17:48:03-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T17:48:03-08:00
file_name: README.md
message:
  Added 'datasette publish now --force' option

  This calls now with --force - which is useful as it means you get a fresh copy of
  datasette even if now has already cached that docker layer.


hash: 06a826c3188af82f27bb6b4e09cc89b782d30bd6
author_name: Jeff Triplett
author_email: jefftriplett@users.noreply.github.com
author_date: 2017-11-13T16:16:54-06:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T14:16:54-08:00
file_name: .gitignore
message:
  :fire: Removes DS_Store (#81)

  * :fire: Removes .DS_Store

  Signed-off-by: Jeff Triplett <jeff.triplett@gmail.com>

  * :snowflake: Adds .DS_Store to gitignore

  Signed-off-by: Jeff Triplett <jeff.triplett@gmail.com>


hash: 44a199a0625b695492b2a8605030dc61191f39cb
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T14:15:21-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T14:15:21-08:00
file_name: tests/test_app.py
message:
  Stop using sqlite WITH RECURSIVE in our tests

  The version of Python 3 running in Travis CI doesn't support this.


hash: 1e698787a4dd6df0432021a6814c446c8b69bba2
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T13:58:34-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T14:00:53-08:00
file_name: README.md
message:
  Added --sql_time_limit_ms and --extra-options

  The serve command now accepts --sql_time_limit_ms for customizing the SQL time
  limit.

  The publish and package commands now accept --extra-options which can be used
  to specify additional options to be passed to the datasite serve command when
  it executes inside the rusulting Docker containers.


hash: 8252e71da461c425e625e1c3e4ee0bd92ea4cbf0
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T11:33:01-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T11:33:01-08:00
file_name: README.md
message:
  Limit on max rows returned, controlled by --max_returned_rows option

  If someone executes 'select * from table' against a table with a million rows
  in it, we could run into problems: just serializing that much data as JSON is
  likely to lock up the server.

  Solution: we now have a hard limit on the maximum number of rows that can be
  returned by a query. If that limit is exceeded, the server will return a
  `"truncated": true` field in the JSON.

  This limit can be optionally controlled by the new `--max_returned_rows`
  option. Setting that option to 0 disables the limit entirely.

  Closes #69


hash: 495407acefe1e6976316aef88ae0e4c1d48ab421
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T10:03:52-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T10:03:52-08:00
file_name: datasette/cli.py
message:
  Force initial .inspect() before starting server

  Otherwise there is a long pause on the first request made.


hash: 4143e3b45c16cbae5e3e3419ef479a71810e7df3
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T08:13:38-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T08:17:35-08:00
file_name: datasette/cli.py
message:
  New command: datasette package - packages a docker container

  Example usage:

      datasette package fivethirtyeight.db \
          --tag fivethirtyeight \
          --metadata=538-metadata.json

  This will create a temporary directory, generate a Dockerfile, copy in the
  SQLite database and metadata file, then build that as a new docker image and
  tag that in your local Docker repository as fivethirtyeight:latest.

  You can then run the image like so:

      docker run -p 8006:8001 fivethirtyeight

  This will expose port 8001 in the container (the default) as port 8006 on your
  host.

  Closes #67


hash: 3ef35ca8b4369af6a8bcdd9e5cfbb5f3a7d17cf8
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-13T07:20:02-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-13T07:20:02-08:00
file_name: datasette/app.py
message:
  serve and publish commands now take a --metadata option

  If provided, the --metadata option is the path to a JSON file containing
  metadata that should be displayed alongside the dataset.

      datasette /tmp/fivethirtyeight.db --metadata /tmp/metadata.json

  Currently that metadata format looks like this:

      {
          "title": "Five Thirty Eight",
          "license": "CC Attribution 4.0 License",
          "license_url": "http://creativecommons.org/licenses/by/4.0/",
          "source": "fivethirtyeight/data on GitHub",
          "source_url": "https://github.com/fivethirtyeight/data"
      }

  If provided, this will be used by the index template and to populate the
  common footer.

  The publish command also accepts this argument, and will package any provided
  metadata up and include it with the resulting Docker container.

      datasette publish --metadata /tmp/metadata.json /tmp/fivethirtyeight.db

  Closes #68


hash: 26370b14d862a5d2dc32b858bdf627f2a5ec3209
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-12T15:17:00-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-12T15:17:00-08:00
file_name: datasette/app.py
message:
  Handle table names with slashes in them

  e.g. https://datasette-wdlexdiaoz.now.sh/fivethirtyeight-75d605c/bob-ross%2Felements-by-episode.csv?CABIN=1&BUSHES=1&CLOUDS=1


hash: 4c66097d581c3970a23530598c4fe98b09f422ee
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-12T15:16:24-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-12T15:16:24-08:00
file_name: datasette/cli.py
message:
  datasette publish now works with full paths

  e.g. datasette publish /tmp/blah/database.db now does the right thing


hash: efecae5a11617eb576d475192384339fcdb03189
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-12T14:23:41-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-12T15:01:29-08:00
file_name: datasette/app.py
message:
  Full path to database now works

  e.g. datasette /tmp/blah.db

  Previously this failed because it did not open with full path.


hash: 666aa032530189d585dd61d0e9851e9fe63ee598
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-12T13:16:15-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-12T13:16:15-08:00
file_name: datasette/app.py
message:
  Improved error handling

  Invalid SQL now shows a special error.html template, and is covered by tests.


hash: fa42a56c6a0fa62529eabf2d363bd3008ce23094
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-11T14:22:47-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-11T14:22:47-08:00
file_name: tests/test_app.py
message:
  Bulked out table test a bit

  I'm closing #50 - more tests will be added in the future, but the framework
  is neatly in place for them now.


hash: 40a563ebac72f46a1b2dc498a25520c429bca6d6
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-11T12:10:51-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-11T12:11:51-08:00
file_name: datasette/app.py
message:
  Reworked metadata building options

  Building metadata is now optional. If you want to do it, do this:

      datasette build *.db --metadata=metadata.json

  Then when you run the server you can tell it to read from metadata:

      datasette serve *.db --metadata=metadata.json

  The Dockerfile generated by datasette publish now uses this mechanism.

  Closes #60


hash: ad8b5d3bd23a7b306b8843d7de53a7c918ddb74f
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-11T09:49:47-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-11T09:49:47-08:00
file_name: datasette/app.py
message:
  JSON version of our homepage

  Now available at http://localhost:8006/.json

  Tested by tests added in 407795b61217205625f2d4e084afbf69f1db781b


hash: 407795b61217205625f2d4e084afbf69f1db781b
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-11T09:47:59-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-11T09:47:59-08:00
file_name: datasette/app.py
message:
  Initial unit tests against our Sanic app

  Refs #50

  I had to disable the build metadata function to get these tests to work
  sensibly. I need to completely rethink how that mechanism works.


hash: 7d81083d40fb2749be897d89c9a094d6521ef20c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-10T21:55:50-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-10T21:55:50-08:00
file_name: datasette/app.py
message:
  Implemented responsive tables, removed bootstrap

  No need for all of bootstrap since we only need to style a few elements.

  Implemented responsive table pattern from here:
  https://css-tricks.com/responsive-data-tables/

  Refs #16


hash: 40d3b3eae68286f67e40226f18f2621b26e5e533
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-10T10:48:16-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-10T10:48:16-08:00
file_name: test_helpers.py => tests/test_helpers.py
message:
  Refactored tests into new tests/ folder

  Guided by https://docs.pytest.org/en/latest/goodpractices.html


hash: bc9871c93583f3cdcca191b7fa05b255be7275c8
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-09T08:09:55-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-09T08:09:55-08:00
file_name: immutabase/app.py
message:
  gt/lt/gte/lte now treat numeric arguments as numeric

  This now works:

      https://immutabase-dlmggyoepw.now.sh/northwind-40d049b/Products?UnitsInStock__gt=100

  Previously the input value of 100 would be treated as a string.

  Also fixed a bug where filter arguments had stopped working entirely.

  Refs #23


hash: d9fa2bf7ba2f9d3dcb2beb303f772c86344b4bcf
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-09T06:39:50-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-09T06:39:50-08:00
file_name: immutabase/app.py
message:
  Use rowid if no primary key available

  Allows us to link to individual records even for tables that do not have a primary key.

  Refs #5


hash: abb591d83264bbf11a5eb9daf03011d051e8f833
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-09T05:46:16-08:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-09T06:14:26-08:00
file_name: immutabase/cli.py
message:
  Added --reload argument to 'immutabase serve' command

  Uses hupper to restart the server when the code changes. Useful for development.

  Depends on https://pypi.python.org/pypi/hupper


hash: 186c513a61a091b9f83d788e25b08f41a84ed9a3
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-04T19:49:18-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-04T19:49:18-07:00
file_name: datasite/app.py
message:
  Support parameterized SQL and block potentially harmful queries

  You can now call arbitrary SQL like this:

      /flights?sql=select%20*%20from%20airports%20where%20country%20like%20:c&c=iceland

  Unescaped, those querystring params look like this:

      sql = select * from airports where country like :c
      c = iceland

  So SQL can be constructed with named parameters embedded in it, which will
  then be read from the querystring and correctly escaped.

  This means we can aggressively filter the SQL parameter for potentially
  dangerous syntax. For the moment we enforce that it starts with a SELECT
  statement and we ban the sequence "pragma" from it entirely.

  If you need to use pragma in a query, you can use the new named parameter
  mechanism.

  Fixes #39


hash: 31b21f5c5e15fc3acab7fabb170c1da71dc3c98c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-04T19:21:44-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-04T19:21:44-07:00
file_name: datasite/app.py
message:
  Moved all SQLite queries to threads

  SQLite operations are blocking, but we're running everything in Sanic, an
  asyncio web framework, so blocking operations are bad - a long-running DB
  operation could hold up the entire server.

  Instead, I've moved all SQLite operations into threads. These are managed by a
  concurrent.futures ThreadPoolExecutor. This means I can run up to X queries in
  parallel, and I can continue to queue up additional incoming HTTP traffic
  while the threadpool is busy.

  Each thread is responsible for managing its own SQLite connections - one per
  database. These are cached in a threadlocal.

  Since we are working with immutable, read-only SQLite databases it should be
  safe to share SQLite objects across threads. On this assumption I'm using the
  check_same_thread=False option. Opening a database connection looks like this:

      conn = sqlite3.connect(
          'file:filename.db?immutable=1',
          uri=True,
          check_same_thread=False,
      )

  The following articles were helpful in figuring this out:

  * https://pymotw.com/3/asyncio/executors.html
  * https://marlinux.wordpress.com/2017/05/19/python-3-6-asyncio-sqlalchemy/

  Closes #45. Refs #38.


hash: 1fc75809a6aa17860944b4cc3a4d7175cd53b1f4
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-04T19:13:44-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-04T19:13:44-07:00
file_name: datasite/app.py
message:
  Refactored everything into a factory function

  I now call a factory function to construct the Sanic app:

      app = app_factory(files)

  This allows me to pass additional arguments to it, e.g. the files to serve.

  Also refactored my class-based views to accept jinja as an argument, e.g:

      app.add_route(
          TableView.as_view(jinja),
          '/<db_name:[^/]+>/<table:[^/]+?><as_json:(.jsono?)?$>'
      )


hash: 0ac8bbce2e73c0759ec48661a7b740d2c368b2a2
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-11-04T16:53:50-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-11-04T16:53:50-07:00
file_name: datasite/app.py
message:
  Default subcommand is now serve

  Using click-default-group: https://github.com/click-contrib/click-default-group

  Also removed requirements.txt in favour of setup.py


hash: 2c625e31ed018f929223918240603bf2a80e665c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-27T00:16:18-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-27T00:16:18-07:00
file_name: datasite/app.py
message:
  Fixed bug on Row page with tables containing spaces

  We were attempting to run this SQL:

      select * from "Order%20Details" where ...

  On this page:

      http://0.0.0.0:8877/northwind-40d049b/Order%20Details/10250,41


hash: 1592fd0419f374de201926d3ba67fbf1522eed13
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-27T00:08:24-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-27T00:08:24-07:00
file_name: Dockerfile
message:
  Started work on cli, which also meant adding setup.py

  I'm using click, and click recommends using a setup.py - so I've added one of
  those. I also refactored code into a new datasite package. It's not quite
  deploying to now properly at the moment though - I seem to have messed up the
  path handling a bit.

  Also snuck in a new template for the "Row" view.

  Refs #40


hash: 3cce63b59851495b6d9d38936356e21ea8fbad3a
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-25T08:19:32-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-25T08:19:32-07:00
file_name: app.py
message:
  URL to allow direct database download

  It's just the database URL with .db on the end, e.g. /flights.db

  Closes #19


hash: d94d4465d7e72e668122f81206397f4f20cf555b
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-25T07:47:20-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-25T07:47:20-07:00
file_name: app.py
message:
  Double quote around column names

  This means filters still work even with column names that contain spaces


hash: 6823b094066c5cb1dcd3581da2ed877ed72298b7
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-24T18:34:54-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-24T18:34:54-07:00
file_name: app.py
message:
  Set time limit of 1000ms on SQL queries

  Using the (undocumented in the Python docs) fact that if you return 1 from a
  set_progress_handler callback, SQLite will cancel the current query.

  Closes #35


hash: 2fe94641b0b2dc291d1fce3dad0fbf96294b3a32
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-24T18:33:12-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-24T18:33:12-07:00
file_name: app.py
message:
  Don't try to show row counts for views

  Also handle tables/views with spaces in their name in the URL.


hash: 1ae8ea0f03cfb9f25b1e25f3194c456c3649789c
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-24T17:06:23-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-24T17:06:23-07:00
file_name: app.py
message:
  Started implementing ?name__contains=X filters

  So far we support __contains=, __startswith=, __endswith= and __exact=

  Refs #23


hash: 4c7379a898df426af0c31159e5cb06d672189301
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-24T17:01:34-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-24T17:01:34-07:00
file_name: app.py
message:
  Don't crash on weird character encodings

  Expecting SQLite columns to all be valid utf8 doesn't work, because we are
  deailing with all kinds of databases. Instead, we now use the 'replace'
  encoding mode to replace any non-UTF8 characters with a [X] character.


hash: bc9379aabcedce7fbc661ac15008d8801199a045
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-24T08:07:52-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-24T08:07:52-07:00
file_name: app.py
message:
  Added .jsono extension

  Returns JSON key/value objects for each row instead of lists of values.

  Closes #6


hash: 6a9fdcc0718aea2cbc01ae4d60b9a1fba3601a66
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-23T22:54:58-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-23T22:54:58-07:00
file_name: app.py
message:
  Added addressable page per row

  Refs #1 - only exists for tables with introspectable primary keys.

  Still need to link to this page.

  Also added first unit tests - refs #9


hash: 606ff9e35e007ae58a491d417f47779034bacabc
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-23T22:53:13-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-23T22:53:13-07:00
file_name: Dockerfile
message:
  python app.py --build to generate build-metadata.json

  This is now run by the Dockerfile to build this at compile time.


hash: 12f7e1dc5624d14f644abead18bd90b420b6d97e
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-23T19:36:44-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-23T19:36:44-07:00
file_name: app.py
message:
  Hashed URLs now have far-future cache expiry

  Since the URL now includes a hash of the database, we can return a Cache-
  Control: max-age=31536000 header for every response.

  The exception is our 302 redirects. These we now serve with a Link: header
  that tells any HTTP/2 server-push aware fronting proxies (such as Cloudfront)
  to push the target of the redirect.

  Closes #4


hash: 6a0c5de6154893eb4269dc7b1f160726ec6395f2
author_name: Simon Willison
author_email: simonw@eventbrite.com
author_date: 2017-10-23T09:02:40-07:00
committer_name: Simon Willison
committer_email: simonw@eventbrite.com
committer_date: 2017-10-23T09:02:40-07:00
file_name: .gitignore
message:
  ensure_build_metadata() function for metadata

  This will be run at compile time - the goal is to generate a build-
  metadata.json file with a bunch of useful facts about the databases that could
  be expensive to generate at run-time.

  Example metadata:

      {
          "flights": {
          "file": "flights.db",
          "tables": {
              "airlines": 6048,
              "airports": 8107,
              "routes": 67663
          },
          "hash": "07d1283e07786b1235bb7041ea445ae103d1571565580a29eab0203c555725fd"
      }

  So far we have a sha256 hash of the database file itself, plus a row count for
  each table.

  Fixes #11


hash: a88cd45ae55db50d433a1123ed50681f77e06c04
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-06-29T07:31:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-07-26T06:51:25-07:00
file_name: setup.py
message:
  Bump blacken-docs from 1.13.0 to 1.14.0 (#2083)

  Bumps [blacken-docs](https://github.com/asottile/blacken-docs) from 1.13.0 to 1.14.0.
  - [Changelog](https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/asottile/blacken-docs/compare/1.13.0...1.14.0)

  ---
  updated-dependencies:
  - dependency-name: blacken-docs
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 7dd671310a4358e74663325336583746413f0993
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-01-09T08:37:07-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-01-09T08:40:24-08:00
file_name: docs/changelog.rst
message:
  Release notes for 0.64, with a warning against arbitrary SQL with SpatiaLite

  Refs #1409, #1771, #1979

  Refs https://github.com/simonw/datasette.io/issues/132


hash: 0084daa50a8d97e025989d73d23b9a60c2dc69d9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-01-09T08:37:07-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-01-09T08:37:21-08:00
file_name: datasette/version.py
message:
  Release 0.64, with a warning against arbitrary SQL with SpatiaLite

  Refs #1409, #1771, #1979

  Refs https://github.com/simonw/datasette.io/issues/132


hash: e03aed00026cc2e59c09ca41f69a247e1a85cc89
author_name: Jan Lehnardt
author_email: jan@apache.org
author_date: 2022-12-18T10:40:06+01:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-18T08:01:51-08:00
file_name: tests/test_datasette_https_server.sh
message:
  Detect server start/stop more reliably.

  This is useful, especially in testing, since your test
  hosts might not reliabliy start the server within two
  seconds, so we do a definite check before progressing.

  By the same token, after `kill $server_pid` wait for
  the pid to be gone from the process list.

  Since now the script can end prematurely, I also added
  a cleanup function to make sure the temporary certs are
  removed in any case.

  n.b. this could also be done with the use of `trap 'fn'
  ERR` but that felt like a bit too much magic for this
  short a script.


hash: a27c0a01240c5857626eff21e79b9b38e7a3ac99
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-17T19:24:34-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-17T19:24:48-08:00
file_name: .github/workflows/publish.yml
message:
  Deploy docs on publish using Python 3.9

  A workaround for gcloud setup, see:

  https://til.simonwillison.net/googlecloud/gcloud-error-workaround

  Refs #1963


hash: 0bd3eaa2ddb5f8dbf57190cfb639e3f4d7a82e99
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-17T18:33:07-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-17T18:51:17-08:00
file_name: tests/conftest.py
message:
  Move HTTPS test to a bash script

  See https://github.com/simonw/datasette/issues/1955#issuecomment-1356627931


hash: 4ba8d57bb1a8537ef2f40fa03414f8b14a16c29a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-15T16:55:17-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-15T16:57:45-08:00
file_name: datasette/cli.py
message:
  Try click.echo() instead

  This ensures the URL is output correctly when running under Docker.

  Closes #1958


hash: 1377a290cd85ba8d3338b1da47c4665ed4c6c625
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-08-07T18:47:39-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-07T18:47:39-07:00
file_name: datasette/__init__.py
message:
  New JSON design for query views (#2118)

  * Refs #2111, closes #2110
  * New Context dataclass/subclass mechanism, refs #2127
  * Define QueryContext and extract get_tables() method, refs #2127
  * Fix OPTIONS bug by porting DaatbaseView to be a View subclass
  * Expose async_view_for_class.view_class for test_routes test
  * Error/truncated aruments for renderers, closes #2130


hash: d7b21a862335d3765247d84e5afe778f83eb69ee
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-07-08T09:37:01-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-07-08T09:37:01-07:00
file_name: docs/conf.py
message:
  metadata.yaml now treated as default in docs

  Added sphinx-inline-tabs to provide JSON and YAML tabs to show examples.

  Refs #1153


hash: 3a51ca901427ac93b0ed0638fd1f82fb647a299a
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-07-21T14:19:24-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-07-21T14:19:24-07:00
file_name: setup.py
message:
  Bump black from 23.3.0 to 23.7.0 (#2099)

  Bumps [black](https://github.com/psf/black) from 23.3.0 to 23.7.0.
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/23.3.0...23.7.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 8ea00e038d7d43d173cebdca21a31e774ff33f1c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-05-25T17:18:43-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-05-25T17:23:53-07:00
file_name: datasette/app.py
message:
  New View base class (#2080)

  * New View base class, closes #2078
  * Use new View subclass for PatternPortfolioView


hash: bbd5489dbc440c67c69396e7f752584a32d2cfbe
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-03-28T23:11:33-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-03-28T23:11:33-07:00
file_name: setup.py
message:
  Bump blacken-docs from 1.12.1 to 1.13.0 (#1992)

  Bumps [blacken-docs](https://github.com/asottile/blacken-docs) from 1.12.1 to 1.13.0.
  - [Release notes](https://github.com/asottile/blacken-docs/releases)
  - [Changelog](https://github.com/adamchainz/blacken-docs/blob/main/HISTORY.rst)
  - [Commits](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.13.0)

  ---
  updated-dependencies:
  - dependency-name: blacken-docs
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: d52402447ea5eb5a3f084e4f85a45675d34eb4da
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-03-28T23:09:48-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-03-28T23:09:48-07:00
file_name: setup.py
message:
  Bump sphinx from 6.1.2 to 6.1.3 (#1986)

  Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 6.1.2 to 6.1.3.
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v6.1.2...v6.1.3)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-patch
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 848a9a420de9b50a7c862db7fb34d930835bee89
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-03-28T23:08:00-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-03-28T23:08:00-07:00
file_name: setup.py
message:
  Bump furo from 2022.12.7 to 2023.3.27 (#2046)

  Bumps [furo](https://github.com/pradyunsg/furo) from 2022.12.7 to 2023.3.27.
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2022.12.07...2023.03.27)

  ---
  updated-dependencies:
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-major
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 5c1cfa451d78e3935193f5e10eba59bf741241a1
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-03-26T16:23:28-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-03-26T16:23:28-07:00
file_name: docs/_templates/base.html
message:
  Link docs /latest/ to /stable/ again

  Re-implementing the pattern from https://til.simonwillison.net/readthedocs/link-from-latest-to-stable

  Refs #1608


hash: d97e82df3c8a3f2e97038d7080167be9bb74a68d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-03-22T15:49:39-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-03-22T15:49:39-07:00
file_name: datasette/app.py
message:
  ?_extra= support and TableView refactor to table_view

  * Implemented ?_extra= option for JSON views, refs #262
  * New dependency: asyncinject
  * Remove now-obsolete TableView class


hash: 890615b3f29dcf82a792f1a145b02dba784a5b63
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2024-01-31T10:53:57-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-01-31T10:53:57-08:00
file_name: setup.py
message:
  Bump the python-packages group with 1 update (#2241)

  Bumps the python-packages group with 1 update: [furo](https://github.com/pradyunsg/furo).


  Updates `furo` from 2023.9.10 to 2024.1.29
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2023.09.10...2024.01.29)

  ---
  updated-dependencies:
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-major
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 452a587e236ef642cbc6ae345b58767ea8420cb5
author_name: Cameron Yick
author_email: hydrosquall@users.noreply.github.com
author_date: 2023-10-12T20:00:27-04:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-10-12T17:00:27-07:00
file_name: datasette/static/datasette-manager.js
message:
  JavaScript Plugin API, providing custom panels and  column menu items

  Thanks, Cameron Yick.

  https://github.com/simonw/datasette/pull/2052

  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: a4b401f470b8dd261e73ceb35970f39dd60a3947
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-10-12T14:57:04-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-10-12T14:57:04-07:00
file_name: README.md
message:
  Updated Discord link, refs #2196

  This issue reminded me to use the datasette.io/discord redirect URL.


hash: 35deaabcb105903790d18710a26e77545f6852ce
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2023-10-12T09:16:37-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-10-12T09:16:37-07:00
file_name: datasette/app.py
message:
  Move non-metadata configuration from metadata.yaml to datasette.yaml

  * Allow and permission blocks moved to datasette.yaml
  * Documentation updates, initial framework for configuration reference


hash: 6763572948ffd047a89a3bbf7c300e91f51ae98f
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-09-20T15:11:24-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-09-20T15:11:24-07:00
file_name: setup.py
message:
  Bump sphinx, furo, black

  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [black](https://github.com/psf/black).


  Updates `sphinx` from 7.2.5 to 7.2.6
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.5...v7.2.6)

  Updates `furo` from 2023.8.19 to 2023.9.10
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2023.08.19...2023.09.10)

  Updates `black` from 23.7.0 to 23.9.1
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/23.7.0...23.9.1)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-patch
    dependency-group: python-packages
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 6ed7908580fa2ba9297c3225d85c56f8b08b9937
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-09-18T10:44:13-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-09-18T10:44:13-07:00
file_name: tests/test_facets.py
message:
  Simplified test for #2189

  This now executes two facets, in the hope that parallel facet execution
  would illustrate the bug - but it did not illustrate the bug.


hash: f56e043747bde4faa1d78588636df6c0dadebc65
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-09-18T10:39:11-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-09-18T10:39:11-07:00
file_name: tests/test_facets.py
message:
  test_facet_against_in_memory_database, refs #2189

  This is meant to illustrate a crashing bug but it does not trigger it.


hash: b2ec8717c3619260a1b535eea20e618bf95aa30b
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2023-09-13T14:06:25-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-09-13T14:06:25-07:00
file_name: datasette/app.py
message:
  Plugin configuration now lives in datasette.yaml/json

  * Checkpoint, moving top-level plugin config to datasette.json
  * Support database-level and table-level plugin configuration in datasette.yaml

  Refs #2093


hash: 05707aa16b5c6c39fbe48b3176b85a8ffe493938
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-09-05T19:50:09-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-09-05T19:50:09-07:00
file_name: docs/writing_plugins.rst
message:
  click-default-group>=1.2.3 (#2173)

  * click-default-group>=1.2.3

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

  * Fix for blacken-docs


hash: 31d5c4ec05e27165283f0f0004c32227d8b78df8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-09-05T19:43:01-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-09-05T19:43:01-07:00
file_name: docs/authentication.rst
message:
  Contraction - Google and Microsoft styleguides like it

  I was trying out https://github.com/errata-ai/vale


hash: 9cead33fb9c8704996181f1ab67c7376dee97f15
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-08-31T10:46:07-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-31T10:46:07-07:00
file_name: docs/internals.rst
message:
  OperationalError: database table is locked fix

  See also:
  - https://til.simonwillison.net/datasette/remember-to-commit


hash: 6bfe104d47b888c70bfb7781f8f48ff11452b2b5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-08-30T15:12:24-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-30T15:12:24-07:00
file_name: .github/workflows/test.yml
message:
  DATASETTE_LOAD_PLUGINS environment variable for loading specific plugins

  Closes #2164

  * Load only specified plugins for DATASETTE_LOAD_PLUGINS=datasette-one,datasette-two
  * Load no plugins if DATASETTE_LOAD_PLUGINS=''
  * Automated tests in a Bash script for DATASETTE_LOAD_PLUGINS 


hash: 50da908213a0fc405ecd7a40090dfea7a2e7395c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-08-29T09:32:34-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-29T09:32:34-07:00
file_name: datasette/app.py
message:
  Cascade for restricted token view-table/view-database/view-instance operations (#2154)

  Closes #2102

  * Permission is now a dataclass, not a namedtuple - refs https://github.com/simonw/datasette/pull/2154/#discussion_r1308087800
  * datasette.get_permission() method


hash: 92b8bf38c02465f624ce3f48dcabb0b100c4645d
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2023-08-28T20:24:23-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-28T20:24:23-07:00
file_name: datasette/app.py
message:
  Add new `--internal internal.db` option, deprecate legacy `_internal` database

  Refs:
  - #2157 
  ---------

  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: e4abae3fd7a828625d00c35c316852ffbaa5ef2f
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2023-09-06T09:34:31-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-09-06T09:34:31-07:00
file_name: setup.py
message:
  Bump Sphinx (#2166)

  Bumps the python-packages group with 1 update: [sphinx](https://github.com/sphinx-doc/sphinx).

  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.4...v7.2.5)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-patch
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: b645174271aa08e8ca83b27ff83ce078ecd15da2
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-09-07T21:23:59-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-09-07T21:23:59-07:00
file_name: datasette/app.py
message:
  actors_from_ids plugin hook and datasette.actors_from_ids() method (#2181)

  * Prototype of actors_from_ids plugin hook, refs #2180
  * datasette-remote-actors example plugin, refs #2180


hash: d9aad1fd042a25d226f2ace1f7827b4602761038
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-08-28T13:06:14-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-28T13:06:14-07:00
file_name: datasette/cli.py
message:
  -s/--setting x y gets merged into datasette.yml, refs #2143, #2156

  This change updates the `-s/--setting` option to `datasette serve` to allow it to be used to set arbitrarily complex nested settings in a way that is compatible with the new `-c datasette.yml` work happening in:
  - #2143

  It will enable things like this:
  ```
  datasette data.db --setting plugins.datasette-ripgrep.path "/home/simon/code"
  ```
  For the moment though it just affects [settings](https://docs.datasette.io/en/1.0a4/settings.html) - so you can do this:
  ```
  datasette data.db --setting settings.sql_time_limit_ms 3500
  ```
  I've also implemented a backwards compatibility mechanism, so if you use it this way (the old way):
  ```
  datasette data.db --setting sql_time_limit_ms 3500
  ```
  It will notice that the setting you passed is one of Datasette's core settings, and will treat that as if you said `settings.sql_time_limit_ms` instead.


hash: 17ec309e14f9c2e90035ba33f2f38ecc5afba2fa
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2023-08-22T18:26:11-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-22T18:26:11-07:00
file_name: datasette/app.py
message:
  Start datasette.json, re-add --config, rm settings.json

  The first step in defining the new `datasette.json/yaml` configuration mechanism.

  Refs #2093, #2143, #493


hash: 01e0558825b8f7ec17d3b691aa072daf122fcc74
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-08-22T10:10:01-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2023-08-22T10:10:01-07:00
file_name: datasette/templates/api_explorer.html
message:
  Merge pull request from GHSA-7ch3-7pp7-7cpq

  * API explorer requires view-instance permission

  * Check database/table permissions on /-/api page

  * Release notes for 1.0a4

  Refs #2119, #2133, #2138, #2140

  Refs https://github.com/simonw/datasette/security/advisories/GHSA-7ch3-7pp7-7cpq


hash: c3caf36af7db79336a5c8e697b2374e90e34ff5d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-01-30T19:54:03-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-01-30T19:54:03-08:00
file_name: datasette/hookspecs.py
message:
  Template slot family of plugin hooks - top_homepage() and others

  New plugin hooks:

  top_homepage
  top_database
  top_table
  top_row
  top_query
  top_canned_query

  New datasette.utils.make_slot_function()

  Closes #1191


hash: 2e4a03b2c461ca20ff789146a006ddd126013ee7
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-01-31T15:31:26-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-01-31T15:31:26-08:00
file_name: .github/workflows/test-coverage.yml
message:
  Run coverage on Python 3.12 

  - #2245

  I hoped this would run slightly faster than 3.9 but there doesn't appear to be a performance improvement.


hash: bcc4f6bf1f14be6ef693f0b3fc9aa8a027977920
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-01-31T15:21:40-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-01-31T15:21:40-08:00
file_name: datasette/__init__.py
message:
  track_event() mechanism for analytics and plugins

  * Closes #2240
  * Documentation for event plugin hooks, refs #2240
  * Include example track_event plugin in docs, refs #2240
  * Tests for track_event() and register_events() hooks, refs #2240
  * Initial documentation for core events, refs #2240
  * Internals documentation for datasette.track_event()


hash: bf00b0b59b6692bdec597ac9db4e0b497c5a47b4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-10-27T15:11:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-10-27T15:11:26-07:00
file_name: datasette/version.py
message:
  Release 0.63

  Refs #1646, #1786, #1787, #1789, #1794, #1800, #1804, #1805, #1808, #1809, #1816, #1819, #1825, #1829, #1831, #1834, #1844, #1853, #1860

  Closes #1869


hash: 815162cf029fab9f1c9308c1d6ecdba7ee369ebe
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-08-14T10:32:42-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-08-14T10:32:42-07:00
file_name: datasette/version.py
message:
  Release 0.62

  Refs #903, #1300, #1683, #1701, #1712, #1717, #1718, #1728, #1733, #1738, #1739, #1744, #1746, #1748, #1759, #1766, #1768, #1770, #1773, #1779

  Closes #1782


hash: d7c793d7998388d915f8d270079c68a77a785051
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-23T11:12:26-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-23T11:12:26-07:00
file_name: datasette/version.py
message:
  Release 0.61

  Refs #957, #1228, #1533, #1545, #1576, #1577, #1587, #1601, #1603, #1607, #1612, #1621, #1649, #1654, #1657, #1661, #1668, #1675, #1678


hash: 5471e3c4914837de957e206d8fb80c9ec383bc2e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-19T18:14:40-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-19T18:14:40-07:00
file_name: datasette/version.py
message:
  Release 0.61a0

  Refs #957, #1533, #1545, #1576, #1577, #1587, #1601, #1603, #1607, #1612, #1621, #1649, #1654, #1657, #1661, #1668


hash: cb29119db9115b1f40de2fb45263ed77e3bfbb3e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-01-13T17:36:51-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-01-13T17:36:51-08:00
file_name: datasette/version.py
message:
  Release 0.60

  Refs #473, #625, #1527, #1544, #1547, #1551, #1552, #1555, #1556, #1557,
  #1563, #1564, #1568, #1570, #1575, #1579, #1588, #1594


hash: 58746d3c514004f504223a724e948469a0d4abb3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-06-05T15:06:52-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-06-05T15:06:55-07:00
file_name: datasette/version.py
message:
  Release 0.57

  Refs #263, #615, #619, #1238, #1257, #1305, #1308, #1320, #1332, #1337, #1349, #1353, #1359, #1360


hash: a443dba82f43c22b03402a4f86c85558ccb526b8
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-05-22T17:45:54-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-05-22T17:45:54-07:00
file_name: datasette/version.py
message:
  Release 0.57a0

  Refs #1281, #1282, #1289, #1290, #1308, #1313, #1314, #1321, #1323, #1325, #1330, #1332, #1335


hash: a51608090b5ee37593078f71d18b33767ef3af79
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-10-27T12:06:18-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-10-27T12:06:18-07:00
file_name: datasette/views/table.py
message:
  Slight tweak to insert row API design, refs #1851

  https://github.com/simonw/datasette/issues/1851#issuecomment-1292997608


hash: 382a87158337540f991c6dc887080f7b37c7c26e
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-10-26T14:13:31-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-10-26T20:14:59-07:00
file_name: datasette/app.py
message:
  max_signed_tokens_ttl setting, closes #1858

  Also redesigned token format to include creation time and optional duration.


hash: 68ccb7578b5d3bf68b86fb2f5cf8753098dfe075
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-10-25T18:40:07-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-10-25T18:40:07-07:00
file_name: datasette/views/special.py
message:
  dstoke_ prefix for tokens

  Refs https://github.com/simonw/datasette/issues/1852#issuecomment-1291290451


hash: fb7e70d5e72a951efe4b29ad999d8915c032d021
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-09-09T09:19:20-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-09-09T09:19:20-07:00
file_name: datasette/database.py
message:
  Database(is_mutable=) now defaults to True, closes #1808

  Refs https://github.com/simonw/datasette-upload-dbs/issues/6


hash: 1c29b925d300d1ee17047504473f2517767aa05b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-09-05T17:10:52-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-09-05T17:10:52-07:00
file_name: .github/workflows/test.yml
message:
  Run tests in serial again

  Because this didn't fix the issue I'm seeing in #1802

  Revert "Run tests in serial, refs #1802"

  This reverts commit b91e17280c05bbb9cf97432081bdcea8665879f9.


hash: c09c53f3455a7b9574cf7695478f2b87d20897db
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-07-17T16:24:39-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-07-17T16:24:39-07:00
file_name: datasette/app.py
message:
  New handle_exception plugin hook, refs #1770

  Also refs:
  - https://github.com/simonw/datasette-sentry/issues/1
  - https://github.com/simonw/datasette-show-errors/issues/2


hash: 942411ef946e9a34a2094944d3423cddad27efd3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-04-26T15:48:56-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-04-26T15:50:02-07:00
file_name: datasette/views/table.py
message:
  Execute some TableView queries in parallel

  Use ?_noparallel=1 to opt out (undocumented, useful for benchmark comparisons)

  Refs #1723, #1715


hash: 36573638b0948174ae237d62e6369b7d55220d7f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-04-24T08:50:43-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-04-24T08:50:43-07:00
file_name: .github/workflows/test.yml
message:
  Apply Black to code examples in documentation, refs #1718

  Uses blacken-docs. This has a deliberate error which I hope will fail CI.


hash: 5c5e9b365790d7c75cf2611e650d1013f587d316
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-31T19:01:58-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-31T19:01:58-07:00
file_name: datasette/__init__.py
message:
  Request.fake(... url_vars), plus .fake() is now documented

  Also made 'from datasette import Request' shortcut work.

  Closes #1697


hash: c10cd48baf106659bf3f129ad7bfb2226be73821
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-07T11:56:59-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-15T08:43:47-07:00
file_name: setup.py
message:
  Min pytest-asyncio of 0.17

  So that the asyncio_mode in pytest.ini does not produce
  a warning on older versions of that library.


hash: 77e718c3ffb30473759a8b1ed347f73cb2ff5cfe
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-15T08:37:31-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-15T08:37:31-07:00
file_name: datasette/utils/__init__.py
message:
  Revert "Fix bug with percentage redirects, close #1650"

  This reverts commit c85d669de387b40e667fd6942c6cc1c15b4f5964.

  Refs #1658


hash: 5a353a32b9c4d75acbe3193fd72f735a8e78516a
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-15T08:37:14-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-15T08:37:14-07:00
file_name: tests/test_utils.py
message:
  Revert "Fixed tests for urlsafe_components, refs #1650"

  This reverts commit bb499942c15c4e2cfa4b6afab8f8debe5948c009.

  Refs #1658


hash: 239aed182053903ed69108776b6864d42bfe1eb4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-03-15T08:36:35-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-03-15T08:36:42-07:00
file_name: CODE_OF_CONDUCT.md
message:
  Revert "Code of conduct, refs #1654"

  This reverts commit c5791156d92615f25696ba93dae5bb2dcc192c98.

  Refs #1658


hash: 1b2f0ab6bbc9274dac1ba5fe126b1d6b8587ea96
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-02-07T15:43:20-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-02-07T15:43:45-08:00
file_name: datasette/cli.py
message:
  Revert "Use de-dupe idiom that works with Python 3.6, refs #1632"

  This reverts commit 5bfd001b55357106dba090c83a1c88912a004665.

  No need for this on the main branch because it doesn't support Python 3.6 any more.


hash: 0cd982fc6af45b60e0c9306516dd412ae948c89b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-02-07T15:28:46-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-02-07T15:28:59-08:00
file_name: datasette/cli.py
message:
  De-duplicate 'datasette db.db db.db', closes #1632

  Refs https://github.com/simonw/datasette-publish-fly/pull/12


hash: d9b508ffaa91f9f1840b366f5d282712d445f16b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-02-06T22:30:00-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-02-06T22:31:06-08:00
file_name: datasette/utils/__init__.py
message:
  @documented decorator plus unit test plus sphinx.ext.autodoc

  New mechanism for marking datasette.utils functions that should be covered by the
  documentation, then testing that they have indeed been documented.

  Also enabled sphinx.ext.autodoc which can now be used to embed the documented
  versions of those functions.

  Refs #1176


hash: da53e0360da4771ffb56a8e3eb3f7476f3168299
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-02-04T21:19:49-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-02-04T21:19:49-08:00
file_name: datasette/tracer.py
message:
  tracer.trace_child_tasks() for asyncio.gather tracing

  Also added documentation for datasette.tracer module.

  Closes #1576


hash: 3ef47a0896c7e63404a34e465b7160c80eaa571d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-11-27T12:08:42-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-02-01T23:49:09-08:00
file_name: datasette/templates/base.html
message:
  Link rel=alternate header for tables and rows

  Also added Access-Control-Expose-Headers: Link to --cors mode.

  Closes #1533

  Refs https://github.com/simonw/datasette-notebook/issues/2

  LL#	metadata.json.1


hash: 43c30ce0236ebbc7e9cec98a3822265eb2691430
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-01-19T21:04:09-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-01-19T21:04:09-08:00
file_name: datasette/app.py
message:
  Use cog to maintain default plugin list in plugins.rst, closes #1600

  Also fixed a bug I spotted where datasette.filters showed the same hook three times.


hash: 20a2ed6bec367d2f6759be4a879364a72780b59d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-12-16T10:47:22-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-12-16T10:47:40-08:00
file_name: datasette/facets.py
message:
  Fixed bug with metadata config of array/date facets, closes #1552

  Thanks @davidbgk for spotting the fix for the bug.


hash: ed77eda6d8f10c63fc0670c7150fc974f786ade5
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-11-20T15:30:25-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-11-20T15:30:25-08:00
file_name: demos/apache-proxy/Dockerfile
message:
  Add datasette-redirect-to-https plugin

  Also configured suprvisord children to log to stdout, so that I
  can see them with flyctly logs -a datasette-apache-proxy-demo

  Refs #1524


hash: 8934507cdc0029a598cf37cdb3818fd31af5e33c
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-10-14T12:22:19-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-10-14T12:22:19-07:00
file_name: datasette/version.py
message:
  Release 0.59

  Refs #942, #1404, #1405, #1416, #1420, #1421, #1422, #1423, #1425, #1431, #1443, #1446, #1449, #1467, #1469, #1470, #1488


hash: 85849935292e500ab7a99f8fe0f9546e903baad3
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-10-14T12:03:28-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-10-14T12:03:28-07:00
file_name: datasette/app.py
message:
  --cors Access-Control-Allow-Headers: Authorization

  Refs #1467, refs https://github.com/simonw/datasette-auth-tokens/issues/4


hash: 0d5cc20aeffa3537cfc9296d01ec24b9c6e23dcf
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-10-09T18:25:33-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-10-09T18:25:33-07:00
file_name: datasette/cli.py
message:
  Revert "asyncio_run helper to deal with a 3.10 warning, refs #1482"

  This reverts commit 98dcabccbbf9c0800efa74df9b7d1fee81c3cd0c.


hash: a390bdf9cef01d8723d025fc3348e81345ff4856
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2021-08-08T17:38:42-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2021-08-08T17:38:42-07:00
file_name: datasette/hookspecs.py
message:
  Stop using firstresult=True on render_cell, refs #1425

  See https://github.com/simonw/datasette/issues/1425#issuecomment-894883664


hash: 1335bcb8939e903a4a7680493624055faecc3da4
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-15T19:33:14-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-17T13:47:55-08:00
file_name: tests/conftest.py
message:
  Use my own global variable instead of scope=session

  Refs https://github.com/simonw/datasette/pull/1960#issuecomment-1354148139


hash: 89cffcf14cda830871c8ee81742eaa1e2dff017b
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-17T13:40:27-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-17T13:47:55-08:00
file_name: tests/test_facets.py
message:
  Reset _metadata_local in a couple of tests

  Refs https://github.com/simonw/datasette/pull/1960#issuecomment-1356476886


hash: 9c43b4164db4f60a0be912cfdb07ef8c58b36b22
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-16T13:51:46-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-17T13:47:55-08:00
file_name: pytest.ini
message:
  Removed @pytest.mark.ds_client mark - refs #1959

  I don't need it - can run 'pytest -k ds_client' instead.

  See https://github.com/simonw/datasette/pull/1960#issuecomment-1355685828


hash: d94d363ec079e2b5f18631a075bffdd5c68eb4da
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2022-12-15T17:38:22-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2022-12-17T13:47:55-08:00
file_name: datasette/app.py
message:
  Don't use pytest_asyncio.fixture(scope="session") any more, refs #1959

  Also got rid of the weird memory=False hack:

  https://github.com/simonw/datasette/pull/1960#issuecomment-1354053151


hash: 25fdbe6b27888b7ccf1284c0304a8eb282dbb428
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2023-03-08T12:33:23-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2023-03-08T12:33:23-08:00
file_name: tests/test_cli.py
message:
  use tmpdir instead of isolated_filesystem, refs #2037

  Should hopefully get tests passing for #2036 too.


hash: efc73575548b0bbaca4bdc8de40fc6939bb88428
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-02-05T13:01:03-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-02-05T13:01:03-08:00
file_name: docs/changelog.rst
message:
  Remove Using YAML for metadata section

  No longer necessary now we show YAML and JSON examples everywhere.


hash: a395256c8c10f19bb006e0fce8f5eddd2b645757
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-03-07T00:03:20-05:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-03-07T00:03:20-05:00
file_name: datasette/utils/__init__.py
message:
  Allow-list select * from pragma_table_list()

  Refs https://github.com/simonw/datasette/issues/2104#issuecomment-1982352475


hash: 090dff542bee7f716088835b3cc633e9e04b985d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-03-06T22:54:06-05:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-03-06T22:54:06-05:00
file_name: datasette/static/app.css
message:
  Action menu descriptions

  * Refactor tests to extract get_actions_links() helper
  * Table, database and query action menu items now support optional descriptions

  Closes #2294


hash: c863443ea11ea9b9f0e264ab38f103691509fab9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-02-27T13:24:47-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-02-27T13:24:47-08:00
file_name: datasette/utils/__init__.py
message:
  Documentation for derive_named_parameters()

  Closes #2284

  Refs https://github.com/simonw/datasette-write/issues/7#issuecomment-1967593883


hash: 103b4decbd2350a74da09b61bc3b26159b9159a2
author_name: Jeroen Van Goey
author_email: jeroen.vangoey@gmail.com
author_date: 2024-02-20T00:41:32+02:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-02-19T14:41:32-08:00
file_name: .github/workflows/spellcheck.yml
message:
  fix (typo): Corrected spelling of 'environments' (#2268)

  * fix (typo): Corrected spelling of 'environments'

  * ci: add test folder to codespell workflow


hash: 158d5d96e9fcc5f15b57a012f4e6afe2e89ee05b
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2024-02-19T14:23:12-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-02-19T14:23:12-08:00
file_name: setup.py
message:
  Bump the python-packages group with 1 update (#2269)

  Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).


  Updates `black` from 24.1.1 to 24.2.0
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/24.1.1...24.2.0)

  ---
  updated-dependencies:
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 392ca2e24cc93a3918d07718f40524857d626d14
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-02-19T13:40:48-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-02-19T13:40:48-08:00
file_name: datasette/static/table.js
message:
  Improvements to table column cog menu display, closes #2263

  - Repositions if menu would cause a horizontal scrollbar
  - Arrow tip on menu now attempts to align with cog icon on column


hash: 10f9ba1a0050724ba47a089861606bef58a4087f
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-02-17T20:51:19-08:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-02-17T20:51:19-08:00
file_name: datasette/database.py
message:
  Take advantage of execute_write_fn(transaction=True)

  A bunch of places no longer need to do manual transaction handling
  thanks to this change. Refs #2277


hash: ad01f9d3217f2447b0a321ee7731900dac7e3e6d
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-02-06T22:24:24-08:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-02-06T22:24:24-08:00
file_name: docs/changelog.rst
message:
  1.0a8 release notes

  Closes #2243

  * Changelog for jinja2_environment_from_request and plugin_hook_slots
  * track_event() in changelog
  * Remove Using YAML for metadata section - no longer necessary now we show YAML and JSON examples everywhere.
  * Configuration via the command-line section - #2252
  * JavaScript plugins in release notes, refs #2052
  * /-/config in changelog, refs #2254

  Refs #2052, #2156, #2243, #2247, #2249, #2252, #2254


hash: a23c2aee006bea5f50c13e687dac77c66df1888b
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2024-07-15T10:33:51-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-07-15T10:33:51-07:00
file_name: datasette/app.py
message:
  Introduce new `/$DB/-/query` endpoint, soft replaces `/$DB?sql=...` (#2363)

  * Introduce new default /$DB/-/query endpoint
  * Fix a lot of tests
  * Update pyodide test to use query endpoint
  * Link to /fixtures/-/query in a few places
  * Documentation for QueryView

  ---------

  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: 8f86d2af6a5b90bd0bf12812b4f37c0fbfc1bceb
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2024-06-13T10:09:45-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-06-13T10:09:45-07:00
file_name: .github/workflows/test-sqlite-support.yml
message:
  Test against multiple SQLite versions (#2352)

  * Use sqlite-versions action for testing multiple versions


hash: c698d008e08396ca0d288febbb9f656d96db83a9
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-06-11T10:03:57-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-06-11T10:04:05-07:00
file_name: test-in-pyodide-with-shot-scraper.sh
message:
  Only test first wheel, fixes surprise bug

  https://github.com/simonw/datasette/issues/2351#issuecomment-2161211173


hash: e1bfab3fca22e4f8d06dcf419e945f13fc20aef1
author_name: Alex Garcia
author_email: alexsebastian.garcia@gmail.com
author_date: 2024-06-11T09:33:23-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-06-11T09:33:23-07:00
file_name: datasette/app.py
message:
  Move Metadata to `--internal` database

  Refs:
  - https://github.com/simonw/datasette/pull/2343
  - https://github.com/simonw/datasette/issues/2341


hash: da686627677b6819264bd787ba7d520edb069d12
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-03-17T14:40:47-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-03-17T14:40:47-07:00
file_name: docs/plugin_hooks.rst
message:
  datasette-enrichments is example of row_actions

  Refs:
  - https://github.com/simonw/datasette/issues/2299
  - https://github.com/datasette/datasette-enrichments/issues/41


hash: 67e66f36c1a0e9534d3bc3ea7f5469e886f48e4d
author_name: Agustin Bacigalup
author_email: agustinbv@gmail.com
author_date: 2024-03-17T16:18:40-03:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-03-17T12:18:40-07:00
file_name: datasette/utils/__init__.py
message:
  Add ETag header for static responses (#2306)

  * add etag to static responses

  * fix RuntimeError related to static headers

  * Remove unnecessary import

  ---------

  Co-authored-by: Simon Willison <swillison@gmail.com>


hash: 56adfff8d2112c5890888af4da65d842ba7f6f86
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2024-07-02T09:45:15-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-07-02T09:45:15-07:00
file_name: setup.py
message:
  Bump the python-packages group across 1 directory with 4 updates (#2362)

  Bumps the python-packages group with 4 updates in the / directory: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo), [blacken-docs](https://github.com/adamchainz/blacken-docs) and [black](https://github.com/psf/black).


  Updates `sphinx` from 7.2.6 to 7.3.7
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.6...v7.3.7)

  Updates `furo` from 2024.1.29 to 2024.5.6
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2024.01.29...2024.05.06)

  Updates `blacken-docs` from 1.16.0 to 1.18.0
  - [Changelog](https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst)
  - [Commits](https://github.com/adamchainz/blacken-docs/compare/1.16.0...1.18.0)

  Updates `black` from 24.2.0 to 24.4.2
  - [Release notes](https://github.com/psf/black/releases)
  - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
  - [Commits](https://github.com/psf/black/compare/24.2.0...24.4.2)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: blacken-docs
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: black
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


hash: 868d34d7b9c2703429d0538db9db2441f368c9cb
author_name: Simon Willison
author_email: swillison@gmail.com
author_date: 2024-06-21T16:36:04-07:00
committer_name: Simon Willison
committer_email: swillison@gmail.com
committer_date: 2024-06-21T16:36:04-07:00
file_name: .github/workflows/publish.yml
message:
  Test 0.64.x against Python 3.12

  And drop 3.7 tests because it is not compatible with the new Black version


hash: b219cee9ed72837e617886bc6e9ee5a0392ab879
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2024-07-30T13:36:51Z
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-07-30T13:36:51Z
file_name: setup.py
message:
  Bump sphinx from 7.4.7 to 8.0.2 in the python-packages group

  Bumps the python-packages group with 1 update: [sphinx](https://github.com/sphinx-doc/sphinx).


  Updates `sphinx` from 7.4.7 to 8.0.2
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.7...v8.0.2)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-major
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>


hash: feccfa2a4dc77e073416090004ed14da61352558
author_name: dependabot[bot]
author_email: 49699333+dependabot[bot]@users.noreply.github.com
author_date: 2024-07-25T16:04:29-07:00
committer_name: GitHub
committer_email: noreply@github.com
committer_date: 2024-07-25T16:04:29-07:00
file_name: setup.py
message:
  Bump the python-packages group across 1 directory with 2 updates (#2371)

  Bumps the python-packages group with 2 updates in the / directory: [sphinx](https://github.com/sphinx-doc/sphinx) and [furo](https://github.com/pradyunsg/furo).


  Updates `sphinx` from 7.3.7 to 7.4.7
  - [Release notes](https://github.com/sphinx-doc/sphinx/releases)
  - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
  - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.7...v7.4.7)

  Updates `furo` from 2024.5.6 to 2024.7.18
  - [Release notes](https://github.com/pradyunsg/furo/releases)
  - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
  - [Commits](https://github.com/pradyunsg/furo/compare/2024.05.06...2024.07.18)

  ---
  updated-dependencies:
  - dependency-name: sphinx
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  - dependency-name: furo
    dependency-type: direct:development
    update-type: version-update:semver-minor
    dependency-group: python-packages
  ...

  Signed-off-by: dependabot[bot] <support@github.com>
  Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


