Skip to content

Commit c1e811e

Browse files
committed
Merge pull request #1339 from chrisfilo/fix/sloppy_merge
Fix/sloppy merge
2 parents 1262955 + 0e195b5 commit c1e811e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

circle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ dependencies:
2323
- pip install -e .
2424
- pip install matplotlib sphinx ipython boto
2525
- gem install fakes3
26-
- if [[ ! -d ~/examples/data ]]; then wget "http://tcpdiag.dl.sourceforge.net/project/nipy/nipype/nipype-0.2/nipype-tutorial.tar.bz2"; tar jxvf nipype-tutorial.tar.bz2; mkdir ~/examples; mv nipype-tutorial/* ~/examples/; fi
27-
- if [[ ! -d ~/examples/fsl_course_data ]]; then wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt1.tar.gz" ; wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt2.tar.gz"; wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/tbss.tar.gz"; mkdir ~/examples/fsl_course_data; tar zxvf fdt1.tar.gz -C ~/examples/fsl_course_data; tar zxvf fdt2.tar.gz -C ~/examples/fsl_course_data; tar zxvf tbss.tar.gz -C ~/examples/fsl_course_data; fi
26+
- if [[ ! -d ~/examples/data ]]; then wget "http://tcpdiag.dl.sourceforge.net/project/nipy/nipype/nipype-0.2/nipype-tutorial.tar.bz2" && tar jxvf nipype-tutorial.tar.bz2 && mv nipype-tutorial/* ~/examples/; fi
27+
- if [[ ! -d ~/examples/fsl_course_data ]]; then wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt1.tar.gz" && wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt2.tar.gz" && wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/tbss.tar.gz" && mkdir ~/examples/fsl_course_data && tar zxvf fdt1.tar.gz -C ~/examples/fsl_course_data && tar zxvf fdt2.tar.gz -C ~/examples/fsl_course_data && tar zxvf tbss.tar.gz -C ~/examples/fsl_course_data; fi
2828
- bash ~/nipype/tools/install_spm_mcr.sh
2929
- mkdir -p ~/.nipype && echo '[logging]' > ~/.nipype/nipype.cfg && echo 'workflow_level = DEBUG' >> ~/.nipype/nipype.cfg && echo 'interface_level = DEBUG' >> ~/.nipype/nipype.cfg && echo 'filemanip_level = DEBUG' >> ~/.nipype/nipype.cfg
3030
machine:

nipype/pipeline/engine/workflows.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,13 @@ def _write_report_info(self, workingdir, name, graph):
644644
value=1))
645645
save_json(graph_file, json_dict)
646646
graph_file = op.join(report_dir, 'graph.json')
647-
template = '%%0%dd_' % np.ceil(np.log10(len(nodes))).astype(int)
647+
# Avoid RuntimeWarning: divide by zero encountered in log10
648+
num_nodes = len(nodes)
649+
if num_nodes > 0:
650+
index_name = np.ceil(np.log10(num_nodes)).astype(int)
651+
else:
652+
index_name = 0
653+
template = '%%0%dd_' % index_name
648654

649655
def getname(u, i):
650656
name_parts = u.fullname.split('.')

0 commit comments

Comments
 (0)