-
Notifications
You must be signed in to change notification settings - Fork 429
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
DOC: Fix typos and formatting in .rst files and Python examples. #1314
DOC: Fix typos and formatting in .rst files and Python examples. #1314
Conversation
This PR addresses the issues in issue #1305. Folks, sorry for the delay, but have been working on this only intermittently. Thanks to all of you who made comments. I think I've covered all I had written down in my notes. Surely I did not cover all files, nor all markdown (i.e. inverted commas for DIPY objects), so please feel free to request a revision to the PR. I guess we'll be able to see whether the cross-refs work/have been fixed properly (e.g. cross-refs between files) once this gets merged. I'll work on the the guidelines on a separate topic. @Garyfallidis I tried to use DIPY systematically in the docs. I linked its first appearance with dipy_. Have also encountered A few issues still remain:
However, I guess that is the way the Sphinx guys thought it should work; when clicking on the number we can go back to the location of the reference. I guess this may be cumbersome when the same reference is used more than, say, three times in the same file.
Should I include it in the Simulation section of
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1314 +/- ##
=======================================
Coverage 87.02% 87.02%
=======================================
Files 228 228
Lines 28841 28841
Branches 3100 3100
=======================================
Hits 25099 25099
Misses 3037 3037
Partials 705 705 Continue to review full report at Codecov.
|
Awesome ! Thanks again ! I will review and answer yours questions as soon as possible |
c7f6c8b
to
f0261bd
Compare
1 similar comment
it fits at the end of this sentence :
I do not understand what you mean here
yes, thanks.
It seems that all description below the figures are not labeled so you can define them.
I think, we should create a specific issue for this one. this deserve a new PR like #1301 |
f0261bd
to
8c7b3d3
Compare
@skoudoro thanks for the review ! Commit 8c7b3d3 addresses the comments. I've opened the issue #1317 to track the The figures should now be labeled and referenced in In the last figure of the same file, I also added the By, I meant that the |
oh ok, I see, it should be linked to this example (example_reconst_dti.py)
I'm generating the whole documentation with your change. I will let you know. |
1 similar comment
8c7b3d3
to
52cf453
Compare
@skoudoro Done for the link of |
1 similar comment
@skoudoro Thanks for having a look to the doc generation ! Please, pay attention to some links; I'm not sure whether Sphinx allows to break the link text or link text vs. link across lines, which I've done. Also, across the website some paths are written as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @jhlegarreta. In general, it is ok but there is some problem with dipy_
link in many examples. Some remarks:
@@ -75,7 +75,7 @@ Release checklist | |||
``README`` in the root directory, maybe with ``vim`` ``diffthis`` command. | |||
Check all the links are still valid. | |||
|
|||
* Check all the dipy builds are green on the `nipy buildbot`_ | |||
* Check all the DIPY builds are green on the `nipy buildbot`_ | |||
|
|||
* If you have travis-ci_ building set up you might want to push the code in its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the link to travis CI website
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skoudoro Thanks for giving it a try!
New patch set 412e9fb:
As for the http://nipy.org/dipy/reference_cmd/CombinedWorkflow.html (combined_workflow_creation.py
) file's strange rendering, I cannot say much; I've gone through it but did not find any error.
As for the files with .. admonition::`` rendering problems (
combined_workflow_cration.py,
gradients_spheres.py`), I did not find a plausible explanation.
As for the wrong rendering for dipy.tracking.life
, I changed to double inverted commas.
As for the links in FAQ, I think I fixed the links for numpy and cython.
Changed the DIPY case in the mentioned files. Had not changed the release notes because I thought at the time the preferred case was the way it was. But changed in the titles now.
Added travis-ci
to link-names.inc
. See whether this solves the issue.
doc/devel/make_release.rst
Outdated
Eleftherios if you do. | ||
|
||
At the moment, the useful dipy binary build testers are: | ||
At the moment, the useful DIPY binary build testers are: | ||
|
||
* http://nipy.bic.berkeley.edu/builders/dipy-bdist32-26 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one does not exist anymore, can you replace it by http://nipy.bic.berkeley.edu/builders/dipy-bdist32-35
and can you add :
http://nipy.bic.berkeley.edu/builders/dipy-bdist64-27
http://nipy.bic.berkeley.edu/builders/dipy-bdist64-35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 412e9fb.
@@ -3,8 +3,8 @@ | |||
Brain segmentation with median_otsu | |||
=================================== | |||
|
|||
We show how to extract brain information and mask from a b0 image using dipy's | |||
segment.mask module. | |||
We show how to extract brain information and mask from a b0 image using dipy_'s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link does not work. it refers to #id2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd dare to say that the incorrect links to DIPY (dipy_
) were due to the missing include links_names.inc
. I've included it in the reported files. See whether this solves the issue.
@@ -3,13 +3,13 @@ | |||
Creating a new combined workflow. | |||
============================================================ | |||
|
|||
A combined workflow is a series of dipy workflows organized together in a way | |||
that the output of a workflow serves as input for the next one. | |||
A ``CombinedWorkflow`` is a series of dipy_ workflows organized together in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dipy_
link does not work. it refers to #id1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
(150 orientations, b=2000s/mm^2) which is one of the standard example datasets | ||
in DIPY. | ||
(150 orientations, b=2000 $s/mm^2$) which is one of the standard example | ||
datasets in dipy_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, this link does not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@@ -3,19 +3,19 @@ | |||
Visualize surfaces | |||
================== | |||
|
|||
Here is a simple tutorial that shows how to visualize surfaces using DIPY. It | |||
also shows how to load/save, get/set and update vtkPolyData and show | |||
Here is a simple tutorial that shows how to visualize surfaces using dipy_. It |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@@ -3,16 +3,18 @@ | |||
Creating a new workflow. | |||
============================================================ | |||
|
|||
A workflow is a series of dipy operations with fixed inputs and outputs | |||
A workflow is a series of dipy_ operations with fixed inputs and outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
that is callable via command line or another interface. | ||
|
||
For example, after installing dipy, you can call anywhere from your command line: | ||
For example, after installing dipy_, you can call anywhere from your command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
doc/examples_index.rst
Outdated
@@ -197,6 +197,7 @@ Simulations | |||
|
|||
- :ref:`example_simulate_multi_tensor` | |||
- :ref:`example_reconst_dsid` | |||
- :ref:`simulate_dki` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be example_simulate_dki
instead of simulate_dki
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed in 412e9fb.
@@ -6,7 +6,7 @@ | |||
|
|||
Mission of Statement | |||
|
|||
The purpose of dipy is to make it **easier to do better diffusion MR imaging research**. Following up with the nipy mission statement we aim to build software that is | |||
The purpose of dipy_ is to make it **easier to do better diffusion MR imaging research**. Following up with the nipy mission statement we aim to build software that is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
52cf453
to
412e9fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this correction, All links work well now. After generating the documentation, Can you correct this following point :
- Typo of
gtab.bvals
onreconst_csd.py
- Typo of
dipy.noise_estimate
onrestore_dti.py
- Typo of
dipy.reconst.cross_validation
onkfold_xval.py
doc/examples/reconst_shore.py
Outdated
|
||
lambdaN and lambdaL are the radial and angular regularization constants, | ||
lambdaN`` and ``lambdaL`` are the radial and angular regularization constants, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing `` before lambdaN
doc/examples/reconst_dti.py
Outdated
""" | ||
|
||
evecs_img = nib.Nifti1Image(tenfit.evecs.astype(np.float32), img.affine) | ||
nib.save(evecs_img, 'tensor_evecs.nii.gz') | ||
|
||
""" | ||
Other tensor statistics can be calculated from the `tenfit` object. For example, | ||
Other tensor statistics can be calculated from the `tenfit``` object. For example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tenfit
rendering error. missing ` at begin
doc/examples/reconst_dti.py
Outdated
diffusivity. One is by calling the `mean_diffusivity` module function on the | ||
eigen-values of the TensorFit class instance: | ||
measures. In DIPY, there are two equivalent ways to calculate the mean | ||
diffusivity. One is by calling the `mean_diffusivity``` module function on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mean_diffusivity
rendering error. missing ` at begin
@@ -24,25 +27,25 @@ | |||
|
|||
""" | |||
For the simulation we will need a GradientTable with the b-values and | |||
b-vectors. Here we use the GradientTable of the sample Dipy dataset | |||
'small_64D'. | |||
b-vectors. Here we use the GradientTable of the sample dipy_ dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the link does not work. Missing the include
412e9fb
to
989c78d
Compare
@skoudoro Thanks. Sorry for the delay. I've been away from keyboard until a few days ago. Partially addressed your comments.
I do not see where the typo is. According to http://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-python-objects, the markup is fine. And in fact, that makes me think about changing the statement about using the backquote or inverted commas inline markup for DIPY objects (see the sentence I'd vote for using proper Sphinx cross-referencing/syntax (such as in:mod: At least for those objects that are present in the dipy code. I ignore whether the rule should also be applied to the objects only present in the example files, or if these should be fine with the inverted commas syntax. If you do agree, I'd change the above as far as I'm able to in a subsequent patch set. Also addressed @skoudoro's comments in #1305 concerning the captions and the path syntax. Removed remaining tabs, and did some other minor changes for the sake of consistency. |
The failing build in Travis seems to be unrelated to the patch set. I ignore the meaning of the |
You are seeing #1323 |
@arokem OK, thanks for clarifying this. |
989c78d
to
5bb52b6
Compare
Rebased to fix the conflict with master. |
1 similar comment
Fix typos and formatting in .rst files and Python examples' documentations: - Fix typos in files. - Replace tabs for two white spaces. - Fix errors in citation and DIPY internal cross-refs. - Add missing cross-refs (e.g. Aganj MRM 2010). - Add links where necessary (ISBI HARDI Contest 2013 and FreeSurfer). - Fix LaTeX math formatting errors. - Make the example/DIPY code object markdown consistent (inverted commas). - Capitalize the acronym long names' first/corresponding letters (e.g. Constrained Spherical Deconvolution). - Capitalize acronyms (e.g. FA). - Make the writing of terms consistent in terms of uppercase/lowercase (e.g. b0 vs. B0; cospus callosum vs. Corpus Callosum, etc.). - Use the [NameYear] convention for citations. - Place all citations under a 'References' section, and use the subsection markdown for the section. - Use inverted commas consistently to reference code objects. - Make the b-value units consistent across files (s/mm^2). - Create and include missing figures for 'reconst_fwdti.py'. - Write DIPY instead of any of its variants in the documentation. - Link the first appearance of dipy in every file (use dipy_).
5bb52b6
to
1673bb7
Compare
Thanks @jhlegarreta ! I merge this one |
…mplesTyposAndFormatting DOC: Fix typos and formatting in .rst files and Python examples.
Fix typos and formatting in .rst files and Python examples'
documentations:
Constrained Spherical Deconvolution).
(e.g. b0 vs. B0; cospus callosum vs. Corpus Callosum, etc.).
markdown for the section.