A package for easily working with US and state metadata
Overall
score
88%
{
"context": "This evaluation assesses how effectively the engineer uses the python-us package's direct state attribute access capability to build a state border validation utility. The focus is on utilizing the package's state objects accessed through direct attribute notation (e.g., us.states.MD) rather than implementing everything from scratch.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Direct state access",
"description": "Uses direct attribute access to retrieve state objects (e.g., us.states.MD, us.states.VA, us.states.CA) rather than manually creating state data or using only strings",
"max_score": 30
},
{
"name": "State validation",
"description": "Validates state abbreviations using the python-us package by attempting to access state attributes and handling cases where states don't exist (e.g., checking if hasattr(us.states, abbr) or using try-except with AttributeError)",
"max_score": 20
},
{
"name": "STATES collection usage",
"description": "Uses us.states.STATES or similar package-provided collections to iterate over valid states when building the border mapping, rather than hardcoding a list of all 50 state abbreviations",
"max_score": 20
},
{
"name": "State abbreviation access",
"description": "Accesses state abbreviations using the .abbr attribute from state objects retrieved from the package (e.g., state.abbr) when building or working with the border mapping",
"max_score": 15
},
{
"name": "Case normalization",
"description": "Handles case-insensitive input by normalizing abbreviations (e.g., using .upper()) before accessing state attributes like us.states.MD",
"max_score": 10
},
{
"name": "Border mapping structure",
"description": "Creates an appropriate data structure (dictionary, set, or similar) that maps state abbreviations to their bordering states to enable the shares_border function",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-usdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10