added error recognition in spreadsheet
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import re
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Optional, List, Dict
|
||||
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
from typing_extensions import Annotated
|
||||
|
||||
@ -267,4 +268,17 @@ class SpreadsheetModel(BaseModel):
|
||||
username: str
|
||||
puck_number: int
|
||||
prefix: Optional[str]
|
||||
folder: Optional[str]
|
||||
folder: Optional[str]
|
||||
|
||||
class SpreadsheetResponse(BaseModel):
|
||||
data: List[SpreadsheetModel] # Validated data rows as SpreadsheetModel instances
|
||||
errors: List[Dict[str, Any]] # Errors encountered during validation
|
||||
raw_data: List[Dict[str, Any]] # Raw data extracted from the spreadsheet
|
||||
dewars_count: int
|
||||
dewars: List[str]
|
||||
pucks_count: int
|
||||
pucks: List[str]
|
||||
samples_count: int
|
||||
samples: List[str]
|
||||
|
||||
__all__ = ['SpreadsheetModel', 'SpreadsheetResponse']
|
||||
|
Reference in New Issue
Block a user