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

Follow PEP8 in reconst #1207

Closed
wants to merge 38 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@aaossa
Contributor

aaossa commented Mar 31, 2017

Fixed almost every warning from the pycodestyle output (command used: pycodestyle dipy/reconst --ignore=E741*).

Current pycodestyle output:

dipy> pycodestyle dipy/reconst --ignore=E741
dipy/reconst\csdeconv.py:597:80: E501 line too long (88 > 79 characters)
dipy/reconst\csdeconv.py:599:80: E501 line too long (92 > 79 characters)
dipy/reconst\dsi.py:29:80: E501 line too long (116 > 79 characters)
dipy/reconst\dsi.py:245:80: E501 line too long (167 > 79 characters)
dipy/reconst\dsi.py:508:80: E501 line too long (174 > 79 characters)
dipy/reconst\dsi.py:509:80: E501 line too long (163 > 79 characters)
dipy/reconst\dsi.py:510:80: E501 line too long (166 > 79 characters)
dipy/reconst\dti.py:1103:80: E501 line too long (94 > 79 characters)
dipy/reconst\peaks.py:7:1: E402 module level import not at top of file
dipy/reconst\sfm.py:316:80: E501 line too long (130 > 79 characters)
dipy/reconst\shore.py:472:80: E501 line too long (167 > 79 characters)
dipy/reconst\shore.py:609:80: E501 line too long (82 > 79 characters)
dipy/reconst\benchmarks\bench_bounding_box.py:16:80: E501 line too long (84 > 79 characters)
dipy/reconst\tests\test_dsi_deconv.py:61:80: E501 line too long (80 > 79 characters)

Why those changes weren't made?

  • csdeconv.py: Docstring
  • dsi.py: Latex docstring
  • dti.py: FTP ref
  • peaks.py: Deprectaion warning
  • sfm.py: Docstring
  • shore.py: Latex docstring and irreductible equation
  • benchmarcks/bench_bounding_box.py: Command
  • tests/test_dsi_deconv.py: Assertion, reduction not needed

*: E741 is the error code that raises when variable names are too short or confusing (like O, i, l)

aaossa added some commits Mar 31, 2017

Update code in reconst (PEP8)
Working at dipy/reconst/__init__.py. The file `__init__.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/base.py. The file `base.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/benchmarks/bench_bounding_box.py. The file
`bench_bounding_box.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/benchmarks/bench_csd.py. The file `bench_csd.py`
was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/benchmarks/bench_squash.py. The file
`bench_squash.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/benchmarks/bench_vec_val_sum.py. The file
`bench_vec_val_sum.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/cache.py. The file `cache.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/cross_validation.py. The file
`cross_validation.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/csdeconv.py. The file `csdeconv.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/dki.py. The file `dki.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/dsi.py. The file `dsi.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/dti.py. The file `dti.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/fwdti.py. The file `fwdti.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/gqi.py. The file `gqi.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/interpolate.py. The file `interpolate.py` was
updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/mapmri.py. The file `mapmri.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/odf.py. The file `odf.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/sfm.py. The file `sfm.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/shm.py. The file `shm.py` was updated according
to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/shore.py. The file `shore.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_cross_validation.py. The file
`test_cross_validation.py` was updated according to `pystylecheck`
output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_csdeconv.py. The file
`test_csdeconv.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_dki.py. The file `test_dki.py` was
updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_dti.py. The file `test_dti.py` was
updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_fwdti.py. The file `test_fwdti.py`
was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_ivim.py. The file `test_ivim.py` was
updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_mapmri.py. The file `test_mapmri.py`
was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_peak_finding.py. The file
`test_peak_finding.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_peakdf.py. The file `test_peakdf.py`
was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_reco_utils.py. The file
`test_reco_utils.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>

aaossa added some commits Mar 31, 2017

Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_sfm.py. The file `test_sfm.py` was
updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_shm.py. The file `test_shm.py` was
updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_shore.py. The file `test_shore.py`
was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_shore_metrics.py. The file
`test_shore_metrics.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_shore_odf.py. The file
`test_shore_odf.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/tests/test_vec_val_vect.py. The file
`test_vec_val_vect.py` was updated according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Update code in reconst (PEP8)
Working at dipy/reconst/utils.py. The file `utils.py` was updated
according to `pystylecheck` output

Signed-off-by: Antonio Ossa <aaossa@uc.cl>

@aaossa aaossa referenced this pull request Mar 31, 2017

Closed

PEP8 in reconst #881

@arokem

This comment has been minimized.

Member

arokem commented Mar 31, 2017

Thanks for this PR! A couple of initial questions/comments:

  1. Do you understand why the diff looks as though you changed every single line in every file you touched? It makes it really hard to review.

  2. We don't usually merge from master into branches, but rather prefer that you rebase on top of master and push the rebased branch back into your PR. See the developer docs for details: http://nipy.org/dipy/devel/gitwash/development_workflow.html#rebasing-on-trunk

  3. There seem to be some test failures in your branch. You can see those here: https://travis-ci.org/nipy/dipy/builds/217004818

@aaossa

This comment has been minimized.

Contributor

aaossa commented Mar 31, 2017

  1. I don't really know why it happened
  2. I'm sorry, I was thinking the other way around and when I tried to rebase the branch to fix some conflicts I messed up.
  3. Weird, I'll try to see what happened.

Maybe we could split this PR in small chunks of 3-4 files to avoid conflics while merging and make it easy for you to review. If you agree, you can close this PR and I'll try again, keeping an eye in the Travis builds. What do you think?

@arokem

This comment has been minimized.

Member

arokem commented Mar 31, 2017

Sounds good. Closing this one, and awaiting the smaller chain of PRs to come. I think that it will also make it easier to handle errors as they arise.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment