Skip to content

Name the current and located document and definition entries once - #6703

Merged
Koudai Aono (koxudaxi) merged 1 commit into
dry-01from
dry-02
Nov 11, 2026
Merged

Koudai Aono (koxudaxi) merged 1 commit into
dry-01from
dry-02

Conversation

@koxudaxi

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 41006f6 and 7723a92.

Files selected for processing: 4

  • src/datamodel_code_generator/parser/_inherited_schemas.py
  • src/datamodel_code_generator/parser/_schema_documents.py
  • src/datamodel_code_generator/parser/_schema_refs.py
  • src/datamodel_code_generator/parser/jsonschema.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@koxudaxi
Koudai Aono (koxudaxi) marked this pull request as ready for review November 10, 2026 23:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:43:00.003425Z 7723a92 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

@codspeed

codspeed Bot commented Nov 10, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 47.85%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 53 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

❌ 53 regressed benchmarks
⏩ 98 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_perf_client_calls[async] 20.1 ms 49.3 ms -59.12%
❌ test_perf_client_calls[sync] 18.5 ms 44.7 ms -58.61%
❌ test_perf_load_pyproject_config[mapping-multiple] 113.1 µs 264.2 µs -57.21%
❌ test_perf_load_pyproject_config[config-None] 105.7 µs 242.8 µs -56.48%
❌ test_perf_load_pyproject_config[mapping-None] 106.9 µs 244.8 µs -56.34%
❌ test_perf_load_pyproject_config[config-multiple] 113.5 µs 259.4 µs -56.24%
❌ test_perf_unique_items_runtime_scalar_validation 1.5 ms 3.2 ms -53.67%
❌ test_perf_pydantic_field_name_resolution 1.2 ms 2.6 ms -53.11%
❌ test_perf_simple_msgspec_unset_field_rendering 276.1 ms 582.6 ms -52.61%
❌ test_perf_unique_items_nested_model_validation 1.5 ms 3.2 ms -51.26%
❌ test_perf_duplicate_names 582 ms 1,190.7 ms -51.13%
❌ test_perf_graphql_style_pydantic_v2 476 ms 961.6 ms -50.5%
❌ test_perf_scalar_root_collapsed_builtin 123.1 ms 247.6 ms -50.29%
❌ test_perf_extreme_large_schema 8.6 s 17 s -49.63%
❌ test_perf_inherited_required_fields[required-base-first] 455.4 ms 899.1 ms -49.35%
❌ test_perf_aws_style_openapi_pydantic_v2 1.3 s 2.6 s -49.33%
❌ test_perf_unique_items_collapsed_builtin 1.1 s 2.2 s -49.32%
❌ test_perf_inherited_required_fields[partial-base-first] 796 ms 1,563.5 ms -49.09%
❌ test_perf_unique_items_schema_validators 1.1 s 2.2 s -49.07%
❌ test_perf_inherited_required_fields[required-derived-first] 495.8 ms 972.9 ms -49.04%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

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


Comparing dry-02 (7723a92) with dry-01 (41006f6)

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
Koudai Aono (koxudaxi) merged commit fc83af2 into main Nov 11, 2026
53 of 144 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: This PR is an internal refactor of private parser modules (_inherited_schemas, _schema_documents, _schema_refs) and of jsonschema.py. It adds the helpers current_document, located_document and definition_entries, which wrap repeated calls to schema_resource_document and the definitions-entry walk, and it replaces the inline expressions with these helpers. The results are the same as before: definition_entries puts the container entries first and then the namespace walk, and slicing past len(definitions) gives back the old list. The only import that was removed, DocumentId in _schema_refs, is still used through located_document. No public CLI option, Python API, template or default changes. Every cell in the behaviour diff gate is both-fail, and none are accepted or violation, so default generated output does not change.


This analysis was produced by the release draft workflow

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Released in 0.93.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.

1 participant