Commit graph

18 commits

Author SHA1 Message Date
Simon Willison
733447d7c7 Upgrade to Python 3.11 on Heroku, refs #1905 2022-11-18 16:44:46 -08:00
Simon Willison
72ac9bf82f --generate-dir option to publish heroku, refs #1905 2022-11-18 16:34:33 -08:00
Simon Willison
ff253f5242 Replace all uses of runner.isolated_filesystem, refs #1406 2021-07-31 11:49:08 -07:00
Simon Willison
b46856391d pytest.mark.serial for any test using isolated_filesystem(), refs #1406 2021-07-30 16:46:41 -07:00
Simon Willison
e55cd9dc3f Try passing a directory to isolated_filesystem(), refs #1406 2021-07-29 18:16:58 -07:00
Simon Willison
2b1c535c12 pytest.mark.serial for any test using isolated_filesystem(), refs #1406 2021-07-29 17:44:16 -07:00
Konstantin Baikov
8e18c79431
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!
2021-03-11 08:15:49 -08:00
Simon Willison
e4554c37b7 datasette publish heroku --tar option, closes #969 2020-10-08 16:30:46 -07:00
Simon Willison
86823ae6f7 Default to Uvicorn workers=1, refs #999 2020-10-08 16:16:55 -07:00
Simon Willison
a648bb82ba Upgrade to Black 20.8b1, closes #958 2020-09-02 15:24:55 -07:00
Simon Willison
e1a817411a Bump to click 7.1.1 to fix flaky tests 2020-03-21 18:47:51 -07:00
Simon Willison
f524510230 Fix "publish heroku" + upgrade to use Python 3.8.0
Closes #633. Closes #632.
2019-11-13 08:42:47 -08:00
Simon Willison
973f8f139d
--plugin-secret option for datasette publish
Closes #543

Also added new --show-files option to publish now and publish cloudrun - handy for debugging.
2019-07-07 19:06:31 -07:00
Simon Willison
09ef305c68 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
2019-05-11 13:20:36 -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
2855667908 Fix for test failure with Click 7.0 2019-03-14 22:00:13 -07:00
Simon Willison
195a5b3634
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
2019-02-05 20:15:46 -08:00
Simon Willison
3b68314d8f
Unit tests for publish now/heroku - closes #348 2018-07-25 22:45:47 -07:00