Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants
76
{
"context": "Assesses use of aenum's NamedTuple extras to enforce tuple sizing, canonical ordering, alias accessors, and pre-construction review for the telemetry reading task. Focuses purely on package-supplied mechanisms rather than ad-hoc tuple or validation code.",
"type": "weighted_checklist",
"checklist": [
{
"name": "NamedTuple base",
"description": "TelemetryReading subclasses aenum.NamedTuple (not stdlib namedtuple or manual tuple subclass) so package-provided tuple semantics are in effect.",
"max_score": 20
},
{
"name": "TupleSize guard",
"description": "Uses TupleSize.minimum(4) or TupleSize.variable with base 4 to enforce at least four required positions, automatically rejecting constructions with fewer values while allowing optional diagnostics after the core fields.",
"max_score": 25
},
{
"name": "Ordered fields",
"description": "Declares _order_ to canonicalize iteration/unpacking as device_id, state, temp_c, humidity_percent (before any extras), matching the spec's required order regardless of definition order.",
"max_score": 20
},
{
"name": "Alias mapping",
"description": "Defines id as an alias for device_id and status as an alias for state using aenum.NamedTuple aliasing (duplicate index assignments or alias markers) so aliases do not create extra tuple slots.",
"max_score": 15
},
{
"name": "_review_ validation",
"description": "Implements the _review_ hook to enforce allowed state values and humidity bounds, raising ValueError from _review_ before returning an instance when inputs violate those rules.",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-aenumevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10