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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate the parallelize option in open_run() #338

Merged
merged 1 commit into from Sep 9, 2022

Conversation

JamesWrigley
Copy link
Member

This comes up when using open_run(data="all"), which will make another call
internally to load proc data with open_run(data="proc"). Since the
parallelize option wasn't passed, the call to open proc data would use the
default of parallelize=True.

Note: I refactored test_open_run() to re-use the code for creating a mock root directory with raw and proc directories etc, but I'm not sure I like how messy it is to return so many paths from a fixture 馃し I could also copy and paste the setup lines into test_open_run_daemonized().

@JamesWrigley JamesWrigley self-assigned this Aug 22, 2022
os.makedirs(proc_run_dir)
make_examples.make_spb_run(proc_run_dir, raw=False)

yield td, prop_dir, raw_run_dir, proc_run_dir
Copy link
Member

Choose a reason for hiding this comment

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

I agree that returning all these paths isn't the most elegant. I think you could skip returning prop_dir - the only place that it's used, it can easily be replaced with proc_run_dir. Then I think it's good enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, fixed in f9fef4e.

@takluyver
Copy link
Member

Other than that, LGTM

This comes up when using `open_run(data="all")`, which will make another call
internally to load proc data with `open_run(data="proc")`. Since the
parallelize option wasn't passed, the call to open proc data would use the
default of `parallelize=True`.
@JamesWrigley JamesWrigley merged commit d296e62 into master Sep 9, 2022
@JamesWrigley JamesWrigley deleted the propagate_parallelize branch September 9, 2022 12:19
@takluyver takluyver added this to the 1.13 milestone May 8, 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.

None yet

2 participants