Wykres commitów

99 Commity (a4def0b8dba68fcaf1d52013212f9e2b93371fbe)

Autor SHA1 Wiadomość Data
Simon Willison 7e70643852 Removed --debug option, which didn't do anything - closes #814 2020-10-10 16:39:38 -07:00
Simon Willison 8f97b9b58e
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
2020-10-09 09:11:24 -07:00
Simon Willison 86823ae6f7 Default to Uvicorn workers=1, refs #999 2020-10-08 16:16:55 -07:00
Simon Willison cac051bb8a Fix for 'open' bug, closes #973 2020-09-22 08:39:48 -07:00
Simon Willison a980199e61 New -o option for opening Datasette in your browser, closes #970 2020-09-22 07:26:47 -07:00
Simon Willison d02f6151da datasette --get status code for error pages, closes #947 2020-09-11 14:32:54 -07:00
Simon Willison ca5c405d0f New 'datasette --pdb' option, closes #962 2020-09-11 11:37:55 -07:00
Simon Willison a648bb82ba Upgrade to Black 20.8b1, closes #958 2020-09-02 15:24:55 -07:00
Simon Willison 69033c6ec4 datasette install --upgrade option, closes #945 2020-08-19 10:20:41 -07:00
Simon Willison 41ddc19756
Docs now live at docs.datasette.io (#937) 2020-08-15 16:57:05 -07:00
Simon Willison 45414f8412 --get now calls startup() plugin hooks, closes #934 2020-08-15 13:52:41 -07:00
Simon Willison e139a7619f
'datasette --get' option, closes #926
Also made a start on the datasette.utils.testing module, refs #898
2020-08-11 17:24:40 -07:00
Simon Willison afdeda8216 Use runpy in install/uninstall, refs #928 2020-08-11 16:54:52 -07:00
Simon Willison f7fddc9019 Fixed typo in help text, refs #925 2020-08-11 15:33:16 -07:00
Simon Willison 01fe5b7401 datasette install / datasette uninstall commands, closes #925 2020-08-11 15:32:06 -07:00
Simon Willison 16f592247a Use explicit lifestyle=on for Uvicorn, refs #873 2020-06-29 08:42:50 -07:00
Simon Willison 09a3479a54 New "startup" plugin hook, closes #834 2020-06-13 10:55:41 -07:00
Simon Willison 98632f0a87
--secret command for datasette publish
Closes #787
2020-06-11 09:02:03 -07:00
Simon Willison f786033a5f Fixed 'datasette plugins' command, with tests - closes #802 2020-06-05 16:46:37 -07:00
Simon Willison 9f3d4aba31 --root option and /-/auth-token view, refs #784 2020-05-31 18:16:42 -07:00
Simon Willison fa27e44fe0 datasette.sign() and datasette.unsign() methods, refs #785 2020-05-31 18:16:42 -07:00
Simon Willison 69e3a855dd Rename execute_against_connection_in_thread() to execute_fn(), refs #685 2020-05-08 07:16:39 -07:00
Simon Willison e37f4077c0 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
2020-04-27 15:02:28 -07:00
Simon Willison 25014ca25e
Configuration directory mode, closes #731 2020-04-27 09:30:24 -07:00
Simon Willison e0e7a0facf Removed Zeit Now v1 support, closes #710 2020-04-04 16:04:33 -07:00
Simon Willison 6717c719dd
--metadata accepts YAML as well as JSON - closes #713 2020-04-02 12:30:53 -07:00
Simon Willison 7656fd64d8
base_url configuration setting, closes #394
* base_url configuration setting
* base_url works for static assets as well
2020-03-24 17:18:43 -07:00
Simon Willison 411056c4c4 Only --reload on changes to immutable databases, closes #494 2020-02-24 11:44:59 -08:00
Simon Willison 6303ea5048 prepare_connection() now takes datasette and database args, refs #678 2020-02-21 17:32:40 -08:00
Simon Willison d3f2fade88 Refactored run_sanity_checks to check_connection(conn), refs #674 2020-02-15 09:56:48 -08:00
Simon Willison 67fc9c5720
--port argument for datasette package, plus tests - closes #661
From pull request #663
2020-01-29 14:46:43 -08:00
Simon Willison ceef5ce684 Documentation for --port=0 2019-12-22 15:42:30 +00:00
Simon Willison df2879ee2a Better documentation for --static, closes #641
https://datasette.readthedocs.io/en/stable/custom_templates.html#serving-static-files
2019-11-25 18:31:42 -08:00
Simon Willison ffae2f0ecd Better documentation of --host, closes #574 2019-11-01 14:57:49 -07:00
Simon Willison ba8db9679f
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
2019-06-23 20:13:09 -07:00
Simon Willison 503fee891b Removed 'datasette skeleton', closes #476 2019-05-19 13:05:38 -07:00
Simon Willison 7d8573d672 Rename "datasette publish now" to "datasette publish nowv1"
Also added an alias so "datasette publish now" continues to work.

Closes #472
2019-05-19 11:06:51 -07:00
Simon Willison 24bf79d2f0 Run sanity checks, not .inspect(), on startup
Also fixes tests that did NOT like a call to run_until_complete in the Datasette() constructor.
2019-05-11 16:22:55 -07:00
Simon Willison c0d1b4c322 "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
2019-05-11 14:36:57 -07:00
Simon Willison 35d6ee2790
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.
2019-05-03 22:15:14 -04:00
Simon Willison 47032636b5 'datasette serve -i immutable.db' option, refs #419 2019-03-17 16:25:15 -07:00
Simon Willison 9743e1d91b 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.
2019-03-14 20:54:42 -07:00
Simon Willison bf6b0f918d about and about_url metadata options 2019-03-14 20:54:42 -07:00
Simon Willison 909cc8fbdf New 'datasette plugins' command to list installed plugins 2019-01-26 12:01:16 -08:00
Simon Willison eac08f0dfc
--reload now also reloads if databases change on disk 2018-12-20 07:51:08 -08:00
Simon Willison dbbe707841
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
2018-07-25 22:15:59 -07:00
Simon Willison b320f58d13
'publish now' uses force_https_urls:on - closes #333 2018-07-23 18:51:43 -07:00
Russ Garrett 58fec99ab0 Allow app names for `datasette publish heroku`
Lets you supply the `-n` parameter for Heroku deploys, which also lets
you update existing Heroku deployments.
2018-07-14 07:04:42 -07:00
Simon Willison db1e6bc182
--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
2018-06-17 14:19:39 -07:00
Simon Willison 538565de3a
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
2018-06-17 14:16:08 -07:00