Skip to content

Commit

Permalink
compile_options output in /-/versions, closes #396
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jan 11, 2019
1 parent 5b02611 commit 8ce7866
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions datasette/app.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ def versions(self):
"version": sqlite_version, "version": sqlite_version,
"fts_versions": fts_versions, "fts_versions": fts_versions,
"extensions": sqlite_extensions, "extensions": sqlite_extensions,
"compile_options": [
r[0] for r in conn.execute("pragma compile_options;").fetchall()
],
}, },
} }


Expand Down
12 changes: 11 additions & 1 deletion docs/introspection.rst
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This is an internal implementation detail of Datasette and the format should not
/-/versions /-/versions
----------- -----------


Shows the version of Datasette, Python and SQLite. `Versions example <https://fivethirtyeight.datasettes.com/-/versions>`_:: Shows the version of Datasette, Python and SQLite. `Versions example <https://latest.datasette.io/-/versions>`_::


{ {
"datasette": { "datasette": {
Expand All @@ -76,9 +76,19 @@ Shows the version of Datasette, Python and SQLite. `Versions example <https://fi
"json1": null "json1": null
}, },
"fts_versions": [ "fts_versions": [
"FTS5",
"FTS4", "FTS4",
"FTS3" "FTS3"
], ],
"compile_options": [
"COMPILER=gcc-6.3.0 20170516",
"ENABLE_FTS3",
"ENABLE_FTS4",
"ENABLE_FTS5",
"ENABLE_JSON1",
"ENABLE_RTREE",
"THREADSAFE=1"
],
"version": "3.16.2" "version": "3.16.2"
} }
} }
Expand Down
1 change: 1 addition & 0 deletions tests/test_api.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ def test_versions_json(app_client):
assert 'sqlite' in response.json assert 'sqlite' in response.json
assert 'version' in response.json['sqlite'] assert 'version' in response.json['sqlite']
assert 'fts_versions' in response.json['sqlite'] assert 'fts_versions' in response.json['sqlite']
assert 'compile_options' in response.json['sqlite']




def test_config_json(app_client): def test_config_json(app_client):
Expand Down

0 comments on commit 8ce7866

Please sign in to comment.