Skip to content

Use os.path.join for path construction in metadata_builder#168

Merged
seanmcculloch merged 3 commits intofeat/squashed-split-xml-ipdfrom
copilot/sub-pr-167
Feb 15, 2026
Merged

Use os.path.join for path construction in metadata_builder#168
seanmcculloch merged 3 commits intofeat/squashed-split-xml-ipdfrom
copilot/sub-pr-167

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 15, 2026

Description of the Changes You Made

Replaced string concatenation with os.path.join() for file path construction in metadata_builder.py to match the pattern used in overlap_detection.py.

Changes:

  • Added import os
  • Line 127 (split zarr): os.path.join(row['zarr_base_path'], row['file_path'], str(self.level))
  • Line 129 (non-split zarr): os.path.join(self.image_file_prefix, row['file_path'], str(self.level))
  • Line 131 (tiff): os.path.join(self.image_file_prefix, row['file_path'])

Before:

file_path = row['zarr_base_path'] + row['file_path'] + f'/{self.level}'

After:

file_path = os.path.join(row['zarr_base_path'], row['file_path'], str(self.level))

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Instructions for Testing

Run the metadata_builder unit tests:

python tests/test_detection/test_metadata_builder.py

Additional Info

This change improves cross-platform compatibility and makes path construction more robust. All existing tests pass.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Address feedback on splitting XML IPD implementation Use os.path.join for path construction in metadata_builder Feb 15, 2026
Copilot AI requested a review from seanmcculloch February 15, 2026 00:37
@seanmcculloch seanmcculloch marked this pull request as ready for review February 15, 2026 02:27
@seanmcculloch seanmcculloch merged commit 6dc5000 into feat/squashed-split-xml-ipd Feb 15, 2026
@seanmcculloch seanmcculloch deleted the copilot/sub-pr-167 branch February 15, 2026 02:27
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