Skip to content

Refactor uri again - #8

Merged
cmalinmayor merged 7 commits into
mainfrom
refactor-uri-again
Oct 29, 2026
Merged

cmalinmayor merged 7 commits into
mainfrom
refactor-uri-again

Conversation

@cmalinmayor

@cmalinmayor cmalinmayor commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Proposed Change

Simplify both the actual URI (janelia:/linux/path) and the functions/modules/structure.

@msschwartz21 the to_janelia_uri will now accept/recognize any of the universal formats (linux path, smb://, windows UNC thing) and turn them into the janelia uri. Only ambiguous local mounts (/Volumes, X:/ on windows) require the share to be mounted to resolve the janelia uri, and will do nothing if you pass them though. Would you prefer a warning if you pass an unmounted share? It could feasibly be a non-janelia path that should be passed through untouched, but... then you can ignore the warning 😅 [edit: i added the warnings, can still revert if not needed]

[edit edit: as a bonus i added an argparser type thing so it can auto-convert janelia URIs to local paths!]

Unless we change the actual URI based on discussions at the parallel session, I think this is about ready for v1 release.

Checklist

Go through these things before merge. Actions should run automatically to test them, but for information on how to run locally, see CONTRIBUTING.md.

  • I have added tests that prove that my feature works in various situations or tests the bugfix (if applicable).
  • I have checked that the tests pass and I maintained or improved test coverage (just test-cov).
  • I have written docstrings for any new public functions and classes.
  • I have checked that linting and formatting pass (just lint).
  • I have checked that mypy type checking passes (just typecheck).

mount_name = parts[2]
stem = re.sub(r"-\d+$", "", mount_name)
if any(share.share_name in (mount_name, stem) for share in shares):
warnings.warn(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a good compromise! I approve 🍅

@cmalinmayor
cmalinmayor merged commit ccd4c79 into main Oct 29, 2026
9 checks passed
@cmalinmayor
cmalinmayor deleted the refactor-uri-again branch October 29, 2026 16:30
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