Skip to content

ENH: Skip newline before Python call in batch submission to facilitate containerized runs #3297

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

Merged
merged 3 commits into from
May 1, 2021

Conversation

d-vogel
Copy link
Contributor

@d-vogel d-vogel commented Feb 4, 2021

Summary

  • make possible the integration of the call to the python scipt generated from nodes into a larger call
  • one example this is the use of singularity with the slurm template file.

Fixes

  • Remove the newline at the end of template to avoid having an empty line after joining with the node command. This allows to have the node command integrated in more complex call, such as a singularity exec ... call.

Before:

#/!bin/bash
singularity exec $SINGULARITY_IMG.sif\

python node.py

After:

#/!bin/bash
singularity exec $SINGULARITY_IMG.sif\
python node.py

Remove the newline at the end of template to avoid having am empty line after joining with the node command. This allows to have the node command integrated in more complex call, such as a `singularity exec ...` call.
@effigies
Copy link
Member

Hey, thanks for this. I'm trying to look into the test failure when I have time... Hope to get back to this soon.

@effigies effigies added this to the 1.6.0 milestone Apr 30, 2021
@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #3297 (a60eb4e) into master (ea117f2) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3297      +/-   ##
==========================================
- Coverage   65.04%   65.01%   -0.04%     
==========================================
  Files         302      302              
  Lines       40035    40035              
  Branches     5291     5291              
==========================================
- Hits        26042    26029      -13     
- Misses      12927    12939      +12     
- Partials     1066     1067       +1     
Flag Coverage Δ
unittests 64.71% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/pipeline/plugins/base.py 58.08% <100.00%> (-1.65%) ⬇️
nipype/pipeline/plugins/legacymultiproc.py 65.68% <0.00%> (-3.44%) ⬇️
nipype/algorithms/icc.py 57.53% <0.00%> (ø)
nipype/interfaces/fsl/utils.py 63.76% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea117f2...a60eb4e. Read the comment docs.

@effigies effigies modified the milestones: 1.6.0, 1.6.1 May 1, 2021
@effigies effigies changed the title Avoid empty line in bash script output ENH: Skip newline before Python call in batch submission to facilitate containerized runs May 1, 2021
@effigies
Copy link
Member

effigies commented May 1, 2021

Thanks!

@effigies effigies merged commit b7879d7 into nipy:master May 1, 2021
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.

2 participants