-
Notifications
You must be signed in to change notification settings - Fork 2
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
integrating generate renders to pipeline #32
Conversation
and some code refactoring to reduce number of output files
README has now been updated. |
for p in args.participant_label: | ||
to_deface.extend(glob(os.path.join(args.bids_dir, f'sub-{p}', "ses-*"))) | ||
to_deface.extend(list(args.bids_dir.joinpath(f'sub-{p}').glob("ses-*"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glob 1. These comments are just making sure this was intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was intentional just to stay consistent with usage of pathlib library coz all the other scripts use pathlib.Path objects. And I think it's a bit more readable too.
if not to_deface: | ||
to_deface = glob(os.path.join(args.bids_dir, f'sub-{p}')) | ||
to_deface = list(args.bids_dir.glob(f'sub-{p}')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glob 2. These comments are just making sure this was intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and same reasoning as above.
for s in args.session_id: | ||
to_deface = glob(os.path.join(args.bids_dir, "sub-*", f'ses-{s}')) | ||
to_deface = list(args.bids_dir.rglob(f'ses-{s}')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rglob 1. These comments are just making sure this was intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and same reasoning as above.
if args.participant_label == None and args.session_id == None: | ||
session_check = glob(os.path.join(args.bids_dir, "sub-*", "ses-*")) | ||
if args.participant_label is None and args.session_id is None: | ||
session_check = list(args.bids_dir.rglob("ses-*")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rglob 2. These comments are just making sure this was intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and same reasoning as above. Also, I tested each of these changes specifically to make sure it doesn't affect the functionality.
README fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve (and I'm testing right now and it looks like it won't have any problems)!
I spoke too soon! I got a lot of:
I was testing over an SSH connection on curium from my VPN'ed PC. I don't know whether or not that should have worked... I will try direct on curium one more time and then I'm done. But this begs the question, "how can a user ONLY generate renders if they fail the first time and save all that defacing again?" we may want to file an issue to add |
I was wrong, it did not work on my second test either in the generate renders portion.
@ericearl I'll try this out on curium too but just to confirm, did you have fsleyes on your env? |
Oy. I did forget to activate conda again. Testing over right now... |
It was the conda environment, got me again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review my two new README suggestions. Otherwise, I approve this PR.
Co-authored-by: Eric Earl <[email protected]>
Co-authored-by: Eric Earl <[email protected]>
@ericearl Great, thank you! I'll merge this to main and do some more testing with the main branch. |
This PR includes the following changes:
I've tested the code on two sample datasets from start to end, and its working as expected.
Things to do before it can be merged: