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

Clear probes #303

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Clear probes #303

merged 1 commit into from
Nov 30, 2021

Conversation

hunse
Copy link
Collaborator

@hunse hunse commented Nov 20, 2020

Add Simulator.clear_probes.

@hunse
Copy link
Collaborator 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
Collaborator 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.

2 participants