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

Convert UDCDirectoryProvider to standard pattern #505

Merged
merged 3 commits into from
May 9, 2024
Merged

Conversation

DiamondJoseph
Copy link
Contributor

@DiamondJoseph DiamondJoseph commented May 7, 2024

Instructions to reviewer on how to test:

  1. Check Hyperion PR still behaves as expected
  2. Convert UDCDirectoryProvider to standard pattern hyperion#1352

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly

Copy link
Collaborator

@olliesilvester olliesilvester left a comment

Choose a reason for hiding this comment

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

Couple of nitty comments, but the logic and test looks good!

_directory_info = DirectoryInfo(
root=directory, resource_dir=Path("panda"), prefix="", suffix=""
)
class UDCDirectoryProvider(UpdatingDirectoryProvider):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think change the name of this class since it should be used specifically for storing panda postition data, something like PandaPcapDirectoryProvider?

Also, this DirectoryProvider points to a panda subdirectory which doesn't exist by default. We should add a comment to warn that this directory must already exist when using with a PandA - I don't think there's logic in the HDF writer or the IOC to create the directory for us

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something coming down the pipe on that respects: https://github.com/bluesky/ophyd-async/blob/5c116e293afb54b437ffa2ab380635a3c96b19b2/src/ophyd_async/core/_providers.py#L116 Will be handled in the PandA hdf writer at some point. I'll revisit tomorrow

src/dodal/common/udc_directory_provider.py Show resolved Hide resolved
@olliesilvester
Copy link
Collaborator

We need to create the panda directory if it doesn't already exist before we connect to the panda. I'm not sure if this feature should ultimately be within dodal or the HDFPanda device, but we can put it in dodal for now at least. This can be done in a separate PR though

Copy link
Collaborator

@olliesilvester olliesilvester left a comment

Choose a reason for hiding this comment

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

Thanks! I'll add something to create the panda directory if it doesn't already exist, in a separate PR

@olliesilvester olliesilvester merged commit 2252db0 into main May 9, 2024
11 checks passed
@olliesilvester olliesilvester deleted the pre-processor branch May 9, 2024 12:31
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.

2 participants