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

Fix root/path kwargs for Stream Resource documents generated by HDFWriter #86

Merged
merged 25 commits into from
Mar 4, 2024

Conversation

rosesyrett
Copy link
Collaborator

Previously, root was hardcoded to '/'. This removes that, and instead ensures the root and resource_path are accurate.

@rosesyrett rosesyrett requested a review from coretl November 20, 2023 11:23
@coretl
Copy link
Collaborator

coretl commented Nov 23, 2023

Tests failing?

@DiamondJoseph
Copy link
Contributor

This change is good, I will finish it

directory_path: str
filename_prefix: str
"""
Information about where and how to write a file.
Copy link
Contributor

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)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Relevant: #122

@DiamondJoseph DiamondJoseph requested a review from coretl March 4, 2024 09:31
@DiamondJoseph DiamondJoseph merged commit 701922a into main Mar 4, 2024
14 checks passed
@DiamondJoseph DiamondJoseph deleted the fix-sr-paths branch March 4, 2024 09:39
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.

5 participants