Skip to content

Conversation

@ThinkOpenly
Copy link
Collaborator

$ ./tools/python/profile-extensions.py --profiles RVA23U64 gen/resolved_spec/_/
RVA23U64:
-  A = 2.1 mandatory
-  C = 2.0 mandatory
-  D = 2.2 mandatory
-  F = 2.2 mandatory
-  I ~> 2.1 mandatory
-  M = 2.0 mandatory
-  Supm ~>1.0 mandatory
-  U ~> 2.0 mandatory
-  V ~> 1.0 mandatory
-  Za64rs ~>1.0 mandatory
[...]

…file(s)

```
$ ./tools/python/profile-extensions.py --profiles RVA23U64 gen/resolved_spec/_/
RVA23U64:
-  A = 2.1 mandatory
-  C = 2.0 mandatory
-  D = 2.2 mandatory
-  F = 2.2 mandatory
-  I ~> 2.1 mandatory
-  M = 2.0 mandatory
-  Supm ~>1.0 mandatory
-  U ~> 2.0 mandatory
-  V ~> 1.0 mandatory
-  Za64rs ~>1.0 mandatory
[...]
```

Signed-off-by: Paul A. Clarke <[email protected]>
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.05%. Comparing base (cbcb87e) to head (9791dbd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1231   +/-   ##
=======================================
  Coverage   46.05%   46.05%           
=======================================
  Files          11       11           
  Lines        4942     4942           
  Branches     1345     1345           
=======================================
  Hits         2276     2276           
  Misses       2666     2666           
Flag Coverage Δ
idlc 46.05% <ø> (ø)

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.

Copy link
Collaborator

@dhower-qc dhower-qc left a comment

Choose a reason for hiding this comment

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

  • Dumb Python question: What's the Python equivalent of a Ruby Gem? Should this wrapped in whatever that is (with other functions, too?)?
  • I would suggest a new regression in regress.yml so this continues to work.

@ThinkOpenly
Copy link
Collaborator Author

Dumb Python question: What's the Python equivalent of a Ruby Gem? Should this wrapped in whatever that is (with other functions, too?)?

Probably a Python module. If we wanted to start building a Python infrastructure, we could certainly go that route. There is some similar infrastructure emerging in backends/generators, which we could organize as a more general set of utilities/functions.

One of the motivations, though, was just to have a short example showing a practical use of UDB from Python: load YAML, walk through it and do something interesting with the data.

Refactoring would likely make the example even simpler by some measurement, since the "load YAML" part would be refactored out. I'll work on that.

I would suggest a new regression in regress.yml so this continues to work.

That can be done. I suppose we might want to use the "golden reference" approach. I should add a chore for updating all of the golden references, because this will likely become a common approach, and updating them each individually will be a pain.

@dhower-qc
Copy link
Collaborator

Refactoring would likely make the example even simpler by some measurement, since the "load YAML" part would be refactored out. I'll work on that.

Excellent

I suppose we might want to use the "golden reference" approach.

We might also get away with comparing the python "list extension" to the ruby "list extension"

@ThinkOpenly
Copy link
Collaborator Author

I suppose we might want to use the "golden reference" approach.

We might also get away with comparing the python "list extension" to the ruby "list extension"

Does the ruby "list extension" tag or filter by containing profile?

- Split common reusable components into a "UDB" module
- Add a golden output, and a task to generate/update it
- Add a test to verify current output matches golden output
- Add to regression tests

Signed-off-by: Paul A. Clarke <[email protected]>
from pathlib import Path


def store_yaml(path, kinds=[]):
Copy link
Contributor

Choose a reason for hiding this comment

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

We should avoid using an empty list as a default argument. It can create some very strange results if a function is called multiple times. See https://docs.astral.sh/ruff/rules/mutable-argument-default/ for more details.

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.

3 participants