-
Notifications
You must be signed in to change notification settings - Fork 191
Python CLI changes for Windows image piping #2969
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
Draft
Lestropie
wants to merge
5
commits into
dev
Choose a base branch
from
python_image_piping
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
clang-tidy review says "All clean, LGTM! 👍" |
- More extensive use of pathlib.Path throughout API modules. - When running in a Windows environment, explicitly invoke cygwin.exe to translate piped image filesystem paths between Posix and Windows formats. While this is not necessary if piping an image from one Python command to another, it is necessary for compatibility in piping between Python and C++ commands. - Move helper function responsible for creating modified pathlib.Path class that quote-escapes when used in an f-string out of app.Parser and into app, since it may be useful outside of the context of command-line parsing. - Add intermediate classes for CLI input filesystem paths for centralising the checking of user-specified input paths, similarly to what had already been done for output user-specified paths. - dwinormalise group: Dynamically delete more images from the scratch directory as they are used. - fsl.eddy_binary(): Make full use of pathlib.Path functionalities. - mrtrix3.path.wait_for(): In addition to pathlib.Path adoption, includes duplication of fixes in 9ad39a8 and e866aa4 for simplicity of testing. - mrtrix3.utils.load_keyval(): Yield a dictionary of strings / lists of strings for multi-line keys. Do not split lines; that interpretation is deferred to downstream code (only current usage is population_template calling transformcalc decomp). - utils.name_temporary(): Fix creation of filesystem paths for temporary directories.
- Remove function app.make_quote_escaped_path_object() and replace with class FSQEPath (F-string quote-escaped path). This exploits runtime inheritance to discover the type of pathlib.Path and inherit from it, rather than using clumsy multiple inheritance. - Fix cygpath invocation for input image pipes. - Improve run.command() printed terminal strings with use of this new class.
b50f92a to
6ece29e
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
cc80855 to
6ece29e
Compare
70031c3 to
6bf4cec
Compare
Conflicts: python/mrtrix3/commands/population_template/utils.py python/mrtrix3/fsl.py python/mrtrix3/path.py python/mrtrix3/run.py
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2960. Extensive description in 6709049.
Posting as draft until I've run the full battery of Python tests.