From 5da374b71364dd2367b9914b93af90e3177e656a Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 28 Jun 2023 22:29:46 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(schemas.py):=20add=20BuildStat?= =?UTF-8?q?us=20enum=20to=20represent=20the=20status=20of=20a=20build=20Th?= =?UTF-8?q?e=20BuildStatus=20enum=20is=20added=20to=20represent=20the=20di?= =?UTF-8?q?fferent=20statuses=20that=20a=20build=20can=20have:=20SUCCESS,?= =?UTF-8?q?=20FAILURE,=20and=20IN=5FPROGRESS.=20This=20enum=20will=20be=20?= =?UTF-8?q?used=20to=20provide=20a=20more=20structured=20and=20consistent?= =?UTF-8?q?=20way=20of=20handling=20build=20statuses=20in=20the=20applicat?= =?UTF-8?q?ion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/schemas.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/backend/langflow/api/v1/schemas.py b/src/backend/langflow/api/v1/schemas.py index ed5bf8b3b..2cf62a504 100644 --- a/src/backend/langflow/api/v1/schemas.py +++ b/src/backend/langflow/api/v1/schemas.py @@ -1,3 +1,4 @@ +from enum import Enum from pathlib import Path from typing import Any, Dict, List, Optional, Union from langflow.database.models.flow import FlowCreate, FlowRead @@ -5,6 +6,14 @@ from pydantic import BaseModel, Field, validator import json +class BuildStatus(Enum): + """Status of the build.""" + + SUCCESS = "success" + FAILURE = "failure" + IN_PROGRESS = "in_progress" + + class GraphData(BaseModel): """Data inside the exported flow."""