Skip to content

Add CLI topic pages#3526

Merged
koxudaxi merged 1 commit into
mainfrom
docs-cli-topic-pages
Jul 2, 2026
Merged

Add CLI topic pages#3526
koxudaxi merged 1 commit into
mainfrom
docs-cli-topic-pages

Conversation

@koxudaxi

@koxudaxi koxudaxi commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a new “Focused Topics” section to the CLI reference, with dedicated pages for model, template, typing, and OpenAPI customization.
    • Topic pages group related options and link directly to the corresponding detailed option references.
  • Documentation
    • Updated the CLI documentation navigation to surface the new focused topic pages.
  • Bug Fixes
    • Improved rendering of option descriptions so special table-like syntax displays correctly (instead of becoming malformed links).
  • Tests
    • Added coverage for focused topic page generation and index linking behavior.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@koxudaxi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d985c408-aace-47bd-9a84-daa45b6d0741

📥 Commits

Reviewing files that changed from the base of the PR and between 1696406 and ef13200.

📒 Files selected for processing (8)
  • docs/cli-reference/index.md
  • docs/cli-reference/topics/model-customization.md
  • docs/cli-reference/topics/openapi.md
  • docs/cli-reference/topics/template-customization.md
  • docs/cli-reference/topics/typing-customization.md
  • scripts/build_cli_docs.py
  • tests/cli_doc/test_cli_options_sync.py
  • zensical.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-cli-topic-pages

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.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📚 Docs Preview: https://pr-3526.datamodel-code-generator.pages.dev

Comment thread scripts/build_cli_docs.py Fixed
Comment thread scripts/build_cli_docs.py Fixed
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0f09aee) to head (ef13200).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #3526   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          158       158           
  Lines        34254     34254           
  Branches      4001      4001           
=========================================
  Hits         34254     34254           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@koxudaxi koxudaxi force-pushed the docs-cli-topic-pages branch from a237356 to 1696406 Compare July 1, 2026 19:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
zensical.toml (1)

24-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Nav entries are correct but unguarded against future enum drift.

This block correctly mirrors OptionTopic (order and slugs match docs/cli-reference/topics/*.md). However, nothing ties this hardcoded list to the OptionTopic enum — build_docs(check=True) validates generated markdown content but not this nav config. Adding/removing a topic later could silently leave a stale or missing nav entry.

Consider a lightweight test that parses zensical.toml's "Focused Topics" nav and asserts its entries match OptionTopic members, to catch drift automatically.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@zensical.toml` around lines 24 - 29, The “Focused Topics” nav in
zensical.toml is currently a hardcoded mirror of OptionTopic and can drift
silently. Add a lightweight test that parses the “Focused Topics” section from
zensical.toml and asserts its entries exactly match the OptionTopic enum members
and slugs, so additions/removals fail fast. Use OptionTopic as the source of
truth and keep the test focused on the nav entry list order and values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@zensical.toml`:
- Around line 24-29: The “Focused Topics” nav in zensical.toml is currently a
hardcoded mirror of OptionTopic and can drift silently. Add a lightweight test
that parses the “Focused Topics” section from zensical.toml and asserts its
entries exactly match the OptionTopic enum members and slugs, so
additions/removals fail fast. Use OptionTopic as the source of truth and keep
the test focused on the nav entry list order and values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b7a608d0-c7a7-4338-ad32-07bf6d40fcae

📥 Commits

Reviewing files that changed from the base of the PR and between 0f09aee and a237356.

📒 Files selected for processing (8)
  • docs/cli-reference/index.md
  • docs/cli-reference/topics/model-customization.md
  • docs/cli-reference/topics/openapi.md
  • docs/cli-reference/topics/template-customization.md
  • docs/cli-reference/topics/typing-customization.md
  • scripts/build_cli_docs.py
  • tests/cli_doc/test_cli_options_sync.py
  • zensical.toml

@codspeed-hq

codspeed-hq Bot commented Jul 1, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 16.65%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 11 regressed benchmarks
⏩ 98 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime test_perf_deep_nested 4.1 s 5.1 s -18.1%
WallTime test_perf_all_options_enabled 4.3 s 5.3 s -17.74%
WallTime test_perf_kubernetes_style_pydantic_v2 2.1 s 2.5 s -16.79%
WallTime test_perf_openapi_large 2.4 s 2.9 s -16.75%
WallTime test_perf_large_models_pydantic_v2 2.9 s 3.5 s -16.71%
WallTime test_perf_stripe_style_pydantic_v2 1.6 s 2 s -16.56%
WallTime test_perf_duplicate_names 851 ms 1,018 ms -16.4%
WallTime test_perf_complex_refs 1.6 s 1.9 s -16.38%
WallTime test_perf_aws_style_openapi_pydantic_v2 1.6 s 1.9 s -16.2%
WallTime test_perf_multiple_files_input 2.9 s 3.4 s -15.91%
WallTime test_perf_graphql_style_pydantic_v2 648 ms 767.2 ms -15.54%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing docs-cli-topic-pages (ef13200) with main (0f09aee)

Open in CodSpeed

Footnotes

  1. 98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@koxudaxi koxudaxi force-pushed the docs-cli-topic-pages branch from 1696406 to 52a963e Compare July 1, 2026 19:59
@koxudaxi koxudaxi force-pushed the docs-cli-topic-pages branch from 52a963e to ef13200 Compare July 1, 2026 20:08
@koxudaxi koxudaxi merged commit d72a334 into main Jul 2, 2026
61 of 62 checks passed
@koxudaxi koxudaxi deleted the docs-cli-topic-pages branch July 2, 2026 02:35
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: PR #3526 is purely additive documentation tooling. It adds new CLI-reference "Focused Topics" markdown pages, extends scripts/build_cli_docs.py to generate them, adds corresponding tests, and registers the new pages in zensical.toml nav. No changes touch the generator's runtime code, CLI options, Python API, default values/behavior, generated code output, Jinja2 templates, error handling, or supported Python versions. The deleted-lines file is empty and the diff contains no removals of any option, parameter, class, enum value, or function that users rely on. Therefore there are no breaking changes.


This analysis was performed by Claude Code Action

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🎉 Released in 0.67.0

This PR is now available in the latest release. See the release notes for details.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants