Wykres commitów

185 Commity (main)

Autor SHA1 Wiadomość Data
Simon Willison c2c03f8e7b
Compatible with Python 3.7 2018-11-04 22:40:03 -08:00
Simon Willison e1db8194e8
Bump versions of pytest, pluggy and beautifulsoup4 (#358) 2018-08-07 18:11:12 -07:00
Simon Willison 31a5d8fa77 Bump aiohttp to fix compatibility with Python 3.7
Tests failed here: https://travis-ci.org/simonw/datasette/jobs/403223333
2018-07-12 11:07:37 -07:00
Simon Willison 47e689a89b
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
2018-06-23 18:03:46 -07:00
Simon Willison 969771770f
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.
2018-05-31 06:42:37 -07:00
Robert Gieseke a113c28ea1 Add version number support with Versioneer
Repo:
https://github.com/warner/python-versioneer

Versioneer Licence:
Public Domain (CC0-1.0)

Closes #273
2018-05-22 12:35:21 -07:00
Simon Willison 1f384e662b
Updated PyPI classifiers 2018-04-17 17:30:46 -07:00
Simon Willison 92396ae5ba
Better fix for setup.py version 2018-04-15 21:38:04 -07:00
Simon Willison 33c7c53ff8
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
2018-04-15 17:56:15 -07:00
Russ Garrett ec6abc81e4 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
2018-04-13 20:32:53 -07:00
Simon Willison 6e16ed2a63
Removed pathlib dependency (incompatible with Python 3.5) 2018-04-13 11:22:15 -07:00
Simon Willison ad6142b67c
long_description in markdown for the new PyPI 2018-04-13 09:04:18 -07:00
Simon Willison 7a7e4b2ed8
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.
2017-12-09 15:32:54 -08:00
Simon Willison 446f4b8322
Upgrade to Sanic 0.7.0 (#168)
https://github.com/channelcat/sanic/releases/tag/0.7.0
2017-12-08 19:00:33 -08:00
Simon Willison ffa77f62b4
Removed dependency on sanic-jinja2
I wasn't using any of the functionality it adds on top of raw Jinja2.

Refs #12 and #153
2017-11-30 07:51:40 -08:00
Simon Willison f96e55bce5 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'))
2017-11-22 12:17:51 -08:00
Simon Willison b9af49be6c
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.
2017-11-17 05:26:05 -08:00
Simon Willison 228bce83a3 Added __version__, bumped it to 0.12
Closes #108
2017-11-16 07:20:54 -08:00
Simon Willison 9f47b6e4d8 Pin to specific Jinja version
Closes #100
2017-11-15 16:14:07 -08:00
Simon Willison b0f3d4e375 Version 0.11 2017-11-13 17:48:22 -08:00
Simon Willison 5928c11ee7 Version 0.10 2017-11-13 16:45:23 -08:00
Simon Willison d75f423b6f Release 0.9 2017-11-13 14:00:53 -08:00
Simon Willison fe279ab7b4 v0.8 - added PyPI metadata, ready to ship 2017-11-13 13:17:34 -08:00
Simon Willison 6b3b05b6db Released 0.7 2017-11-13 10:42:30 -08:00
Simon Willison 3ef35ca8b4 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
2017-11-13 07:20:02 -08:00
Simon Willison 2bbe9ca34a Support OPTIONS requests for CORS 2017-11-12 18:11:52 -08:00
Simon Willison 26370b14d8 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
2017-11-12 15:17:00 -08:00
Simon Willison 40a563ebac 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
2017-11-11 12:11:51 -08:00
Simon Willison 407795b612 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.
2017-11-11 09:47:59 -08:00
Simon Willison e7e50875d3 Renamed to 'datasette' 2017-11-10 10:38:35 -08:00
Simon Willison abb591d832 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
2017-11-09 06:14:26 -08:00
Simon Willison 25c241fa5a Renamed project to immutabase 2017-11-05 18:32:13 -08:00
Simon Willison 0ac8bbce2e 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
2017-11-04 16:53:50 -07:00
Simon Willison be768f26d0 python setup.py test now runs the tests 2017-11-04 16:40:27 -07:00
Simon Willison 1592fd0419 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
2017-10-27 00:08:24 -07:00