Simon Willison
1a8b0213e0
Fixed broken test introduced in b0a95da96
2018-05-29 19:38:21 -07:00
Simon Willison
27eff1809c
Expanded SpatiaLite docs to cover GeoJSON plus lat-lon spatial indexes
2018-05-29 19:32:30 -07:00
Simon Willison
b0a95da963
Show more useful error message for SQL interrupted, closes #142
2018-05-28 14:24:19 -07:00
Simon Willison
98c8f0e728
Moved plugin HTML tests from test_html to test_plugins
2018-05-28 14:23:48 -07:00
Simon Willison
27c10f6482
Missing half of last commit fefb0db8ae
2018-05-28 13:42:48 -07:00
Simon Willison
fefb0db8ae
Unit test for 02870e57
, closes #291
2018-05-28 13:41:53 -07:00
Simon Willison
a4d6acc239
Use scope='session' for all fixtures
...
This means they will only be executed once which makes sense
since the database they create is immutable.
2018-05-28 13:41:06 -07:00
Simon Willison
76d11eb768
New ?_json=colname argument for returning unescaped JSON
...
Also extracted docs for special JSON arguments into a new section.
Closes #31
2018-05-28 11:08:39 -07:00
Simon Willison
02870e5731
Filter out duplicate JS/CSS URLs, refs #291 (testme)
2018-05-27 01:45:03 -07:00
Simon Willison
c972d79b5a
Added docs on Importing shapefiles into SpatiaLite
2018-05-26 18:39:26 -07:00
Simon Willison
7944a8b0de
Added num_sql_threads config option, closes #285
2018-05-26 17:43:22 -07:00
Simon Willison
276913b748
?_shape=arrayfirst, closes #287
2018-05-26 17:32:15 -07:00
Simon Willison
b463f60158
?_ttl= parameter and default_cache_ttl config
...
Refs #285 , Closes #289
2018-05-26 15:17:33 -07:00
Simon Willison
a6afc21aba
Test that ensures all config options are documented
2018-05-26 15:11:16 -07:00
Simon Willison
08029a2f8f
Hyperlink to www.srihash.org
2018-05-26 12:46:24 -07:00
Simon Willison
df71e8cea8
Fixed documentation typo
2018-05-26 11:04:43 -07:00
Simon Willison
37f8361c6f
Initial documentation on using SpatiaLite
...
https://datasette.readthedocs.io/en/latest/spatialite.html
2018-05-26 11:04:09 -07:00
Simon Willison
f98e62fe5a
Fix for 500 error on /db?sql=x
2018-05-25 15:08:57 -07:00
Simon Willison
b9b9358346
boolean --config are now case insensitive, refs #284
2018-05-24 22:53:58 -07:00
Simon Willison
f722b0a730
allow_sql config option to disable custom SQL, closes #284
2018-05-24 22:50:50 -07:00
Simon Willison
50920cfe3d
allow_facet, allow_download, suggest_facets boolean --config
...
Refs #284
2018-05-24 18:12:27 -07:00
Simon Willison
81df47e8d9
Moved .execute() method from BaseView to Datasette class
...
Also introduced new Results() class with results.truncated, results.description, results.rows
2018-05-24 17:15:53 -07:00
Simon Willison
28a52fcffb
Set theme jekyll-theme-architect
2018-05-24 09:56:21 -07:00
Simon Willison
3d9baf3c2f
Set theme jekyll-theme-leap-day
2018-05-24 09:55:19 -07:00
Ravi Kotecha
bd30c696e1
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.
2018-05-23 10:43:34 -07:00
Simon Willison
5d62527882
0.22.1 bugfix release
2018-05-23 07:00:01 -07:00
Simon Willison
2bfd111d65
Faceting no longer breaks pagination, fixes #282
2018-05-23 06:41:14 -07:00
Robert Gieseke
49f317752c
Move version info back to separate module
2018-05-22 12:35:21 -07:00
Robert Gieseke
fc47dacbbd
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.
2018-05-22 12:35:21 -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
Russ Garrett
58b5a37dbb
Refactor inspect logic
2018-05-22 07:03:06 -07:00
Simon Willison
d59366d36e
Link to /-/plugins example
2018-05-20 21:07:26 -07:00
Simon Willison
558d9d7bfe
Datasette 0.22: Datasette Facets
2018-05-20 16:41:47 -07:00
Simon Willison
0b8e5981a3
Typo fix
2018-05-20 14:30:48 -07:00
Simon Willison
bd3353a31f
Added docs for introspection endpoints
...
https://datasette.readthedocs.io/en/latest/introspection.html
2018-05-20 14:28:53 -07:00
Simon Willison
f00137c8ac
Only apply responsive table CSS to .rows-and-columns
2018-05-20 10:45:01 -07:00
Simon Willison
f6183ff5fa
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)
2018-05-20 10:01:49 -07:00
Simon Willison
918de9403e
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
2018-05-20 08:10:46 -07:00
Simon Willison
b8227556c6
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
2018-05-18 09:18:51 -07:00
Simon Willison
2c2e67b9bb
Updated default facet limits in docs
2018-05-18 08:50:37 -07:00
Simon Willison
39426ff0e4
Added /-/limits and /-/limits.json, closes #270
2018-05-17 23:16:28 -07:00
Simon Willison
08f4b7658f
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
2018-05-17 23:11:23 -07:00
Simon Willison
cef9a9a870
--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
2018-05-17 22:08:26 -07:00
Simon Willison
8003a13331
Empty string "" facets can now be selected in UI, refs #255
2018-05-17 06:34:42 -07:00
Simon Willison
5e78d11c24
Docs: Speeding up facets with indexes
2018-05-16 21:08:50 -07:00
Simon Willison
7261584f04
Display currently selected facets better, refs #255
2018-05-16 19:42:31 -07:00
Simon Willison
96aac7f9e9
Facet documentation tweaks
2018-05-16 13:50:34 -07:00
Simon Willison
9959a9e4de
Added screenshots to facets and full_text_search docs, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
858d79fe93
Typo fix
2018-05-16 08:27:24 -07:00
Simon Willison
566f2d31d6
Clarified relationship between metadata and _facet= facets, updated docs - refs @255
2018-05-16 08:27:24 -07:00