How cuinixam/yanga works
Main components
a. User Interfaces
• CLI entrypoint (src/yanga/ymain.py & src/yanga/__run.py)
• GUI frontend (src/yanga/gui/ygui.py, src/yanga/commands/gui.py)
b. Command Layer (src/yanga/commands/)
• run, install, gui, base commands
• Dispatchers that interpret user input and invoke domain services
c. Domain/Core Services (src/yanga/domain/)
• Configuration parsing & slurping (config.py, config_slurper.py, project_slurper.py)
• Component analysis (component_analyzer.py, components.py, artifacts.py)
• Execution context (execution_context.py)
d. CMake Backend (src/yanga/cmake/)
• Generator (generator.py), Builder (builder.py), Runner (runner.py), Executable creator (create_executable.py), GTest integration (gtest.py)
• Abstracts CMake & Ninja invocation
e. Kickstart (Project Scaffolding) (src/yanga/kickstart/)
• create.py and templates directory
• Provides “starter” templates for new projects
f. Steps Pipeline (src/yanga/steps/)
• Discrete build steps (e.g., execute_build.py, kconfig_gen.py) used in pypeline
g. External Systems & Tools
• Python runtime & 3rd-party libs
• CMake & Ninja build tools
• pypeline (CI/workflow orchestrator)
• UV (packaging)
Component relationships & data flow
• User → (CLI/GUI) → Commands → Domain services → CMake Backend → External Build Tools
• Commands also invoke Kickstart to scaffold projects
• Domain loads configuration & project metadata; passes to backend
• Steps pipeline (via pypeline) orchestrates tests, docs, packaging
Architectural patterns & design principles
• Layered architecture: UI layer (CLI/GUI), Command layer, Domain layer, Backend layer, External tools
• Separation of concerns: Domain logic isolated from CLI/GUI, backend details hidden behind adapters
• Template method: Kickstart uses template files + create logic
• Pipeline orchestration: pypeline defines sequences of steps
Essential elements
• Component labels matching directory names
• CLI/GUI → Commands → Domain → Backend → External Tools
• Commands → Kickstart → Generated Project
• pypeline → Steps → Commands/Domain/Backend/Test Suite