-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix root/path kwargs for Stream Resource documents generated by HDFWriter #86
Conversation
Tests failing? |
This change is good, I will finish it |
800aad8
to
6979321
Compare
6979321
to
5c6f95f
Compare
directory_path: str | ||
filename_prefix: str | ||
""" | ||
Information about where and how to write a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can come up with a sufficiently brief explanation of why both root
and resource_dir
are needed, I think it would be useful to put in this docstring. Maybe something like
The bluesky event model splits the URI for a resource into two segments to aid in different applications mounting filesystems at different mount points.
@@ -45,15 +45,15 @@ async def open(self, multiplier: int = 1) -> Dict[str, Descriptor]: | |||
self.hdf.num_extra_dims.set(0), | |||
self.hdf.lazy_open.set(True), | |||
self.hdf.swmr_mode.set(True), | |||
self.hdf.file_path.set(info.directory_path), | |||
self.hdf.file_name.set(f"{info.filename_prefix}{self.hdf.name}"), | |||
self.hdf.file_path.set(str(info.root / info.resource_dir)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant: #122
51bbc1e
to
01ffb10
Compare
01ffb10
to
7831498
Compare
7831498
to
62a42e3
Compare
Previously, root was hardcoded to '/'. This removes that, and instead ensures the root and resource_path are accurate.