Skip to content

Add a datamodel-code-generator command for uvx and pipx run - #6684

Merged
Koudai Aono (koxudaxi) merged 1 commit into
mainfrom
entry-point-name
Nov 10, 2026
Merged

Koudai Aono (koxudaxi) merged 1 commit into
mainfrom
entry-point-name

Conversation

@koxudaxi

@koxudaxi Koudai Aono (koxudaxi) commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added a registered command-line entry point for starting the existing application. After installation, you can use the console command in environments that support package commands, rather than invoking the application as a Python module.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project configuration adds the datamodel-code-generator console script and maps it to the existing datamodel_code_generator.__main__:main entry point.

Changes: Console script

Layer / File(s) Summary
Register console script
pyproject.toml
The project configuration adds the datamodel-code-generator command and maps it to the existing module entry point.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Possibly related issues

  • Issue 5096 — The new console script supports running the package through uvx or pipx run, as described in the issue.
Merge Risk: Minimal · up to 0f352

The new command uses the existing CLI entry point. No merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the change: adding the datamodel-code-generator command for use with uvx and pipx run.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4e407d7 and 0f3528d.

Files selected for processing: 1

  • pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@koxudaxi
Koudai Aono (koxudaxi) marked this pull request as ready for review November 10, 2026 16:41
@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-10T16:42:33.732959Z 0f3528d 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 improve performance by ×2.1

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 improved benchmarks
⏩ 98 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_perf_client_calls[sync] 44.5 ms 18.5 ms ×2.4
⚡ test_perf_client_calls[async] 48.7 ms 20.3 ms ×2.4
⚡ test_perf_load_pyproject_config[config-multiple] 262.8 µs 114 µs ×2.3
⚡ test_perf_load_pyproject_config[mapping-multiple] 262.4 µs 114.3 µs ×2.3
⚡ test_perf_load_pyproject_config[config-None] 241.8 µs 105.5 µs ×2.3
⚡ test_perf_load_pyproject_config[mapping-None] 240.3 µs 106.8 µs ×2.2
⚡ test_perf_large_models_typed_dict[legacy-requiredness] 1,431 ms 640.1 ms ×2.2
⚡ test_perf_large_models_dataclass_builtin 1,665.6 ms 746.3 ms ×2.2
⚡ test_perf_large_models_typed_dict[total-false-requiredness] 1,415.7 ms 637 ms ×2.2
⚡ test_perf_duplicate_names 1,206.9 ms 544.1 ms ×2.2
⚡ test_perf_pydantic_field_name_resolution 2.7 ms 1.2 ms ×2.2
⚡ test_perf_complex_refs 2.5 s 1.1 s ×2.2
⚡ test_perf_mapped_reference_users 964 ms 439.2 ms ×2.2
⚡ test_perf_large_models_pydantic_v2 4.2 s 1.9 s ×2.2
⚡ test_perf_large_models_pydantic_v2_builtin_double_quotes 1,728.9 ms 790.5 ms ×2.2
⚡ test_perf_openapi_large 3.9 s 1.8 s ×2.2
⚡ test_perf_deep_nested 6.5 s 3 s ×2.2
⚡ test_perf_simple_msgspec_unset_field_rendering 588.3 ms 273.2 ms ×2.2
⚡ test_perf_large_models_msgspec 2.4 s 1.1 s ×2.1
⚡ test_perf_local_reference_file_resolution 156.3 ms 73 ms ×2.1
... ... ... ... ...

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

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing entry-point-name (0f3528d) with main (4e407d7)

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 Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@koxudaxi
Koudai Aono (koxudaxi) enabled stacked auto-merge (squash) November 10, 2026 18:39
@koxudaxi
Koudai Aono (koxudaxi) merged commit 56f0bad into main Nov 10, 2026
117 checks passed
@koxudaxi
Koudai Aono (koxudaxi) deleted the entry-point-name branch November 10, 2026 18:53
@github-actions

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: The PR only adds one line to pyproject.toml, registering a new console script entry point named datamodel-code-generator that points to the same main function as the existing datamodel-codegen script. The existing script is unchanged and nothing is removed, so this is a purely additive CLI alias. The deleted lines file is empty, and every behaviour diff cell is classified as both-fail, which means default generated output does not change. There are no template, API, default behaviour, Python version or error handling changes.


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