-
Notifications
You must be signed in to change notification settings - Fork 69
Refactor/s2dm exporter #475
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
Draft
jdacoello
wants to merge
17
commits into
COVESA:master
Choose a base branch
from
jdacoello:refactor/s2dm-exporter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… enums - Implement nested domain structure with underscore prefix for root types - Root types use _ prefix (e.g., _Vehicle.graphql) to sort first in folders - Child types use immediate names only (e.g., Seat.graphql instead of Vehicle_Cabin_Seat.graphql) - Folder hierarchy provides full context - Embed allowed value enums in type files - Enums generated from 'allowed' values are placed at bottom of type files - Removes separate enum files for better maintainability - Applies to both flat and nested structures - Update documentation - Document all three output modes: single file, modular flat, modular nested - Add clear guidance on when to use each mode - Include visual directory structure examples - Explain underscore prefix convention and enum embedding All tests pass successfully. Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
…pport - Updated get_metadata_df() to accept extended_attributes tuple parameter - Made 'instantiate' a standard column for leaves (always included) - Extended attributes now only included when explicitly requested via -e CLI flags - Added debug logging to show DataFrame structure and found extended attributes - Respects CLI flags: -e/--extended-attributes for whitelisting custom attributes This change improves performance by making extended attributes available directly in DataFrame columns, enabling O(1) access instead of O(n) tree traversals. Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
- Added missing KeyValue input type definition - Simplified directive signature with element, fqn, and metadata fields - Updated VspecElement enum with clearer descriptions - Fixes schema loading failures caused by undefined KeyValue type Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
- Move non-instantiated properties to parent type
- Naming: {branchName}{PropertyName} (e.g., Door.Kind -> doorKind)
- Optimize with DataFrame column access vs tree lookups
- Pass extended_attributes through schema generation
- Add test_non_instantiated_property_hoisting with fixtures
Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
S2DM exporter only needs -e/--extended-attributes for explicit whitelisting. The --extend-all-attributes flag is not needed for this exporter. Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
Consolidate vspec directive format and fix enum references: - Add QUANTITY_KIND and UNIT to VspecElement enum for unit annotations - Update unit enum directives to new format: - Remove obsolete template definitions (vspec_fqn, vspec_unit, etc.) - Replace all VspecType references with VspecElement throughout codebase - Update modular_export_utils.py enum filtering to use VspecElement - Fix test for hoisted field naming (someSignal instead of doorSomeSignal) All 13 S2DM tests passing. Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
… support Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
…GraphQL because the outer quotes must be double. Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
…en modular output mode is selected Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
… construct Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
…truction Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
- Added `metadata_tracker.py` for initializing and managing VSS metadata. - Created `reference_generator.py` to handle VSS reference file generation alongside GraphQL schema output. - Developed `schema_generator.py` for orchestrating the complete S2DM GraphQL schema generation process. - Introduced `type_builders.py` for constructing GraphQL types from VSS elements, including unit enums, instance types, and struct types. - Updated tests to reflect changes in module imports and ensure functionality of new features. Signed-off-by: Daniel Alvarez-Coello <8550265+jdacoello@users.noreply.github.com>
5ae1f3a to
6e5ca43
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does some rework that enhances the way vspec is exported to fit the s2dm modeling approach based on GraphQL SDL. It includes aspects like: