refactor: simplify init target by removing cache cleanup and adding pre-commit hook (#8590)

* build: add pyyaml dependency

* refactor: simplify init command by removing cache cleaning and langflow run call

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook

* refactor: update langchain_core.prompts import paths to use specific modules

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-06-23 10:46:55 -03:00 committed by GitHub
commit dbaa8a1c6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View file

@ -75,12 +75,11 @@ build_frontend: ## build the frontend static files
@cp -r src/frontend/build/. src/backend/base/langflow/frontend
@echo '==== Frontend build complete ===='
init: check_tools clean_python_cache clean_npm_cache ## initialize the project
init: check_tools ## initialize the project
@make install_backend
@make install_frontend
@make build_frontend
@uvx pre-commit install
@echo "$(GREEN)All requirements are installed.$(NC)"
@uv run langflow run
######################
# CLEAN PROJECT

View file

@ -173,6 +173,7 @@ dev = [
'elevenlabs>=1.52.0; python_version != "3.12"',
"faker>=37.0.0",
"pytest-timeout>=2.3.1",
"pyyaml>=6.0.2",
]
[tool.uv.sources]

View file

@ -12,7 +12,8 @@ from uuid import UUID
from fastapi.encoders import jsonable_encoder
from langchain_core.load import load
from langchain_core.messages import AIMessage, BaseMessage, HumanMessage, SystemMessage
from langchain_core.prompts import BaseChatPromptTemplate, ChatPromptTemplate, PromptTemplate
from langchain_core.prompts.chat import BaseChatPromptTemplate, ChatPromptTemplate
from langchain_core.prompts.prompt import PromptTemplate
from loguru import logger
from pydantic import BaseModel, ConfigDict, Field, ValidationError, field_serializer, field_validator

2
uv.lock generated
View file

@ -4774,6 +4774,7 @@ dev = [
{ name = "pytest-sugar" },
{ name = "pytest-timeout" },
{ name = "pytest-xdist" },
{ name = "pyyaml" },
{ name = "requests" },
{ name = "respx" },
{ name = "ruff" },
@ -4946,6 +4947,7 @@ dev = [
{ name = "pytest-sugar", specifier = ">=1.0.0" },
{ name = "pytest-timeout", specifier = ">=2.3.1" },
{ name = "pytest-xdist", specifier = ">=3.6.0" },
{ name = "pyyaml", specifier = ">=6.0.2" },
{ name = "requests", specifier = ">=2.32.0" },
{ name = "respx", specifier = ">=0.21.1" },
{ name = "ruff", specifier = ">=0.9.7,<0.10" },