Skip to content

ci: Sort generated model classes alphabetically with topological ordering#727

Merged
vdusek merged 4 commits intomasterfrom
vdusek/sort-generated-model-classes
Apr 15, 2026
Merged

ci: Sort generated model classes alphabetically with topological ordering#727
vdusek merged 4 commits intomasterfrom
vdusek/sort-generated-model-classes

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Apr 15, 2026

Summary

  • Add alphabetical class sorting (with topological ordering to respect inheritance) to postprocess_generated_models.py, so that regeneration from a reordered OpenAPI spec produces minimal diffs.
  • Make add_docs_group_decorators idempotent so the script can be safely re-run.
  • Apply the new sorting to _models.py.

Note

🤖 Generated with Claude Code

…dering

Add class sorting to postprocess_generated_models.py that orders class
definitions alphabetically while respecting inheritance dependencies via
topological sort. This makes regeneration from a reordered OpenAPI spec
produce minimal diffs. Also makes add_docs_group_decorators idempotent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 Apr 15, 2026
@vdusek vdusek self-assigned this Apr 15, 2026
@github-actions github-actions bot added this to the 138th sprint - Tooling team milestone Apr 15, 2026
@vdusek vdusek changed the title feat: sort generated model classes alphabetically with topological ordering ci: Sort generated model classes alphabetically with topological ordering Apr 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.36%. Comparing base (6ae308d) to head (fc7066a).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
+ Coverage   95.28%   95.36%   +0.07%     
==========================================
  Files          45       45              
  Lines        5114     5114              
==========================================
+ Hits         4873     4877       +4     
+ Misses        241      237       -4     
Flag Coverage Δ
integration 95.36% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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 April 15, 2026 07:40
Copy link
Copy Markdown
Contributor

@Pijukatel Pijukatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding a few test cases for the sorting. This functionality should not be hard to test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Apr 15, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vdusek vdusek merged commit 586d15e into master Apr 15, 2026
26 checks passed
@vdusek vdusek deleted the vdusek/sort-generated-model-classes branch April 15, 2026 12:06
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