You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 05ece29
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/contributing.rst
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,24 +160,19 @@ If you want to change Datasette's Python code you can use the ``--reload`` optio
160
160
This also enables development mode for static asset cache busting, described in
161
161
:ref:`customization_static_files`.
162
162
163
-
You can also use the ``fixtures.py`` script to recreate the testing version of ``metadata.json`` used by the unit tests. To do that::
163
+
You can also use the ``fixtures.py`` script to write the configuration and metadata used by the unit tests. The configuration filename comes before the metadata filename::
164
164
165
-
uv run python tests/fixtures.py fixtures.db fixtures-metadata.json
165
+
uv run python tests/fixtures.py fixtures.db fixtures-config.json fixtures-metadata.json --recreate
166
166
167
-
Or to output the plugins used by the tests, run this::
167
+
The ``--recreate`` option replaces the ``fixtures.db`` created above. Omit it if you are creating a new database.
168
168
169
-
uv run python tests/fixtures.py fixtures.db fixtures-metadata.json fixtures-plugins
170
-
Test tables written to fixtures.db
171
-
- metadata written to fixtures-metadata.json
172
-
Wrote plugin: fixtures-plugins/register_output_renderer.py
173
-
Wrote plugin: fixtures-plugins/view_name.py
174
-
Wrote plugin: fixtures-plugins/my_plugin.py
175
-
Wrote plugin: fixtures-plugins/messages_output_renderer.py
176
-
Wrote plugin: fixtures-plugins/my_plugin_2.py
169
+
To also output the plugins used by the tests, add the plugins directory as the final argument::
177
170
178
-
Then run Datasette like this::
171
+
uv run python tests/fixtures.py fixtures.db fixtures-config.json fixtures-metadata.json fixtures-plugins --recreate
179
172
180
-
uv run datasette fixtures.db -m fixtures-metadata.json --plugins-dir=fixtures-plugins/
173
+
Then run Datasette with both files and the plugins directory::
174
+
175
+
uv run datasette fixtures.db -c fixtures-config.json -m fixtures-metadata.json --plugins-dir=fixtures-plugins/
0 commit comments