Skip to content

Fix fixture generation commands in the contributor guide - #3031

Open
Albertito-AI wants to merge 1 commit into
simonw:mainfrom
Albertito-AI:docs/fix-fixture-generation-examples
Open

Albertito-AI wants to merge 1 commit into
simonw:mainfrom
Albertito-AI:docs/fix-fixture-generation-examples

Conversation

@Albertito-AI

Copy link
Copy Markdown

The contributor guide omits the configuration argument required by tests/fixtures.py. The metadata example therefore writes configuration into fixtures-metadata.json, while the plugin example fails with Error: Metadata should end with .json.

This updates both examples to supply separate configuration and metadata filenames, includes --recreate so they work after the preceding database-generation step, and loads the generated configuration with -c when starting Datasette.

Verification:

  • Reproduced both original outcomes against main.
  • Ran the corrected fixture commands sequentially in a temporary directory.
  • Verified the generated JSON and all six copied plugin files.
  • Used the documented server arguments to check the homepage metadata, loaded plugins and the stored neighborhood_search query.
  • Documentation tests: 13 passed, 143 subtests passed.
  • Sphinx HTML build with warnings treated as errors, blacken-docs, Cog and git diff --check all passed.

AI assistance: this patch and its validation were prepared with ChatGPT. The checks listed above were executed locally; a separate AI review also reran the fixture and server-example checks.

Prepared with AI assistance; validated locally before submission.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant