Skip to content

Commit

Permalink
Generate inspect-data.json
Browse files Browse the repository at this point in the history
  • Loading branch information
zner0L committed Oct 7, 2024
1 parent 21ba2dc commit 39cbcdd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
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
}

0 comments on commit 39cbcdd

Please sign in to comment.