Skip to content

Implement the NullPatternGenerator #913

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

Closed

Conversation

rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Jun 10, 2025

This PR implements a NullPatternGenerator.

See related PR

The motivation for this is that usage of SimBlobDetector in dodal unit tests was generating several GB of temporary files. This was traced back to the PatternGenerator which persists the output to a file. As the usage of the SimBlobDetector in the tests did not require examination of the detector output (only the ability to exercise it), a NullPatternGenerator was created and @DominicOram suggested it should be made part of ophyd-async.

@rtuck99 rtuck99 requested a review from coretl June 10, 2025 12:51
@coretl
Copy link
Collaborator

coretl commented Jun 10, 2025

I'm not convinced I really want to support a detector that lies about writing files, especially in the sim package. Could it stay in dodal?

Alternatively, you can tell pytest to clean up after itself faster:

Or you could clean up the tmp_path yourself in the fixture for the detector

@DominicOram
Copy link
Contributor

If @coretl doesn't think this is useful then I'm happy to just have it in dodal, apologies.

@coretl
Copy link
Collaborator

coretl commented Jun 11, 2025

No problem, thanks for thinking of pushing it up!

@coretl coretl closed this Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants