-
Notifications
You must be signed in to change notification settings - Fork 19
refactor: improve internal metamodel storage #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the internal metamodel storage by extending ScoreNeedType with type-safe fields for options and links, eliminating the need for explicit casts. The refactoring improves code analyzability and type safety while maintaining the same functionality.
- Extends
ScoreNeedTypewith mandatory/optional options and links fields - Replaces explicit casts and dynamic dict access with typed field access
- Simplifies the YAML parser by using the proper type structure
- Updates tests to reflect the new field names and removes no longer necessary test cases
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yaml_parser.py | Refactors metamodel data loading to use typed ScoreNeedType structure |
| metamodel_types.py | Extends ScoreNeedType with mandatory/optional options and links fields |
| check_options.py | Updates option checking logic to use new typed field access |
| test_metamodel_load.py | Updates test assertions to match new field names |
| test_check_options.py | Removes obsolete test cases and updates type definitions |
| init.py | Updates logger property names and error handling |
| log.py | Renames properties for consistency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📌 Description
Simply how metadata is stored internally. Improves type safety although/by removing lots of explicit casts.
Due to improved analysability by pyright, some tests were no longer required.
The key here was to extend
ScoreNeedTypewith our mandatory/optional options/links. We already had the type! We just need to use it.🚨 Impact Analysis
✅ Checklist