feat(template-generator): add TOML template generation function and our first example - #54
Merged
Merged
Conversation
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
…ator Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
Signed-off-by: Arseni10Lk <arseniy230606@gmail.com>
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
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.
Description of Changes:
Closes #21
This PR implements the backend vehicle template generator and assembly subsystem for the YAADO CLI (
Terminal/Assembly/), resolves the "default parameters" dilemma via schema-embedded examples, and adds realistic reference configurations based on flight-proven hardware (AGM-84 Harpoon).1. Vehicle Assembly & Template Generator (
Terminal/Assembly/)VehicleTemplateGeneratorClass (Terminal/Assembly/template_generator.py):generate_template(name, component_classes, pre_filled=False): Generates and writes vehicle TOML configs directly intoHangar/<name>/<name>.toml.pre_filled=True): Dynamically inspects Pydantic schemas and instantiates components using embeddedfield_info.examples. Yields an immediately runnable, physically consistent baseline configuration for interactive studies and demos.pre_filled=False): Uses Pydantic'smodel_construct()to scaffold a blank template structure without tripping validation errors, allowing users to manually fill in parameters.assemble_vehicle(name, components): Type-checks and routes instantiated components into their appropriate subsystem dictionaries (aero_surfaces,bodies,propulsion, ormass_properties) onBaseVehicleConfig.prefill_component_values(component_class): Dynamically reflects on component schema fields to populate instances from examples.Terminal/Assembly/README.md):2. ComponentStore Examples & Class Tuples (
YAADO_Core/ComponentStore/)Injected real-world specifications as
examples=[...]intoField()definitions across all components3. Hangar & Git Tracking (
.gitignore,Hangar/examples/).gitignoreto allow committing reference configurations inHangar/examples/while creating ignore rules for private user configurations inHangar/*.Hangar/examples/AGM-84_HARPOON/AGM-84_HARPOON.toml.Remaining Tasks:
examplesfor each fieldVerification method:
What did you do to verify that everything works as expected?
Generated two examples