kipina-codebench: itsenäinen benchmark-moduli git-submoduliksi
Refaktoroitu tests/-kansiosta omaksi moduliksi: - prompts/ — kaikki promptit erillisinä .md-tiedostoina - golden-examples/ — todo (taso 1) + blog (taso 2) - benchmark.mjs lataa promptit ja esimerkit dynaamisesti - Dockerfile.pytest, report-template.html, package.json, README.md - results/ — tallennetut benchmark-tulokset
This commit is contained in:
22
network-poc/kipina-codebench/golden-examples/todo/schemas.py
Normal file
22
network-poc/kipina-codebench/golden-examples/todo/schemas.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Pydantic v2 -skeemat — Create sisääntulolle, Response vastaukselle."""
|
||||
|
||||
from datetime import date
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class TodoCreate(BaseModel):
|
||||
"""Uuden tehtävän luonti. Pakolliset: title."""
|
||||
|
||||
title: str
|
||||
description: str | None = None
|
||||
due_date: date | None = None
|
||||
priority: int = 1
|
||||
status: str = "pending"
|
||||
|
||||
|
||||
class TodoResponse(TodoCreate):
|
||||
"""Palautettava tehtävä — sisältää id:n."""
|
||||
|
||||
id: int
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user