Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
432d73be
Commit
432d73be
authored
May 26, 2022
by
Paul McCarthy
🚵
Browse files
Merge branch 'fix_dill' into 'master'
Add recurse flag to dill dump See merge request fsl/fslpy!339
parents
a187f9cd
22cba1ff
Pipeline
#14473
failed with stages
in 11 minutes and 46 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.rst
View file @
432d73be
...
...
@@ -2,6 +2,16 @@ This document contains the ``fslpy`` release history in reverse chronological
order.
3.9.3 (Friday 27th May 2022)
----------------------------
Fixed
^^^^^
* Fixed an issue in the :func:`.func_to_cmd` function (!339).
3.9.2 (Friday 20th May 2022)
----------------------------
...
...
fsl/utils/fslsub.py
View file @
432d73be
...
...
@@ -494,7 +494,7 @@ def func_to_cmd(func, args=None, kwargs=None, tmp_dir=None, clean="never", verbo
if
kwargs
is
None
:
kwargs
=
{}
dill_bytes
=
BytesIO
()
dill
.
dump
((
func
,
args
,
kwargs
),
dill_bytes
)
dill
.
dump
((
func
,
args
,
kwargs
),
dill_bytes
,
recurse
=
True
)
handle
,
filename
=
tempfile
.
mkstemp
(
prefix
=
func
.
__name__
+
'_'
,
suffix
=
'.py'
,
...
...
tests/test_fslsub.py
View file @
432d73be
...
...
@@ -173,22 +173,6 @@ def test_add_to_parser():
assert
res_flags
[
idx
+
start_index
]
==
part
def
myfunc
():
print
(
'standard output'
)
print
(
'standard error'
,
file
=
sys
.
stderr
)
def
test_func_to_cmd
():
with
fslsub_mockFSLDIR
(),
tempdir
():
cmd
=
fslsub
.
func_to_cmd
(
myfunc
,
(),
{})
jid
=
fslsub
.
submit
(
cmd
)
stdout
,
stderr
=
fslsub
.
output
(
jid
)
assert
stdout
.
strip
()
==
'standard output'
assert
stderr
.
strip
()
==
'standard error'
example_qstat_reply
=
"""==============================================================
job_number: 9985061
exec_file: job_scripts/9985061
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment