Skip to content

Commit

Permalink
fix Windows paths in datasets (#134)
Browse files Browse the repository at this point in the history
* fix windows paths

* fix path

---------

Co-authored-by: Martin Schorb <[email protected]>
  • Loading branch information
martinschorb and Martin Schorb authored Feb 20, 2024
1 parent cd3789b commit 2c377f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tmp*/
*.h5
.idea/
test/test-folder/
build/
5 changes: 5 additions & 0 deletions mobie/metadata/source_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ def _get_image_metadata(dataset_folder, path, type_, file_format, channel):
else:
raise ValueError(f"Invalid file format {file_format}")

# sanitize paths generated in Windows
for key in ["relativePath", "s3Address"]:
if key in format_.keys():
format_[key] = format_[key].replace("\\", "/")

if channel is not None:
if file_format not in ("ome.zarr", "ome.zarr.s3"):
raise NotImplementedError
Expand Down

0 comments on commit 2c377f5

Please sign in to comment.