Skip to content

Conversation

@hunse
Copy link
Contributor

@hunse hunse commented Nov 20, 2020

Add Simulator.clear_probes.

@hunse hunse force-pushed the clear-probes branch 3 times, most recently from 29240e9 to 32e4114 Compare November 23, 2021 14:56
@hunse
Copy link
Contributor Author

hunse commented Nov 23, 2021

Now fixes #271 as well. This is tested in test_probe.py::test_probe_filter_twice. I had to remove the test in emulator/test_interface.py since I changed get_probe_output to collect_probe_output, and it no longer supports being called more than once in a row (it will return an empty list the second time since there's no new data).

Copy link
Member

@tbekolay tbekolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I made some minor changes in a squash commit, check out the commit message for details. I'll merge when @hunse and CI give the OK.

@hunse
Copy link
Contributor Author

hunse commented Nov 29, 2021

LGTM!

- Add `Simulator.clear_probes`
- Add `ProbeFilter` class to unify probe filtering internally
- The emulator and hardware `Interface.get_probe_output` function
  has been replaced with `collect_probe_output`, which both gets
  and then clears the output. This simplifies things and helps
  to fix bugs such as the one in the test listed below.
- `test_probe_filter_twice` now passes
@tbekolay tbekolay merged commit f646771 into master Nov 30, 2021
@tbekolay tbekolay deleted the clear-probes branch November 30, 2021 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants