-
Notifications
You must be signed in to change notification settings - Fork 52
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
TEST: Fix plugin invocation, use an initializer that can be verified #880
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #880 +/- ##
==========================================
- Coverage 70.54% 70.52% -0.03%
==========================================
Files 87 87
Lines 8202 8203 +1
Branches 949 949
==========================================
- Hits 5786 5785 -1
- Misses 2409 2411 +2
Partials 7 7 ☔ View full report in Codecov by Sentry. |
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.
good catch
_process_initializer=touch_file, | ||
file_path=init_flag, |
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.
niworkflows/niworkflows/engine/plugin.py
Lines 449 to 454 in 1dc0327
self.pool = pool or ProcessPoolExecutor( | |
max_workers=self.processors, | |
initializer=config._process_initializer, | |
initargs=(config.file_path,), | |
mp_context=mp_context, | |
) |
We should really document somewhere _process_initializer
's expected signature - I got burned by this.
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 see the latest changes.
b67226e
to
a5e7c67
Compare
1.11.0 (July 31, 2024) New minor release to start the 1.11.x series. The major changes include: - a deprecation to T1w-only based template processing - addition of a new dependency ``acres`` for accessing package data However, this is still backwards compatible with the 1.10.x series. * MAINT: Depend on acres for data access * ENH: Add PrepareDerivative/SaveDerivative interfaces (#885) * ENH: Make template dimensions support T2w as well (#879) * ENH: Modify FSSource to output T2 (#868) * FIX: Set cal_max in the NIfTI header for visualization after ``IntensityClip`` (#878) * FIX: Remove accidental MRIQC dependency, allow app config to be passed to workflow plugin (#876) * TEST: Fix plugin invocation, use an initializer that can be verified (#880)
Follow-up to #876, which didn't actually test what we wanted it to. We were manually calling
print()
inside the test and interpreting that as being run on process initialization. We need to pass the config toMultiProcPlugin()
, notworkflow.run()
.capsys
does not capture stdout from subprocesses, it seems, so instead I'm telling the subprocesses to touch a file that I choose.