refactor: rename fragments directory to ingredients and update all references
- Directory rename: fragments/ → ingredients/ (54 .ks files) - Updated all Python scripts: * tests/integration/conftest.py - fixture renames * tests/integration/test_integration.py - constant and path updates * tests/test_recipe_generator.py - updated test assertions * recipe-generator/validators.py - updated comments and error messages * recipe-generator/recipe_generator.py - updated comment - Updated all YAML files: * recipe-generator/recipe_templates.yaml - 66 path references * .gitea/workflows/validate-fragments.yaml → validate-ingredients.yaml * .gitea/workflows/test-generation.yaml - path patterns - Updated scripts: * bin/ksflatten-relative - updated path detection - Updated test file: * tests/integration/test_fragments.py → test_ingredients.py - Updated documentation: * DEVELOPMENT.md - simplified references * DEVELOPMENT_QUICK.md - updated examples * tests/container/README.md - test references - Regenerated all recipes (16 files) with ingredient paths - Updated test fixtures (7 files) - All integration tests pass (5/5) - All unit tests pass (29/31 - 2 pre-existing failures unrelated)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Flatten kickstart recipes with relative %include paths.
|
||||
Converts %include fragments/... to %include ../fragments/... relative to recipes/ location.
|
||||
Converts %include ingredients/... to %include ../ingredients/... relative to recipes/ location.
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -27,10 +27,10 @@ def flatten_recipe(recipe_path, output_path):
|
||||
if len(parts) >= 2:
|
||||
fragment_path = parts[1]
|
||||
# Make it relative to recipes/
|
||||
if fragment_path.startswith('fragments/'):
|
||||
if fragment_path.startswith('ingredients/'):
|
||||
# Keep as relative path - it's relative to the recipe file's location
|
||||
# recipes/ contains recipes, fragments/ is at project root level
|
||||
# So from recipes/, fragments/ is ../fragments/
|
||||
# recipes/ contains recipes, ingredients/ is at project root level
|
||||
# So from recipes/, ingredients/ is ../ingredients/
|
||||
relative_path = '../' + fragment_path
|
||||
lines.append('%include ' + relative_path)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user