From ca620c9742b2dca4ff84bdee74b2eaf09cf047ec Mon Sep 17 00:00:00 2001 From: LeonOstrez Date: Wed, 24 Jul 2024 18:05:34 +0200 Subject: [PATCH] remove JavascriptReactProjectTemplate --- core/templates/registry.py | 5 ++--- tests/agents/test_architect.py | 4 ++-- tests/agents/test_tech_lead.py | 2 +- tests/templates/test_templates.py | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/templates/registry.py b/core/templates/registry.py index 1e8f432f5b..f52f89b894 100644 --- a/core/templates/registry.py +++ b/core/templates/registry.py @@ -2,7 +2,6 @@ from enum import Enum from core.log import get_logger -from .javascript_react import JavascriptReactProjectTemplate from .node_express_mongoose import NodeExpressMongooseProjectTemplate from .react_express import ReactExpressProjectTemplate @@ -12,13 +11,13 @@ log = get_logger(__name__) class ProjectTemplateEnum(str, Enum): """Choices of available project templates.""" - JAVASCRIPT_REACT = JavascriptReactProjectTemplate.name + # JAVASCRIPT_REACT = JavascriptReactProjectTemplate.name NODE_EXPRESS_MONGOOSE = NodeExpressMongooseProjectTemplate.name REACT_EXPRESS = ReactExpressProjectTemplate.name PROJECT_TEMPLATES = { - JavascriptReactProjectTemplate.name: JavascriptReactProjectTemplate, + # JavascriptReactProjectTemplate.name: JavascriptReactProjectTemplate, NodeExpressMongooseProjectTemplate.name: NodeExpressMongooseProjectTemplate, ReactExpressProjectTemplate.name: ReactExpressProjectTemplate, } diff --git a/tests/agents/test_architect.py b/tests/agents/test_architect.py index 10d6730ec3..96ba3a2ef8 100644 --- a/tests/agents/test_architect.py +++ b/tests/agents/test_architect.py @@ -19,7 +19,7 @@ async def test_run(agentcontext): side_effect=[ TemplateSelection( architecture="dummy arch", - template="javascript_react", + template="node_express_mongoose", ), Architecture( system_dependencies=[ @@ -52,4 +52,4 @@ async def test_run(agentcontext): assert sm.current_state.specification.architecture == "dummy arch" assert sm.current_state.specification.system_dependencies[0]["name"] == "docker" assert sm.current_state.specification.package_dependencies[0]["name"] == "express" - assert "javascript_react" in sm.current_state.specification.templates + assert "node_express_mongoose" in sm.current_state.specification.templates diff --git a/tests/agents/test_tech_lead.py b/tests/agents/test_tech_lead.py index 41343c0445..892a9979ae 100644 --- a/tests/agents/test_tech_lead.py +++ b/tests/agents/test_tech_lead.py @@ -31,7 +31,7 @@ async def test_create_initial_epic(agentcontext): async def test_apply_project_template(agentcontext): sm, _, ui, _ = agentcontext - sm.current_state.specification.templates = {"javascript_react": {}} + sm.current_state.specification.templates = {"node_express_mongoose": {}} sm.current_state.epics = [{"name": "Initial Project"}] await sm.commit() diff --git a/tests/templates/test_templates.py b/tests/templates/test_templates.py index 42efa5cf28..25d61741ac 100644 --- a/tests/templates/test_templates.py +++ b/tests/templates/test_templates.py @@ -55,6 +55,7 @@ async def test_render_react_express_nosql(mock_get_config, testmanager): assert "prisma/schema.prisma" not in files +@pytest.mark.skip @pytest.mark.asyncio @patch("core.state.state_manager.get_config") async def test_render_javascript_react(mock_get_config, testmanager):