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

Separate simulator creation from hardware creation #850

Open
wtgee opened this issue Jun 22, 2019 · 1 comment
Open

Separate simulator creation from hardware creation #850

wtgee opened this issue Jun 22, 2019 · 1 comment
Labels
config Items related to configuration or the config file. Hardware
Milestone

Comments

@wtgee
Copy link
Member

wtgee commented Jun 22, 2019

The various create_<hardware>_from_config scripts are currently also capable of creating a "simulator" version of the hardware. To me that seems non-logical as creating from config should necessarily be creating real hardware.

Describe the solution you'd like
I would propose we remove all simulator creation from these convenience functions and handle simulator creation separately. This could look like a create_from_config (one name for each type of hardware, specified as a class method on the base class) and create_simulator.

Additional context
I think this would help with testing, both for software testing as well as real hardware testing.

Related Issues/PRs
#848 #636 #849 #478 #29 #842 #843 probably more.

Thoughts? @jamessynge @ImmortalRabbit @AnthonyHorton

@wtgee wtgee changed the title Separate simulator creation from regular creation Separate simulator creation from hardware creation Jun 22, 2019
This was referenced Jun 23, 2019
@jamessynge
Copy link
Contributor

I'm concerned about this proposal because I don't want the production code to have branches such as "if should use simulator". I'm wondering if we can't have a third method: create__driver, which is used by the production code, and is responsible for deciding if we're using a hardware driver simulator or a real driver (possibly with simulated hardware).

I discussed the above with @ImmortalRabbit this morning, and noted that this would mean we'd have a repeated pattern for each type of hardware. This lead me to wonder about some common approach to this, such as an application of the Registry pattern. Thoughts?

@wtgee wtgee added the config Items related to configuration or the config file. label Feb 16, 2020
@wtgee wtgee added this to the V1.0 milestone Feb 17, 2020
@wtgee wtgee added the Hardware label Feb 17, 2020
@wtgee wtgee modified the milestones: V1.0, v0.9.0 Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Items related to configuration or the config file. Hardware
Projects
None yet
Development

No branches or pull requests

2 participants