Data validation using Python type hints
90
{
"context": "This evaluation assesses how well the engineer uses pydantic's version-specific UUID types (UUID1, UUID3, UUID4) to implement validation for an event tracking system. The focus is on correctly using pydantic's UUID type constraints to enforce version-specific validation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "UUID1 usage",
"description": "Uses pydantic's UUID1 type for the session_id field to validate version 1 (time-based) UUIDs",
"max_score": 25
},
{
"name": "UUID3 usage",
"description": "Uses pydantic's UUID3 type for the device_id field to validate version 3 (name-based MD5) UUIDs",
"max_score": 25
},
{
"name": "UUID4 usage",
"description": "Uses pydantic's UUID4 type for the request_id field to validate version 4 (random) UUIDs",
"max_score": 25
},
{
"name": "BaseModel implementation",
"description": "Correctly defines EventRecord as a pydantic BaseModel class with the three UUID fields properly typed",
"max_score": 15
},
{
"name": "Version validation",
"description": "Implementation correctly rejects UUIDs when the wrong version is provided for a field (e.g., UUID4 in session_id field expecting UUID1)",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-pydanticdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10