tessl install tessl/pypi-rodi@2.0.0Implementation of dependency injection for Python 3
Agent Success
Agent success rate when using this tile
92%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.06x
Baseline
Agent success rate without this tile
87%
{
"context": "This criteria evaluates how well the engineer uses the rodi package's factory registration capabilities to configure services with different lifetimes (singleton, scoped, and transient). The focus is on proper use of add_singleton_by_factory, add_scoped_by_factory, and add_transient_by_factory methods.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Container Creation",
"description": "Creates a Container instance from the rodi package to configure services",
"max_score": 10
},
{
"name": "Singleton Factory Registration",
"description": "Uses add_singleton_by_factory() method to register a factory that creates the Logger instance with name 'Application', ensuring the same instance is returned for all resolutions",
"max_score": 25
},
{
"name": "Scoped Factory Registration",
"description": "Uses add_scoped_by_factory() method to register a factory that creates RequestContext instances, ensuring the same instance is returned within a scope but different instances across different scopes",
"max_score": 25
},
{
"name": "Transient Factory Registration",
"description": "Uses add_transient_by_factory() method to register a factory that creates DatabaseService instances with new Logger instances, ensuring a new instance is created for each resolution",
"max_score": 25
},
{
"name": "Factory Return Types",
"description": "Properly specifies the return_type parameter in factory registration methods (e.g., return_type=Logger, return_type=RequestContext, return_type=DatabaseService) to enable type-based resolution",
"max_score": 15
}
]
}