Skip to content

generate integrations reference from catalog#2563

Open
DyanGalih wants to merge 34 commits into
github:mainfrom
DyanGalih:002-generate-integrations-docs
Open

generate integrations reference from catalog#2563
DyanGalih wants to merge 34 commits into
github:mainfrom
DyanGalih:002-generate-integrations-docs

Conversation

@DyanGalih
Copy link
Copy Markdown
Contributor

@DyanGalih DyanGalih commented May 14, 2026

What changed

  • Added a small generator for the integrations reference table, backed by INTEGRATION_REGISTRY plus per-key URL and notes maps in catalog_docs.py.
  • Updated docs/reference/integrations.md so the supported agent table is generated from the integration registry (not hand-maintained).
  • Added a regression test that checks the committed doc stays in sync with the rendered table output.

Why

The integrations reference had been hand-maintained, which made it easy for the docs to drift from the runtime registry. This change makes the doc a checked artifact and reduces maintenance overhead.

User impact

  • Maintainers can update the integration registry and regenerate the docs with specify integration search --markdown.
  • Readers get a more reliable integrations reference with less chance of stale entries.

Validation

  • specify integration search --markdown
  • pytest tests/test_catalog_docs.py -q

Copilot AI review requested due to automatic review settings May 14, 2026 16:35
@DyanGalih DyanGalih marked this pull request as ready for review May 14, 2026 16:36
@DyanGalih DyanGalih requested a review from mnriem as a code owner May 14, 2026 16:36
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 catalog-backed generation and validation for the integrations reference documentation, along with a CLI script and tests to keep the generated markdown in sync.

Changes:

  • Introduce specify_cli.catalog_docs helpers to render/update the generated integrations table from integrations/catalog.json.
  • Add scripts/generate_integrations_reference.py with --check/--write modes for CI and local updates.
  • Regenerate docs/reference/integrations.md with generated-table markers and add tests to enforce consistency.

Reviewed changes

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

File Description
tests/test_catalog_docs.py Adds tests asserting the committed docs match the generator and that registry metadata is reflected.
src/specify_cli/catalog_docs.py Implements catalog loading, table rendering, and marker-based replacement for the docs page.
scripts/generate_integrations_reference.py Provides a CLI entrypoint to check or rewrite the generated integrations reference file.
docs/reference/integrations.md Converts the integrations table into a generated block and updates surrounding instructions.

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

Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread scripts/generate_integrations_reference.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
@DyanGalih DyanGalih changed the title [codex] generate integrations reference from catalog generate integrations reference from catalog May 14, 2026
@DyanGalih DyanGalih requested a review from Copilot May 14, 2026 16:53
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

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

Comment thread tests/test_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py
Comment thread tests/test_catalog_docs.py Outdated
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Love it, but can we integrate it into specify integration search --markdown? Specifically can we keep it simpler than this and just render out the table. On the project end we will take care of integrating it into the docs. I do not want to burden the CLI with that part of the process

@DyanGalih
Copy link
Copy Markdown
Contributor Author

Thanks for the direction! I've refactored based on your feedback:

What changed:

  • Removed scripts/generate_integrations_reference.py (standalone script gone)
  • Stripped all doc-injection machinery from catalog_docs.py — it now only contains the table-rendering helpers (list_integrations_for_docs, render_integrations_table)
  • Wired render_integrations_table() into the existing specify integration search --markdown flag — it now outputs the rich Agent/Key/Notes table (with proper column alignment and pipe/CR escaping) instead of the old simple Name/ID/Version/Description/Author table
  • Removed the HTML marker comments from docs/reference/integrations.md and updated the note to reference specify integration search --markdown
  • Simplified tests/test_catalog_docs.py to just verify table rendering and registry metadata — no subprocess or doc-path tests

Usage:

specify integration search --markdown

Prints the full integrations reference table to stdout. The docs team can paste it wherever needed.

@DyanGalih DyanGalih requested review from Copilot and mnriem May 14, 2026 22:49
@DyanGalih DyanGalih force-pushed the 002-generate-integrations-docs branch from 1bdc359 to 59c134c Compare May 14, 2026 23:07
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

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

Comment thread src/specify_cli/__init__.py Outdated
Comment thread docs/reference/integrations.md Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
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.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 3

Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py
Comment thread docs/reference/integrations.md Outdated
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback. Please revert the change to integrations.md as we will setup a separate GitHub actions job for that. Thanks for the great work

Copilot AI review requested due to automatic review settings May 15, 2026 13:50
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

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

Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/__init__.py Outdated
Comment thread src/specify_cli/__init__.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
@DyanGalih
Copy link
Copy Markdown
Contributor Author

Done! Both tasks completed:\n\n- Copilot feedback addressed — all review threads from the latest rounds have been fixed and replied to (removed dead INTEGRATIONS_REFERENCE_PATH constant, dropped URL-length padding from table renderer, updated integration_search docstring to reflect dual behavior, removed unreachable FileNotFoundError from the except clause, fixed naming from "catalog-backed" to registry-backed, updated PR description validation steps).\n- docs/reference/integrations.md reverted — restored to the upstream/main state and the in-process sync test was removed from the pytest suite (the GH Actions job will handle that check separately)."

@DyanGalih DyanGalih requested a review from Copilot May 15, 2026 14:08
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

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

Comment thread src/specify_cli/__init__.py Outdated
Comment thread src/specify_cli/__init__.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
@DyanGalih DyanGalih requested a review from Copilot May 15, 2026 14:55
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

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

Comment thread src/specify_cli/catalog_docs.py
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
@DyanGalih DyanGalih requested a review from Copilot May 15, 2026 18:11
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

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

Comment thread tests/test_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
Copilot AI review requested due to automatic review settings May 15, 2026 18:26
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

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

Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
@DyanGalih DyanGalih requested a review from Copilot May 15, 2026 20: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

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

Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/__init__.py
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

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

Comment thread tests/test_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py Outdated
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.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

Comment thread tests/test_catalog_docs.py
Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback

@DyanGalih DyanGalih requested a review from Copilot May 22, 2026 07:01
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

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

Comment thread src/specify_cli/community_catalog_docs.py Outdated
Comment thread src/specify_cli/community_catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/__init__.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 07:05
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

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

Comment thread tests/test_catalog_docs.py
Comment thread src/specify_cli/__init__.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 07:16
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

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

Comment thread src/specify_cli/catalog_docs.py
Comment thread src/specify_cli/catalog_docs.py Outdated
Comment thread src/specify_cli/catalog_docs.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 07:26
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

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

Comment thread src/specify_cli/community_catalog_docs.py Outdated
Comment thread tests/test_catalog_docs.py
Comment thread tests/test_catalog_docs.py Outdated
Comment thread src/specify_cli/__init__.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 07:35
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

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

Comment thread tests/test_catalog_docs.py
Comment thread tests/test_catalog_docs.py
Comment thread src/specify_cli/__init__.py Outdated
Comment thread src/specify_cli/community_catalog_docs.py Outdated
@DyanGalih
Copy link
Copy Markdown
Contributor Author

Addressed the remaining actionable Copilot feedback in the latest commit:

  • Centralized the shared repo root via _repo_root() in the docs helpers
  • Escaped markdown link text so [ / ] don’t break table labels
  • Trimmed whitespace-only repository values so they don’t become invalid links
  • Narrowed the markdown rendering error handling to expected failures
  • Updated integration search --markdown help/docstring text to match behavior
  • Added skip guards and safer parsing in the docs tests for minimal/package layouts
  • Kept the community docs table rendering and tests aligned with the current branch scope

The remaining older comments are stale/outdated relative to these changes.

Tighten the integrations docs rendering helpers and tests to cover the
remaining Copilot feedback from PR github#2563: shared repo-root lookup, safer
markdown link text, whitespace repository handling, narrower error handling,
and missing-file/test parsing guards.

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: PR github#2563; reply comment github#2563 (comment)
@DyanGalih DyanGalih requested a review from Copilot May 24, 2026 23:23
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

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

Comment thread src/specify_cli/community_catalog_docs.py
Comment thread src/specify_cli/catalog_docs.py
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.

3 participants