spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

docs: stabilize integrations reference rendering

Open DyanGalih opened this issue 6 months ago • 9 comments

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 avatar May 24 '26 23:05 DyanGalih

Please address Copilot feedback

mnriem avatar May 27 '26 11:05 mnriem

I have addressed the Copilot feedback by introducing a render_code_span helper to safely handle strings containing backticks when generating the markdown tables. This fixes the issues with malformed tables for tags and IDs.

DyanGalih avatar Jun 26 '26 03:06 DyanGalih

I have also addressed the remaining feedback: CliRunner is now instantiated with mix_stderr=False to fix flaky tests, and ROOT_DIR is globally cached in _assets.py to avoid redundant path traversal. All threads are now resolved.

DyanGalih avatar Jun 26 '26 03:06 DyanGalih

I have also addressed the latest feedback by adding zed to the doc URLs map and updating list_integrations_for_docs to fall back to the integration install_url when an override is not present. All review threads are now resolved!

DyanGalih avatar Jun 26 '26 04:06 DyanGalih

I have addressed the remaining PR feedback. I updated _format_tags() in community_catalog_docs.py to correctly normalize newlines in tags using render_cell(). I also updated the relevant tests in test_community_catalog_docs.py to include coverage for tags with newlines. The local linters and tests all pass, and the changes have been pushed to the PR branch.

DyanGalih avatar Jun 30 '26 14:06 DyanGalih

Please address Copilot feedback and also address test & lint errors

mnriem avatar Jun 30 '26 14:06 mnriem

Please address Copilot feedback and fix test & lint errors

mnriem avatar Jul 01 '26 18:07 mnriem

Addressed the latest feedback on the integrations docs rendering path.

What changed:

  • Updated the list_integrations_for_docs docstring and warning text to match the actual install_url fallback behavior.
  • Added regression coverage for the missing-doc-url fallback path.
  • Kept the community catalog escaping fixes in place for tags and IDs.

Validation:

  • PYTHONPATH=src uv run pytest tests/test_catalog_docs.py tests/test_community_catalog_docs.py
  • PYTHONPATH=src uv run ruff check .

I also resolved the remaining review threads that were already addressed.

DyanGalih avatar Jul 07 '26 13:07 DyanGalih

Please address Copilot feedback and test & lint errors

mnriem avatar Jul 08 '26 12:07 mnriem

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Sep 11 '26 00:09 github-actions[bot]

This pull request has been automatically closed after 90 days without activity. To request reconsideration, please explain why the change is still needed, confirm that the implementation is current and ready for review, and address any outstanding feedback or conflicts. Ask a maintainer to reopen this pull request if the existing branch and approach remain valid. Otherwise, create a new pull request, link this one, and explain what has changed.

github-actions[bot] avatar Oct 11 '26 01:10 github-actions[bot]