Skip to content

FIX: report.rst terminal output #3220

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 1 commit into from
May 27, 2020
Merged

Conversation

mgxd
Copy link
Member

@mgxd mgxd commented May 27, 2020

Closes #3103

This should fix cases where terminal output (stdout / stderr) is given as a string, and each character is printed on a new line.

@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #3220 into master will decrease coverage by 0.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3220      +/-   ##
==========================================
- Coverage   64.97%   64.12%   -0.85%     
==========================================
  Files         301      299       -2     
  Lines       39836    39771      -65     
  Branches     5270     5264       -6     
==========================================
- Hits        25884    25505     -379     
- Misses      12890    13218     +328     
+ Partials     1062     1048      -14     
Flag Coverage Δ
#unittests 64.12% <100.00%> (-0.85%) ⬇️
Impacted Files Coverage Δ
nipype/utils/filemanip.py 72.47% <100.00%> (-0.48%) ⬇️
nipype/workflows/__init__.py 47.05% <0.00%> (-52.95%) ⬇️
nipype/utils/spm_docs.py 20.00% <0.00%> (-48.00%) ⬇️
nipype/interfaces/freesurfer/base.py 47.58% <0.00%> (-28.23%) ⬇️
nipype/utils/logger.py 56.92% <0.00%> (-27.70%) ⬇️
nipype/testing/fixtures.py 77.92% <0.00%> (-20.78%) ⬇️
nipype/interfaces/dcm2nii.py 49.30% <0.00%> (-15.82%) ⬇️
nipype/interfaces/matlab.py 65.00% <0.00%> (-12.00%) ⬇️
nipype/interfaces/spm/base.py 58.08% <0.00%> (-9.58%) ⬇️
nipype/pkg_info.py 75.00% <0.00%> (-6.25%) ⬇️
... and 12 more

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 460f616...ad44896. Read the comment docs.

@mgxd mgxd added this to the 1.5.0 milestone May 27, 2020
Copy link
Contributor

@oesteban oesteban left a comment

Choose a reason for hiding this comment

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

Really necessary. Thanks

@oesteban oesteban merged commit 4c48a18 into nipy:master May 27, 2020
@tashrifbillah
Copy link

I'll have a look at it and let you know.

Thanks!

@@ -736,7 +736,7 @@ def write_rst_header(header, level=0):

def write_rst_list(items, prefix=""):
out = []
for item in items:
for item in ensure_list(items):
out.append("{} {}".format(prefix, str(item)))

Choose a reason for hiding this comment

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

Where is this ensure_list() function defined?

Copy link
Member Author

Choose a reason for hiding this comment

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

def ensure_list(filename):
"""Returns a list given either a string or a list
"""
if isinstance(filename, (str, bytes)):
return [filename]
elif isinstance(filename, list):
return filename
elif is_container(filename):
return [x for x in filename]
else:
return None

@mgxd mgxd deleted the fix/report-output branch May 27, 2020 22:07
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.

[BUG] STDOUT of CommandLine is stored as one letter per line
4 participants