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 Python's Protocol feature and rodi's container interoperability patterns to create a plugin system. The focus is on proper protocol definition, duck typing validation, and ensuring the implementation works with any container that follows the protocol interface.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Protocol Definition",
"description": "Defines a ContainerProtocol using typing.Protocol with the three required methods: register(), resolve(), and __contains__(). The protocol should use proper type hints and be marked as a Protocol class.",
"max_score": 25
},
{
"name": "Protocol Validation",
"description": "ContainerWrapper validates that the provided container implements the protocol methods (register, resolve, __contains__) before accepting it. This can be done using hasattr checks or similar validation.",
"max_score": 20
},
{
"name": "Container Abstraction",
"description": "ContainerWrapper properly delegates to the underlying container's protocol methods without depending on any specific container implementation. The wrapper should work with any object that implements the protocol.",
"max_score": 20
},
{
"name": "rodi Integration",
"description": "Successfully uses rodi.Container as one implementation of the protocol. Demonstrates that rodi's Container class works with the protocol through its register(), resolve(), and __contains__() methods.",
"max_score": 15
},
{
"name": "Alternative Implementation",
"description": "Creates or uses a custom container implementation (not rodi) that also follows the ContainerProtocol, demonstrating true interoperability. The custom container should implement all three protocol methods.",
"max_score": 10
},
{
"name": "Plugin Registration",
"description": "Plugin's register_services method only uses the protocol methods (register, resolve, __contains__) to interact with the container, ensuring plugins are container-agnostic.",
"max_score": 10
}
]
}