Skip to content
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

Improved SimpleTestCircuit #33

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Improved SimpleTestCircuit #33

merged 2 commits into from
Jan 9, 2025

Conversation

tilk
Copy link
Member

@tilk tilk commented Dec 19, 2024

This PR changes SimpleTestCircuit so that Adapters and TestbenchIOs can be automatically constructed for required methods. Type annotations is used to distinguish required methods from provided ones. Based on #30.

@tilk tilk added the enhancement New feature or request label Dec 19, 2024
Base automatically changed from tilk/redesign to master January 3, 2025 16:52
@tilk tilk force-pushed the tilk/improved-simpletestcircuit branch from f64b22f to 27e4480 Compare January 8, 2025 13:02
@tilk tilk marked this pull request as ready for review January 8, 2025 13:09
@piotro888
Copy link
Member

Great!
Should we now shift from accepting external Methods in __init__ to using Required + connectors everywhere?

@piotro888
Copy link
Member

related issue: #12

@tilk
Copy link
Member Author

tilk commented Jan 9, 2025

Great! Should we now shift from accepting external Methods in __init__ to using Required + connectors everywhere?

I don't see how connectors fit into this, could you elaborate? My original intention was to use proxy to satisfy dependencies, like this:

c1 = ProvidesSomething()
c2 = RequiresSomething()
c2.required.proxy(c1.provided)

(If this use case becomes standard, then proxy is a weird name and renaming is probably in order.)

I don't know if it is worth it to do a massive refactor now (but maybe it is?). There are also places where having method arguments seems useful (method transformers?). For now, let's try to use this and see where it takes us.

@tilk tilk merged commit bc15c17 into master Jan 9, 2025
3 checks passed
@tilk tilk deleted the tilk/improved-simpletestcircuit branch January 9, 2025 10:01
github-actions bot pushed a commit that referenced this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants