generate community extensions index from catalog#2564
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR introduces an automated generator for the community extensions reference documentation. The generator reads extensions/catalog.community.json and renders a Markdown table into docs/community/extensions.md between sentinel markers, with a CLI supporting --write and --check modes plus tests verifying drift detection.
Changes:
- Adds a
community_catalog_docshelper module with catalog loading, row iteration, and table/markdown rendering. - Adds a CLI script (
scripts/generate_community_extensions_index.py) supporting print/--write/--checkmodes. - Regenerates
docs/community/extensions.mdfrom the catalog, replacing the manually curated table with generated content between sentinel markers; adds tests for sync, sort, and CLI check mode.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| src/specify_cli/community_catalog_docs.py | Core helpers to load catalog, iterate rows, and render the generated table/index markdown. |
| scripts/generate_community_extensions_index.py | CLI entry point wrapping the helpers with write/check/print modes. |
| docs/community/extensions.md | Replaces the curated table with a generator-driven section delimited by markers; removes Categories/Effect legends. |
| tests/test_community_catalog_docs.py | Adds tests for sync, alphabetical ordering, and CLI --check behavior. |
Comments suppressed due to low confidence (1)
scripts/generate_community_extensions_index.py:1
--checkand--writeare not declared mutually exclusive, and if both are passed--checksilently wins (write is skipped). Useparser.add_mutually_exclusive_group()or validate explicitly to make the contract clear.
#!/usr/bin/env python3
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ea06181 to
0cb36ea
Compare
7f284f4 to
e2ca165
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 36 changed files in this pull request and generated 10 comments.
Comments suppressed due to low confidence (1)
src/specify_cli/workflows/engine.py:1
- The explicit guards that rejected
boolfortype: number(sincefloat(True)becomes1.0) and enforced real strings fortype: stringhave been removed. This will silently accept common YAML authoring mistakes (e.g.default: truefor a number, ordefault: 5for a string), potentially producing surprising runtime behavior. Consider reinstating: (1) an explicitisinstance(value, bool)rejection in thenumberbranch, and (2) astringbranch that requiresisinstance(value, str).
"""Workflow engine — loads, validates, and executes workflow YAML definitions.
e2ca165 to
8503e48
Compare
|
Please resolve conflicts |
|
Please address Copilot feedback |
b4df9ab to
2990f8b
Compare
|
Rebase needed: Please rebase cleanly on Scope: Please revert or split the following changes into a separate PR — they are unrelated to generating the community extensions index:
Copilot feedback: Please address the outstanding Copilot review comments that are not yet outdated. Communication: Rather than replying individually to each review comment, please use a single comment per commit describing what changed and which feedback items were addressed. This is easier to follow. AI disclosure: If you are using AI tooling to generate code or review replies, please disclose that. Several replies were posted within a 2-minute window with identical phrasing patterns, which suggests automated generation. |
|
Addressed the prerelease/dev build inconsistency so preset and extension compatibility now both accept source checkouts with prerelease versions when the specifier allows them. I also hardened the community catalog Markdown rendering and added regression tests for the new cases. |
This reverts commit a180619.
bf1a220 to
7806cc6
Compare
|
I have pushed a new commit to address the review feedback:
|
|
I have addressed the final rounds of feedback! Specifically:
Everything is green, and I have marked the remaining threads as resolved! |
mnriem
left a comment
There was a problem hiding this comment.
Please remove the following from the PR
- pr_body.json
- pr_body.txt
- threads.txt
What changed
docs/community/extensions.mdbacked byextensions/catalog.community.json.--markdownflag to thespecify extension searchcommand to generate the docs.prereleases=Trueifcurrent.is_devreleaseis True, allowing source/dev installations to satisfy version specifiers without accidentally accepting normal RC/beta builds.Why
Impact
Validation
specify extension search --markdown > docs/community/extensions.md(to update the page)pytest tests/test_community_catalog_docs.py -q