Add recipe generator for automation and DRY recipes
- create generate_recipe.py: CLI tool for generating recipes from templates - add recipe_templates.yaml: 5 base templates (virtual-desktop, virtual-server, desktop-hypervisor, live-desktop, live-server) - add recipes_manifest.yaml: 16 recipe variants defined declaratively - add Makefile: automation targets for generate, validate, test - add requirements.txt: PyYAML dependency - add tests/test_recipe_generator.py: 25 pytest tests This enables: - Template-based recipe generation with minimal duplication - One-line variant addition via YAML manifest editing - Automatic duplicate include prevention - Ingredient path validation Generated recipes are committed for reproducibility as per project conventions.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
.PHONY: help generate-recipes validate-recipes test clean install-deps
|
||||
|
||||
help:
|
||||
@echo "Phyllome OS Recipe Generator"
|
||||
@echo ""
|
||||
@echo "Available targets:"
|
||||
@echo " generate-recipes - Generate all recipes from manifest"
|
||||
@echo " validate-recipes - Validate existing recipes"
|
||||
@echo " test - Run pytest test suite"
|
||||
@echo " clean - Remove generated recipes"
|
||||
@echo " install-deps - Install Python dependencies"
|
||||
|
||||
install-deps:
|
||||
pip install -r requirements.txt
|
||||
|
||||
generate-recipes:
|
||||
python generate_recipe.py \
|
||||
--manifest recipes_manifest.yaml \
|
||||
--output-dir ../recipes/
|
||||
|
||||
validate-recipes:
|
||||
python generate_recipe.py \
|
||||
--validate ../recipes/*.cfg
|
||||
|
||||
test:
|
||||
pytest ../tests/test_recipe_generator.py -v
|
||||
|
||||
clean:
|
||||
rm -f ../recipes/*.cfg
|
||||
@echo "Generated recipes removed. Edit recipes_manifest.yaml and run 'make generate-recipes' to regenerate."
|
||||
Reference in New Issue
Block a user