Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate inspect-data.json for an immutable database #6

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
datasets/*.db
data.db

datasette/inspect-data.json

*.db-shm
*.db-wal
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The main database is created dynamically, combining the datasets into a single `

Then, you can run `yarn make-database` to create the database. This will (re-)create and correctly configure `datasette/data.db`.

Generate the cache file by running `cd datasette && datasette inspect data.db --inspect-file=inspect-data.json`.

## Running Datasette

We are using Datasette in [configuration directory mode](https://docs.datasette.io/en/stable/settings.html#configuration-directory-mode), as such you only need to pass that folder to get the correct configuration:
Expand All @@ -26,6 +28,7 @@ To add a new dataset, you need to:
4. Add the dataset and its metadata to `datasets.json`.
5. Mention the dataset in `datasette/templates/index.html` (in the "Datasets" section).
6. Run `yarn make-database` to recreate the main database.
7. Regenerate the cache file by running `cd datasette && datasette inspect data.db --inspect-file=inspect-data.json`.

## Plugins

Expand Down
3 changes: 2 additions & 1 deletion datasette/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"facet_time_limit_ms": 1000,
"sql_time_limit_ms": 50000,
"suggest_facets": false
"suggest_facets": false,
"allow_download": true
}