-
Notifications
You must be signed in to change notification settings - Fork 5
RPC Rework: Part 3: Define Spec and Spec tooling #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…lueprint to be consistent with docs
…o jeff/blueprint/3
Greptile OverviewGreptile SummaryThis PR introduces new Spec tooling and performs a comprehensive rename of the blueprint API. The changes establish a foundation for Module-Spec Protocol validation while cleaning up the naming conventions. Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Module
participant Blueprint
participant _BlueprintAtom
participant autoconnect
participant Spec
participant SpecUtils
Note over User,SpecUtils: Part 3: Define Spec and Spec tooling
User->>Module: Call Module.blueprint()
Module->>Blueprint: Blueprint.create(Module, args, kwargs)
Blueprint->>_BlueprintAtom: _BlueprintAtom.create(Module, args, kwargs)
_BlueprintAtom->>_BlueprintAtom: Extract In/Out connections from annotations
_BlueprintAtom-->>Blueprint: Return _BlueprintAtom instance
Blueprint-->>User: Return Blueprint with single blueprint atom
User->>autoconnect: autoconnect(blueprint1, blueprint2, ...)
autoconnect->>autoconnect: Merge blueprints, transports, configs
autoconnect-->>User: Return combined Blueprint
Note over Spec,SpecUtils: New Spec Protocol utilities
User->>Spec: Define Protocol inheriting from Spec
User->>SpecUtils: is_spec(MyProtocol)
SpecUtils-->>User: Returns True if inherits from Spec
User->>SpecUtils: spec_structural_compliance(obj, MySpec)
SpecUtils->>SpecUtils: Check if obj has required methods (ignore types)
SpecUtils-->>User: Return compliance result
User->>SpecUtils: spec_annotation_compliance(obj, MySpec)
SpecUtils->>SpecUtils: Build strict AnnotationProtocol
SpecUtils->>SpecUtils: Check obj against strict protocol
SpecUtils-->>User: Return annotation compliance result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| def foo(self) -> int: ... | ||
|
|
||
| assert False == spec_annotation_compliance(StructurallyCompliant1(), MySpec) | ||
| assert True == spec_structural_compliance(FullyCompliant(), MySpec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring example uses wrong function name - should be spec_annotation_compliance not spec_structural_compliance
| assert True == spec_structural_compliance(FullyCompliant(), MySpec) | |
| assert True == spec_annotation_compliance(FullyCompliant(), MySpec) |
No description provided.