refactor: functional separation with deploy/, recipe-generator/, and bin/
- deploy/: deployment bash scripts (4 files) - recipe-generator/: recipe generation tool (Python + YAML configs) - bin/: executable wrappers (single generate-recipe entry point) - Updated deploy.sh, README.md, DEVELOPMENT.md, DEVELOPMENT_QUICK.md - Updated tests/test_recipe_generator.py and tests/integration/test_integration.py - Updated CI workflow and Makefile paths - All 41 tests pass
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,7 +11,7 @@ import os
|
||||
|
||||
# Use actual project root
|
||||
PROJECT_ROOT = Path('/home/lukas/Code/virt/phyllomeos')
|
||||
SCRIPTS_DIR = PROJECT_ROOT / 'scripts'
|
||||
RECIPE_GENERATOR_DIR = PROJECT_ROOT / 'recipe-generator'
|
||||
RECIPE_DIR = PROJECT_ROOT / 'recipes'
|
||||
FRAGMENTS_DIR = PROJECT_ROOT / 'fragments'
|
||||
CONTAINER_DIR = PROJECT_ROOT / 'tests' / 'container'
|
||||
@@ -19,8 +19,8 @@ CONTAINER_DIR = PROJECT_ROOT / 'tests' / 'container'
|
||||
|
||||
def test_generate_recipes_from_manifest():
|
||||
"""Test generating all recipes from manifest."""
|
||||
os.chdir(SCRIPTS_DIR)
|
||||
|
||||
os.chdir(RECIPE_GENERATOR_DIR)
|
||||
|
||||
result = subprocess.run(
|
||||
['python3', 'generate_recipe.py',
|
||||
'--manifest', 'recipes_manifest.yaml',
|
||||
@@ -28,7 +28,7 @@ def test_generate_recipes_from_manifest():
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
|
||||
|
||||
assert result.returncode == 0, f"Recipe generation failed: {result.stderr}"
|
||||
assert 'Generating:' in result.stdout
|
||||
|
||||
@@ -51,7 +51,7 @@ def test_make_targets():
|
||||
# Test generate-recipes
|
||||
result = subprocess.run(
|
||||
['make', 'generate-recipes'],
|
||||
cwd=SCRIPTS_DIR,
|
||||
cwd=RECIPE_GENERATOR_DIR,
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add scripts directory to path
|
||||
SCRIPTS_DIR = Path(__file__).parent.parent / 'scripts'
|
||||
sys.path.insert(0, str(SCRIPTS_DIR))
|
||||
RECIPE_GENERATOR_DIR = Path(__file__).parent.parent / 'recipe-generator'
|
||||
sys.path.insert(0, str(RECIPE_GENERATOR_DIR))
|
||||
|
||||
from generate_recipe import RecipeGenerator
|
||||
|
||||
@@ -19,7 +17,11 @@ class TestRecipeGenerator:
|
||||
|
||||
def setup_method(self):
|
||||
"""Set up test fixtures."""
|
||||
self.generator = RecipeGenerator(Path('ingredients'), Path('recipe_templates.yaml'))
|
||||
project_root = Path(__file__).parent.parent
|
||||
self.generator = RecipeGenerator(
|
||||
project_root / 'ingredients',
|
||||
project_root / 'recipe-generator' / 'recipe_templates.yaml'
|
||||
)
|
||||
|
||||
def test_template_loading(self):
|
||||
"""Test that templates are loaded correctly."""
|
||||
|
||||
Reference in New Issue
Block a user