Skip to content

add the "ordered" schema attribute property#1150

Open
ajtmccarty wants to merge 1 commit into
infrahub-developfrom
ajtm-07082026-ordered-attr-prop
Open

add the "ordered" schema attribute property#1150
ajtmccarty wants to merge 1 commit into
infrahub-developfrom
ajtm-07082026-ordered-attr-prop

Conversation

@ajtmccarty

@ajtmccarty ajtmccarty commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

goes with opsmill/infrahub#9782


Summary by cubic

Adds the ordered attribute property to schema models and export logic. Defaults to true; exports only include ordered when set to false to keep output clean.

  • New Features
    • Added ordered: bool = True to infrahub_sdk.schema.main.AttributeSchema.
    • Updated _ATTR_EXPORT_DEFAULTS to omit "ordered" when true and include it when false; added a unit test to validate the round-trip.

Written for commit 15eafef. Summary will update on new commits.

Review in cubic

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 15eafef
Status: ✅  Deploy successful!
Preview URL: https://4174dc45.infrahub-sdk-python.pages.dev
Branch Preview URL: https://ajtm-07082026-ordered-attr-p.infrahub-sdk-python.pages.dev

View logs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

Re-trigger cubic

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                 Coverage Diff                  @@
##           infrahub-develop    #1150      +/-   ##
====================================================
+ Coverage             82.35%   82.37%   +0.01%     
====================================================
  Files                   138      138              
  Lines                 12065    12067       +2     
  Branches               1805     1805              
====================================================
+ Hits                   9936     9940       +4     
+ Misses                 1573     1572       -1     
+ Partials                556      555       -1     
Flag Coverage Δ
integration-tests 40.97% <0.00%> (-0.01%) ⬇️
python-3.10 55.82% <0.00%> (+0.02%) ⬆️
python-3.11 55.82% <0.00%> (+<0.01%) ⬆️
python-3.12 55.82% <0.00%> (+<0.01%) ⬆️
python-3.13 55.82% <0.00%> (+<0.01%) ⬆️
python-3.14 55.81% <0.00%> (+<0.01%) ⬆️
python-filler-3.12 22.45% <100.00%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/schema/export.py 82.35% <ø> (+5.88%) ⬆️
infrahub_sdk/schema/main.py 91.08% <100.00%> (+0.02%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ajtmccarty ajtmccarty marked this pull request as ready for review July 8, 2026 23:25
@ajtmccarty ajtmccarty requested a review from a team as a code owner July 8, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants