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:
Lukas Greve
2026-03-26 20:27:56 +01:00
parent 3eb4c75392
commit 31955a8983
135 changed files with 670 additions and 1319 deletions
+6 -6
View File
@@ -27,9 +27,9 @@ def project_root():
@pytest.fixture
def fragments_dir(project_root):
"""Return fragments directory."""
return project_root / 'fragments'
def ingredients_dir(project_root):
"""Return ingredients directory."""
return project_root / 'ingredients'
@pytest.fixture
@@ -39,9 +39,9 @@ def recipes_dir(project_root):
@pytest.fixture
def fragments(fragments_dir):
"""List all .ks fragment files."""
return list(fragments_dir.glob('**/*.ks'))
def ingredients(ingredients_dir):
"""List all .ks ingredient files."""
return list(ingredients_dir.glob('**/*.ks'))
@pytest.fixture
+14 -14
View File
@@ -13,7 +13,7 @@ import os
PROJECT_ROOT = Path('/home/lukas/Code/virt/phyllomeos')
RECIPE_GENERATOR_DIR = PROJECT_ROOT / 'recipe-generator'
RECIPE_DIR = PROJECT_ROOT / 'recipes'
FRAGMENTS_DIR = PROJECT_ROOT / 'fragments'
INGREDIENTS_DIR = PROJECT_ROOT / 'ingredients'
CONTAINER_DIR = PROJECT_ROOT / 'tests' / 'container'
@@ -73,25 +73,25 @@ def test_container_build():
pytest.fail(f"Container build failed: {result.stderr}")
def test_fragments_structure():
"""Verify fragment directory structure."""
def test_ingredients_structure():
"""Verify ingredient directory structure."""
# Check core directories
assert (FRAGMENTS_DIR / 'core' / 'security').exists()
assert (INGREDIENTS_DIR / 'core' / 'security').exists()
# Check desktop directories
assert (FRAGMENTS_DIR / 'desktop' / 'gnome').exists()
assert (FRAGMENTS_DIR / 'desktop' / 'labwc').exists()
assert (INGREDIENTS_DIR / 'desktop' / 'gnome').exists()
assert (INGREDIENTS_DIR / 'desktop' / 'labwc').exists()
# vmm is now in virtual-machine-manager directory (under packages)
# assert (FRAGMENTS_DIR / 'desktop' / 'vmm').exists()
# assert (INGREDIENTS_DIR / 'desktop' / 'vmm').exists()
# Check hypervisor directories
assert (FRAGMENTS_DIR / 'hypervisor' / 'base').exists()
assert (FRAGMENTS_DIR / 'hypervisor' / 'base').exists()
assert (INGREDIENTS_DIR / 'hypervisor' / 'base').exists()
assert (INGREDIENTS_DIR / 'hypervisor' / 'base').exists()
# Check live directories
assert (FRAGMENTS_DIR / 'live' / 'core' / 'bootloader').exists()
assert (FRAGMENTS_DIR / 'live' / 'post').exists()
assert (INGREDIENTS_DIR / 'live' / 'core' / 'bootloader').exists()
assert (INGREDIENTS_DIR / 'live' / 'post').exists()
# Count fragments
fragment_count = len(list(FRAGMENTS_DIR.glob('**/*.ks')))
assert fragment_count >= 45, f"Expected at least 45 fragments, found {fragment_count}"
# Count ingredients
ingredient_count = len(list(INGREDIENTS_DIR.glob('**/*.ks')))
assert ingredient_count >= 45, f"Expected at least 45 ingredients, found {ingredient_count}"