Skip to content

test: Run the model generator in unit tests - #1082

Merged
vdusek merged 2 commits into
masterfrom
test/model-generator-smoke
Oct 2, 2026
Merged

vdusek merged 2 commits into
masterfrom
test/model-generator-smoke

Conversation

@vdusek

@vdusek vdusek commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

PR CI never runs poe generate-models. Only the nightly regeneration workflow does, so a datamodel-code-generator update that breaks generation can pass CI and automerge through Renovate. The first sign would be a failed nightly run.

The new unit test runs both codegen passes with the repo's [tool.datamodel-codegen] config on a small spec, then the post-processing script. It checks the result: docs_group decorators, the camelCase alias generator, AwareDatetime for date-time, enums turned into open Literal[...] | str aliases in _literals.py, and TypedDict pruning plus camelCase twins. It runs in under a second.

Same idea as apify/apify-client-js#1097.

✍️ Drafted by Claude Code

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 1, 2026
@vdusek vdusek self-assigned this Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.30%. Comparing base (9be215b) to head (e418631).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1082   +/-   ##
=======================================
  Coverage   95.30%   95.30%           
=======================================
  Files          60       60           
  Lines        5753     5753           
=======================================
  Hits         5483     5483           
  Misses        270      270           
Flag Coverage Δ
integration 91.41% <ø> (-0.13%) ⬇️
unit 87.74% <ø> (ø)

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek requested a review from Pijukatel October 1, 2026 10:10
@vdusek
vdusek marked this pull request as ready for review October 1, 2026 10:10
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 1, 2026
@vdusek
vdusek merged commit ac60559 into master Oct 2, 2026
31 of 32 checks passed
@vdusek
vdusek deleted the test/model-generator-smoke branch October 2, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants