Skip to content

Render CLI option relationships in docs#3518

Merged
koxudaxi merged 4 commits into
mainfrom
cli-option-relationship-docs
Jul 1, 2026
Merged

Render CLI option relationships in docs#3518
koxudaxi merged 4 commits into
mainfrom
cli-option-relationship-docs

Conversation

@koxudaxi

@koxudaxi koxudaxi commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • CLI reference docs now display clearer “Option relationships” notes (implies, requires, conflicts), including conditional requirements.
    • The generated CLI documentation includes these relationship sections automatically for supported options.
  • Documentation

    • Updated multiple CLI option pages to reflect the new option relationship constraints.
  • Bug Fixes

    • Improved consistency in how related-option information is rendered across CLI docs.
  • Tests

    • Added/expanded tests to verify relationship notes appear correctly in generated documentation.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2ac6104e-8f9d-4470-9f6e-30159e7ed8d8

📥 Commits

Reviewing files that changed from the base of the PR and between d2da742 and 7586da9.

📒 Files selected for processing (7)
  • docs/cli-reference/field-customization.md
  • docs/cli-reference/general-options.md
  • docs/cli-reference/model-customization.md
  • docs/cli-reference/template-customization.md
  • docs/cli-reference/typing-customization.md
  • scripts/build_cli_docs.py
  • tests/cli_doc/test_cli_options_sync.py
✅ Files skipped from review due to trivial changes (5)
  • docs/cli-reference/field-customization.md
  • docs/cli-reference/template-customization.md
  • docs/cli-reference/general-options.md
  • docs/cli-reference/typing-customization.md
  • docs/cli-reference/model-customization.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/cli_doc/test_cli_options_sync.py
  • scripts/build_cli_docs.py

Walkthrough

This PR adds option-relationship rendering to generated CLI docs, verifies the new output in tests, and updates several CLI reference pages with explicit relationships between options.

Changes

Option Relationships Documentation Generation

Layer / File(s) Summary
Relationship rendering helpers in build_cli_docs.py
scripts/build_cli_docs.py
Adds metadata imports, refactors related-option link formatting, and generates option relationship bullets from CLI option metadata in generated option sections.
Tests for relationship rendering
tests/cli_doc/test_cli_options_sync.py
Expands CLI doc sync tests and adds assertions for implies, conditional requires, and conflicts relationship text in generated option sections.
Static option relationship notes in CLI reference docs
docs/cli-reference/field-customization.md, docs/cli-reference/general-options.md, docs/cli-reference/model-customization.md, docs/cli-reference/template-customization.md, docs/cli-reference/typing-customization.md
Adds "Option relationships" notes to CLI reference pages for field, general, model, template, and typing customization options.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

Poem

I nibble docs with velvet feet,
And make each option’s links more neat.
Implies and requires hop in a row,
Conflicts stay clear in the doc’s soft glow.
🐰

🚥 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 title clearly summarizes the main change: documenting and rendering CLI option relationships in the docs.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cli-option-relationship-docs

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-3518.datamodel-code-generator.pages.dev

Comment thread scripts/build_cli_docs.py Fixed
Comment thread scripts/build_cli_docs.py Fixed
@codspeed-hq

codspeed-hq Bot commented Jul 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 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.

✅ 11 untouched benchmarks
⏩ 98 skipped benchmarks1


Comparing cli-option-relationship-docs (7586da9) with main (8de7254)

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.

@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 (8de7254) to head (7586da9).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #3518   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          155       155           
  Lines        34076     34076           
  Branches      3992      3992           
=========================================
  Hits         34076     34076           
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 marked this pull request as ready for review July 1, 2026 16:48
@koxudaxi koxudaxi force-pushed the cli-option-relationship-docs branch from 8cf7199 to 7586da9 Compare July 1, 2026 17:56
@koxudaxi koxudaxi merged commit 99ce460 into main Jul 1, 2026
61 checks passed
@koxudaxi koxudaxi deleted the cli-option-relationship-docs branch July 1, 2026 18:53
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: PR #3518 is documentation-only tooling. The diff changes: (1) generated docs pages under docs/cli-reference/ that add "Option relationships:" sections describing existing implies/requires/conflicts behavior, (2) scripts/build_cli_docs.py which is a docs-generation helper (not part of the shipped package/API), adding internal helper functions like _format_option_link and _generate_option_relationships, and (3) tests in tests/cli_doc/. No CLI options, Python API symbols, enum values, defaults, or generated-code output are added or removed. The only removed lines in the diff are a refactor of internal docs-build helper logic replaced with a new helper call. None of the six breaking-change categories apply.


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