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

make path user expansion optional #5892

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

colobas
Copy link
Contributor

@colobas colobas commented Jan 24, 2023

Description

When using LoadImage, file paths get wrapped with pathlib.Path and .expanduser() is called. This causes paths with a protocol prefix to get corrupted (e.g. in my case paths starting with s3:// are getting one of the forward slashes removed)

This PR makes the wrapping with Path and call to .expanduser() optional (but set to True by default, to preserve current behavior)

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@wyli
Copy link
Contributor

wyli commented Jan 24, 2023

Thanks, could you please amend the commit message to have a sign-off line "git commit --amend --sign-off"? See https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md#signing-your-work

or please follow this dco suggestion https://github.com/Project-MONAI/MONAI/pull/5892/checks?check_run_id=10839784668

Signed-off-by: Guilherme Pires <[email protected]>
@colobas colobas force-pushed the feature/optional_expanduser branch from e142bdc to 9de21dc Compare January 24, 2023 18:06
@colobas
Copy link
Contributor Author

colobas commented Jan 24, 2023

signed off!

@wyli wyli enabled auto-merge (squash) January 24, 2023 18:31
@wyli
Copy link
Contributor

wyli commented Jan 24, 2023

/build

@wyli wyli merged commit 86c7ecd into Project-MONAI:dev Jan 24, 2023
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