Skip to content

Conversation

@dido18
Copy link
Contributor

@dido18 dido18 commented Nov 25, 2025

Motivation

The CLI has 3 YAML loaders for loading app.yaml, bricks-list.yaml and model-lists.yaml but the API are not uniform.

These are the current APIS for each loader:

  • modelindex.GenerateModelsIndexFromFile(dir *paths.Path) (*ModelsIndex, error)
  • bricksindex.GenerateBricksIndexFromFile(dir *paths.Path) (*BricksIndex, error)
  • app.Load(appPath string) (ArduinoApp, error)

Change description

Change the method to load the file as follows:

  • modelsindex.Load(dir *path.Path)(*ModelsIndex, error)
  • bricksindex.Load(dir *paths.Path) (*BricksIndex, error)
  • app.Load(apppath *paths.Path)(ArduinoApp, error)

Additional Notes

Reviewer checklist

  • PR addresses a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

@dido18 dido18 changed the title use the Load naming for the code that load yamls use consistency of the Load for all the yaml parsers Nov 25, 2025
@dido18 dido18 marked this pull request as ready for review November 26, 2025 10:45
@dido18 dido18 requested a review from a team November 26, 2025 10:48
@dido18 dido18 changed the title use consistency of the Load for all the yaml parsers refact: use the Load function uniformely in all the yaml loaders Nov 26, 2025
@dido18 dido18 force-pushed the add-brick-loader-tests branch from c204f85 to b973c2d Compare November 26, 2025 10:54
@dido18 dido18 merged commit 1861a8f into main Nov 26, 2025
6 checks passed
@dido18 dido18 deleted the add-brick-loader-tests branch November 26, 2025 11:12
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