Skip to content

improve(docs): clearer Python API list links + cleaner C++ tables#51

Merged
WomB0ComB0 merged 1 commit intomainfrom
improve/api-doc-rendering
May 10, 2026
Merged

improve(docs): clearer Python API list links + cleaner C++ tables#51
WomB0ComB0 merged 1 commit intomainfrom
improve/api-doc-rendering

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

@WomB0ComB0 WomB0ComB0 commented May 10, 2026

Summary

Two visual improvements identified by capturing screenshots of the rendered output with @elysiumoss/ui-capture.

1. Python overview API list — drop backticks from link text

Before:
```md

Renders as: `Settings` — the `` background masks the link styling. Entries look like inert code spans, not clickable cross-references.

After:
```md

Renders as: standard link with Mintlify's underline + accent color. Clickability is obvious at a glance.

Unlinked entries (`- `name`` for re-exports without a documented target) keep the code-span style so the missing-target case stays visually distinct.

2. C++ tables — strip moxygen's `\`inline\`` annotation

Doxygen tags every header-defined method with `inline` (a compilation directive, not API surface). moxygen renders it on practically every row of every class summary table — pure noise.

Before:
```md
| `bool` | `is_ok` `const` `inline` | Check if result is successful. |
```

After:
```md
| `bool` | `is_ok` `const` | Check if result is successful. |
```

`const`, `static`, `noexcept`, `virtual` are kept because they describe observable behavior. Only `inline` is stripped.

Files changed

  • `automation/source-repo-templates/api-docs.python.yml` — emit links without backticks
  • `automation/source-repo-templates/api-docs.cpp.yml` — new "Strip noise annotations" step
  • `sdks/python/api/resq-{dsa,mcp}/overview.md` — re-rendered live
  • `sdks/cpp/api/resq-common/*.md` — re-rendered live (16 files)

Test plan

  • Captured before/after screenshots; difference is visible at thumbnail size
  • After merge, sync templates to source repos via `automation/sync-templates.sh` so future regenerations stay correct

Summary by CodeRabbit

  • Documentation
    • Updated C++ and Python API documentation to improve method signature presentation by removing unnecessary inline qualifiers from displayed signatures in tables and method headings, while maintaining consistency with actual code implementations.

Review Change Stack

Two visual improvements identified by browsing the rendered output:

1. Python `<package>/overview.md` API list — drop backticks from
   link text. The earlier `[\`Settings\`](url)` form rendered as
   `<a><code>Settings</code></a>`, where the `<code>` background
   visually masked the link styling and made the entries look like
   inert code spans rather than clickable cross-references. Plain
   `[Settings](url)` gets Mintlify's standard link underline +
   accent color, signalling clickability at a glance. Unlinked
   entries (re-exports without a documented home) keep the
   code-span style so missing-target cases stay visually distinct.

2. C++ tables — strip moxygen's `\`inline\`` annotation. Doxygen
   tags every header-defined method with `inline` (a compilation
   directive, not API surface), and moxygen renders it on
   practically every row of every class summary table. `const`,
   `static`, `noexcept`, `virtual` are kept because they describe
   observable behavior; only `inline` is filtered.

Templates updated so future regenerations stay correct; live files
under `sdks/{python,cpp}/api/` rewritten in-place to match.
@github-actions github-actions Bot added the area:content MDX/MD documentation content label May 10, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR systematically removes inline keyword annotations from API documentation across C++ and Python SDK references. A workflow update adds a sed post-processing step to strip the literal `inline` token from generated Markdown, while Python overview links are reformatted to emit plain text instead of backtick-wrapped identifiers for better Mintlify rendering.

Changes

Documentation inline qualifier removal

Layer / File(s) Summary
C++ documentation workflow
automation/source-repo-templates/api-docs.cpp.yml
New sed post-processing step removes `inline` token from all generated C++ API .md files after link prefixing and before breadcrumb stripping.
Python documentation link formatting
automation/source-repo-templates/api-docs.python.yml
Cross-link script now generates plain Markdown [name](path) links for resolved symbols instead of backtick-wrapped [name](path) text; unresolved symbols remain as unlinked inline-code `name`.
ArrayUtils public static methods
sdks/cpp/api/resq-common/resq-ArrayUtils.md
All 11 method signatures remove inline from tables and section headers; underlying C++ code blocks retain static inline.
Result type specializations
sdks/cpp/api/resq-common/resq-Result.md, resq-Result( void ).md
Both Result<T> and Result<void> constructors, accessors, and static factory methods remove inline from documented qualifiers while code blocks are unchanged.
File operation utilities
sdks/cpp/api/resq-common/resq-FileHandle.md, resq-FileUtils.md
FileHandle public/static methods and FileUtils 18-method suite display static instead of static inline in signature tables and section headers.
StringUtils string functions
sdks/cpp/api/resq-common/resq-StringUtils.md
All 17 static utility methods (split, trim, join, replace, etc.) remove inline from displayed signatures.
Geospatial function APIs
sdks/cpp/api/resq-common/resq-common-geo-NoFlyZone.md, resq-common-geo.md, resq-common-time.md
NoFlyZone methods (contains_point, contains_altitude, contains), module-level geometry functions, and time utilities remove inline from table and section signature displays.
Data structure implementations
sdks/cpp/api/resq-common/resq-dsa-*.md
BloomFilter, BoundedHeap, CountMinSketch, Graph, and Trie classes, plus the rabin_karp function, have inline removed from all documented method and function signatures in tables and section headers.
Python package overview formatting
sdks/python/api/resq-dsa/overview.md, resq-mcp/overview.md
Explicit markdown bullet lists for API exports; resq-mcp items lose backticks around link text per updated link generation logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • resq-software/docs#29: Previous PR modifying api-docs workflow post-processing steps for Markdown link generation and intra-page link prefixing.

Suggested labels

area:content, docs:api-ref

Poem

🐰 Inline qualifiers vanish with a sed-stroke,
Documentation now displays pure method folk,
Links in Python shed their backtick cloak,
Markdown rendered clean—no more to revoke!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: improving Python API documentation link formatting and cleaning up C++ documentation tables by removing inline annotations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve/api-doc-rendering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@WomB0ComB0 WomB0ComB0 merged commit b7bc58e into main May 10, 2026
13 of 14 checks passed
@WomB0ComB0 WomB0ComB0 deleted the improve/api-doc-rendering branch May 10, 2026 05:41
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refines the API documentation generation by stripping inline annotations from C++ headers and removing backticks from linked identifiers in Python documentation to improve visual styling. Feedback indicates that the sed command used to remove inline is too broad and may inadvertently affect descriptive text; a more restrictive regex is suggested. Furthermore, removing backticks from Python identifiers with underscores can cause Markdown rendering issues, such as unintended italics, necessitating the escaping of underscores in those names.

working-directory: ${{ env.OUTPUT_DIR }}
run: |
find . -type f -name '*.md' -print0 | while IFS= read -r -d '' f; do
sed -i -E 's/ `inline`//g' "$f"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The global sed replacement is too aggressive and violates the general rule regarding MDX safety and CommonMark parsing. Because it performs a simple string replacement on the entire file, it will incorrectly strip the word 'inline' (when inside backticks) from function descriptions or prose (e.g., 'This method is inline for performance'), leading to corrupted documentation.

It is safer to restrict the replacement to contexts where it is clearly a modifier, such as when it is followed by another backticked modifier, a table cell separator (|), or the end of a line.

            sed -i -E 's/ \x60inline\x60([[:space:]]*(\x60[^\x60]+\x60|[|]|$))/\1/g' "$f"
References
  1. When processing Markdown/MDX files to escape curly braces for JSX compatibility, ensure the logic ignores content within inline code spans (backticks) to prevent breaking code snippets.

# code spans elsewhere on the page.
api_lines.append(
f"- [`{name}`](./{target_rel}#{slug})"
f"- [{name}](./{target_rel}#{slug})"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Removing backticks from the link text introduces a regression for Python identifiers containing underscores (e.g., rabin_karp). In Markdown, underscores are interpreted as emphasis markers. Without backticks or explicit escaping, these links will render with unintended italics.

You should escape underscores in the name variable before appending it to the link text.

                          f"- [{name.replace('_', r'\\_')}](./{target_rel}#{slug})"

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

Labels

area:content MDX/MD documentation content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants