Add CLI relationship summary#3530
Conversation
Merging this PR will not alter performance
|
|
📚 Docs Preview: https://pr-3530.datamodel-code-generator.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds CLI reference generation for option relationships, preserves injected example sections in regenerated docs, and updates the generated index output and tests. ChangesCLI docs generation
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
c59939b to
52122f3
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/cli_doc/test_cli_options_sync.py (1)
420-458: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for "Conflicts" kind and multi-category ordering.
Both tests use a single category and only exercise "Implies"/"Requires". The "Conflicts" kind (rendered without a value suffix, per
docs/cli-reference/index.mdrows 39-40) and row ordering across multiple categories (viaOPTION_CATEGORY_ORDER) are untested at the unit level.🤖 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 `@tests/cli_doc/test_cli_options_sync.py` around lines 420 - 458, Add unit coverage in test_cli_options_sync.py for generate_relationship_summary to verify the “Conflicts” relationship rendering and that multiple categories are ordered using OPTION_CATEGORY_ORDER. Update or add tests around CLIDocOption and build_cli_docs.generate_relationship_summary so one case asserts a Conflicts row is emitted without a value suffix, and another uses options from more than one OptionCategory to confirm the final summary preserves the expected category ordering.
🤖 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 `@tests/cli_doc/test_cli_options_sync.py`:
- Around line 420-458: Add unit coverage in test_cli_options_sync.py for
generate_relationship_summary to verify the “Conflicts” relationship rendering
and that multiple categories are ordered using OPTION_CATEGORY_ORDER. Update or
add tests around CLIDocOption and build_cli_docs.generate_relationship_summary
so one case asserts a Conflicts row is emitted without a value suffix, and
another uses options from more than one OptionCategory to confirm the final
summary preserves the expected category ordering.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 215a3e17-8db9-4a1b-93c5-dd538eb369c8
📒 Files selected for processing (3)
docs/cli-reference/index.mdscripts/build_cli_docs.pytests/cli_doc/test_cli_options_sync.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3530 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 159 159
Lines 34268 34268
Branches 4001 4001
=========================================
Hits 34268 34268
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…hip-summary # Conflicts: # docs/cli-reference/index.md # scripts/build_cli_docs.py
…hip-summary # Conflicts: # docs/llms-full.txt
Breaking Change AnalysisResult: No breaking changes detected Reasoning: The PR only modifies documentation files (docs/cli-reference/index.md, docs/llms-full.txt) and a documentation-generation helper script (scripts/build_cli_docs.py) plus its tests (tests/cli_doc/test_cli_options_sync.py). All changes are additive doc content (Option Relationships table, Input Format Guide, Scenario Guide, richer generated examples) and new internal helper functions/tests in the docs tooling. No CLI option, Python API, enum value, class, default value, or generated-code behavior of datamodel-code-generator was changed. The deleted lines are only documentation placeholder text and hard-coded example timestamps, not runtime behavior. None of the six breaking-change categories apply. This analysis was performed by Claude Code Action |
|
🎉 Released in 0.67.0 This PR is now available in the latest release. See the release notes for details. |
Summary by CodeRabbit
Documentation
Tests