Pipelinen parannuksia building blockeilla
This commit is contained in:
85
zipit/projekti_clean/crew.py
Normal file
85
zipit/projekti_clean/crew.py
Normal file
@@ -0,0 +1,85 @@
|
||||
"""Todo-sovellus FastAPI + SQLite, CRUD-endpointit ja testit
|
||||
|
||||
CrewAI crew — generated by Kipinä Agentic Studio.
|
||||
Run: crewai run
|
||||
"""
|
||||
|
||||
from crewai import Agent, Crew, Process, Task
|
||||
from crewai.project import CrewBase, agent, crew, task
|
||||
|
||||
|
||||
@CrewBase
|
||||
class ProjectCrew:
|
||||
"""Todo-sovellus FastAPI + SQLite, CRUD-endpointit ja testit"""
|
||||
|
||||
agents_config = "agents.yaml"
|
||||
tasks_config = "tasks.yaml"
|
||||
|
||||
@agent
|
||||
def client(self) -> Agent:
|
||||
return Agent(config=self.agents_config["client"])
|
||||
|
||||
@agent
|
||||
def data(self) -> Agent:
|
||||
return Agent(config=self.agents_config["data"])
|
||||
|
||||
@agent
|
||||
def coder(self) -> Agent:
|
||||
return Agent(config=self.agents_config["coder"])
|
||||
|
||||
@agent
|
||||
def qa(self) -> Agent:
|
||||
return Agent(config=self.agents_config["qa"])
|
||||
|
||||
@agent
|
||||
def tester(self) -> Agent:
|
||||
return Agent(config=self.agents_config["tester"])
|
||||
|
||||
@agent
|
||||
def observer(self) -> Agent:
|
||||
return Agent(config=self.agents_config["observer"])
|
||||
|
||||
@task
|
||||
def step_0_requirements(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_0_requirements"])
|
||||
|
||||
@task
|
||||
def step_1_models_py(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_1_models_py"])
|
||||
|
||||
@task
|
||||
def step_2_schemas_py(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_2_schemas_py"])
|
||||
|
||||
@task
|
||||
def step_3_main_py(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_3_main_py"])
|
||||
|
||||
@task
|
||||
def step_4_pyproject_toml(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_4_pyproject_toml"])
|
||||
|
||||
@task
|
||||
def step_5_review(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_5_review"])
|
||||
|
||||
@task
|
||||
def step_6_test_main_py(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_6_test_main_py"])
|
||||
|
||||
@task
|
||||
def step_7_dockerfile(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_7_dockerfile"])
|
||||
|
||||
@task
|
||||
def step_8_readme_md(self) -> Task:
|
||||
return Task(config=self.tasks_config["step_8_readme_md"])
|
||||
|
||||
@crew
|
||||
def crew(self) -> Crew:
|
||||
return Crew(
|
||||
agents=self.agents,
|
||||
tasks=self.tasks,
|
||||
process=Process.sequential,
|
||||
verbose=True,
|
||||
)
|
||||
Reference in New Issue
Block a user