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
Simon Willison
b263da78e3
Reliable sort order for facets in Python 3.5, fixing test - refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
062303419c
Hide facet button is now a ✖ - refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
62f1d3a6cb
class="suggested-facets"
2018-05-16 08:27:24 -07:00
Simon Willison
91bf5f56bb
Show enabled facets in flexbox columns, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
6d12580ed7
Foreign key facets are now expanded to labels, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
a892f9a0bd
Use escape_sqlite() more consistently
2018-05-16 08:27:24 -07:00
Simon Willison
8a0bd68c39
Undid some slightly weird code formatting by 'black'
2018-05-16 08:27:24 -07:00
Simon Willison
63aac537f2
1,442 format for facet counts, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
f4943ca89b
_facet selections persist through table form, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
514873c629
Fix bug with toggle_url on integer facets
2018-05-16 08:27:24 -07:00
Simon Willison
1dc94f6eaa
Facets can now be toggled off again, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
ba515fc56e
Removed un-used variable
2018-05-16 08:27:24 -07:00
Simon Willison
142a550a99
Facet results now have "truncated" field
...
To indicate if there was more than 20 distinct values. Refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
a82175276c
_sort/_next links now use new path_with_replaced_args method
2018-05-16 08:27:24 -07:00
Simon Willison
2f81552cd2
Never suggest a facet if it only results in on option
2018-05-16 08:27:24 -07:00
Simon Willison
b0d2bb3e43
Facets no longer consider null values
2018-05-16 08:27:24 -07:00
Simon Willison
ddef229850
Initial implementation of suggested facets
...
Causes tests to break at the moment
2018-05-16 08:27:24 -07:00
Simon Willison
8a4ed052a5
path_with_added_args now works with multiple existing args
2018-05-16 08:27:24 -07:00
Simon Willison
f36c9d4b4c
Facet toggling now works for integer columns, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
de05cf21aa
Facet "selected" key and toggle_url now toggles, refs #255
2018-05-16 08:27:24 -07:00
Simon Willison
2b79f2bdeb
path_with_added_args now preserves order in Python 3.5
2018-05-14 00:04:23 -03:00
Simon Willison
eaf715a60a
Extract /-/plugins view into a method
2018-05-14 00:04:23 -03:00
Simon Willison
cf1fe693e5
Used isort to re-order my imports
2018-05-14 00:04:23 -03:00
Simon Willison
3686385551
Ran black source formatting tool against new views/ and app.py
2018-05-14 00:04:23 -03:00