Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use template summary in project details when templates are used #1071

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/prompts/partials/project_details.prompt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ Here are the technologies that should be used for this project:
* {{ tech.name }} - {{ tech.description }}
{% endfor %}
{% endif %}
{% if state.specification.template_summary %}

{{ state.specification.template_summary }}
{% endif %}
7 changes: 3 additions & 4 deletions core/templates/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from .javascript_react import JavascriptReactProjectTemplate
from .node_express_mongoose import NodeExpressMongooseProjectTemplate

# from .react_express import ReactExpressProjectTemplate
from .react_express import ReactExpressProjectTemplate

log = get_logger(__name__)

Expand All @@ -15,11 +14,11 @@ class ProjectTemplateEnum(str, Enum):

JAVASCRIPT_REACT = JavascriptReactProjectTemplate.name
NODE_EXPRESS_MONGOOSE = NodeExpressMongooseProjectTemplate.name
# REACT_EXPRESS = ReactExpressProjectTemplate.name
REACT_EXPRESS = ReactExpressProjectTemplate.name


PROJECT_TEMPLATES = {
JavascriptReactProjectTemplate.name: JavascriptReactProjectTemplate,
NodeExpressMongooseProjectTemplate.name: NodeExpressMongooseProjectTemplate,
# ReactExpressProjectTemplate.name: ReactExpressProjectTemplate,
ReactExpressProjectTemplate.name: ReactExpressProjectTemplate,
}
3 changes: 0 additions & 3 deletions tests/templates/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from core.templates.registry import PROJECT_TEMPLATES


@pytest.mark.skip
@pytest.mark.asyncio
@patch("core.state.state_manager.get_config")
async def test_render_react_express_sql(mock_get_config, testmanager):
Expand All @@ -31,7 +30,6 @@ async def test_render_react_express_sql(mock_get_config, testmanager):
assert "api/models/user.js" not in files


@pytest.mark.skip
@pytest.mark.asyncio
@patch("core.state.state_manager.get_config")
async def test_render_react_express_nosql(mock_get_config, testmanager):
Expand All @@ -57,7 +55,6 @@ 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):
Expand Down
Loading