Skip to content

docs: stabilize integrations reference rendering#2694

Draft
DyanGalih wants to merge 2 commits into
github:mainfrom
DyanGalih:pr/2563-docs-fixes
Draft

docs: stabilize integrations reference rendering#2694
DyanGalih wants to merge 2 commits into
github:mainfrom
DyanGalih:pr/2563-docs-fixes

Conversation

@DyanGalih
Copy link
Copy Markdown
Contributor

Summary

This PR keeps the integrations docs rendering work from PR #2563 scoped to the PR-2563 branch.

What changed

  • Hardened integrations docs rendering helpers so markdown table output stays stable.
  • Added safer escaping for markdown link text and repository URLs.
  • Improved tests for the integrations reference table and community catalog docs.
  • Kept the integration search --markdown CLI path aligned with the docs rendering tests.

Why

The generated integrations reference was sensitive to ordering and markdown characters in labels, notes, and repository values. The tests now cover those edge cases so the docs output stays predictable.

Impact

  • More stable generated integrations docs.
  • Better handling of special characters in table rows and links.
  • Cleaner test coverage around the docs rendering paths.

Validation

  • pytest tests/test_catalog_docs.py tests/test_community_catalog_docs.py -q
  • python3 -m compileall -q src/specify_cli/__init__.py src/specify_cli/catalog_docs.py src/specify_cli/community_catalog_docs.py tests/test_catalog_docs.py tests/test_community_catalog_docs.py

DyanGalih added 2 commits May 24, 2026 15:46
Isolate the integrations docs rendering and test updates from the unrelated
prerelease compatibility gate fix so the PR 2563 branch stays focused.

Tests: targeted docs tests expected; full suite covered on the separate compatibility branch
Reference: upstream/main; source patch /tmp/spec-kit-changes.patch
Keep the  CLI path alongside the integrations
docs rendering changes so the PR 2563 branch remains testable.

Tests: pytest tests/test_catalog_docs.py tests/test_community_catalog_docs.py -q; python3 -m compileall -q src/specify_cli/__init__.py src/specify_cli/catalog_docs.py src/specify_cli/community_catalog_docs.py tests/test_catalog_docs.py tests/test_community_catalog_docs.py
Reference: upstream/main; source patch /tmp/spec-kit-changes.patch
Copilot AI review requested due to automatic review settings May 24, 2026 23:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Markdown table rendering utilities for built-in integrations and community extensions, plus CLI/test coverage to validate escaping and formatting.

Changes:

  • Introduces catalog_docs.py for generating the built-in integrations Markdown reference table (with escaping helpers).
  • Adds community_catalog_docs.py to render a community extensions Markdown table from extensions/catalog.community.json.
  • Extends integration search with --markdown output and adds comprehensive tests for formatting and edge cases.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_community_catalog_docs.py Adds tests covering community catalog parsing, sorting, and Markdown escaping edge cases.
tests/test_catalog_docs.py Adds tests for integrations Markdown rendering, URL/text escaping, and the new CLI --markdown behavior.
src/specify_cli/community_catalog_docs.py Implements community extensions catalog parsing and Markdown table rendering.
src/specify_cli/catalog_docs.py Implements integrations reference table renderer + escaping helpers and doc URL/label/note maps.
src/specify_cli/init.py Adds --markdown option to integration search to print the built-in integrations table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

from specify_cli import app


runner = CliRunner()
Comment on lines +17 to +18
ROOT_DIR = _repo_root()
COMMUNITY_CATALOG_PATH = ROOT_DIR / "extensions" / "catalog.community.json"
Comment on lines +21 to +27
def _format_tags(tags: Any) -> str:
if not isinstance(tags, list) or not tags:
return "—"
# Clean first, then filter: a tag of " | " would pass str(tag).strip() but produce
# an empty backtick span after pipe removal, so filter on the cleaned value.
cleaned = [f"`{c}`" for tag in tags if (c := str(tag).replace("|", "").strip())]
return ", ".join(cleaned) if cleaned else "—"
Comment on lines +84 to +92
table_rows.append(
[
link,
f"`{render_cell(row['id'])}`",
render_cell(row["description"]),
_format_tags(row["tags"]),
row["verified"],
]
)
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.

2 participants