Skip to content
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

Some fixes for the formatting of the documentation #912

Merged
merged 1 commit into from
Jul 25, 2016

Conversation

jbarnoud
Copy link
Contributor

Fixes #855 among other things

Changes made in this Pull Request:

  • Formatting fixes in several random places in the documentation

The doc rendering is broken at several places because the markup format is not followed in docstrings. Hereby, I fix some of this formatting issues to fix the rendering of some doc pages.

PR Checklist

  • Tests? Not applicable
  • Docs?
  • CHANGELOG updated? Nothing new
  • Issue raised/referenced?

@@ -143,9 +143,9 @@
def is_any_closer(r, r0, dist=2.5):
return np.any(r < dist)

The first two parameters `r` and `r0` are provided by :class:`Contacts` when it
The first two parameters ``r`` and ``r0`` are provided by :class:`Contacts` when it
Copy link
Member

Choose a reason for hiding this comment

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

why the double back ticks?

Copy link
Contributor Author

@jbarnoud jbarnoud Jul 22, 2016

Choose a reason for hiding this comment

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

I started a double backtick rage before realizing that it was not consistent throughout the doc anyway. My reasoning was that r and r0 refer to arguments, therefore to code, and that code is in monospace style.

Copy link
Member

Choose a reason for hiding this comment

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

I thought single backticks is enough for the monospace style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is in markdown, not in rst. In rst single ticks mean italic.
Le 22 juil. 2016 6:31 PM, Max Linke [email protected] a écrit :In package/MDAnalysis/analysis/contacts.py:

@@ -143,9 +143,9 @@
def is_any_closer(r, r0, dist=2.5):
return np.any(r < dist)

-The first two parameters r and r0 are provided by :class:Contacts when it
+The first two parameters r and r0 are provided by :class:Contacts when it

I thought single backticks is enough for the monospace style.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, single backticks are mandated in the NumPy doc style for references to variable names (scroll down to 4. Parameters).

@coveralls
Copy link

coveralls commented Jul 22, 2016

Coverage Status

Coverage decreased (-0.004%) to 83.12% when pulling 57004c3 on jbarnoud:docs into 3f934d7 on MDAnalysis:develop.

@orbeckst
Copy link
Member

@jbarnoud - kudos to you for cleaning up the docs.

@jbarnoud
Copy link
Contributor Author

I reverted the backticks and restored the space before the columns. I also added some more minor fixes.

@coveralls
Copy link

coveralls commented Jul 25, 2016

Coverage Status

Coverage increased (+0.003%) to 83.126% when pulling 9ddd8a1 on jbarnoud:docs into 3f934d7 on MDAnalysis:develop.

@coveralls
Copy link

coveralls commented Jul 25, 2016

Coverage Status

Coverage increased (+0.003%) to 83.126% when pulling 9ddd8a1 on jbarnoud:docs into 3f934d7 on MDAnalysis:develop.

@coveralls
Copy link

coveralls commented Jul 25, 2016

Coverage Status

Coverage decreased (-0.01%) to 83.11% when pulling 9ddd8a1 on jbarnoud:docs into 3f934d7 on MDAnalysis:develop.

:func:`rmsd` calculates the RMSD between *a* and *b*; for fitting a whole
trajectory it is more efficient to use :func:`rms_fit_trj`. A complete fit
of two structures can be done with :func:`alignto`. """
MDAnalysis.analysis.rms.rmsd: Calculates the RMSD between *a* and *b*.
Copy link
Member

Choose a reason for hiding this comment

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

Does this build as a list, one item per line?

Copy link
Member

Choose a reason for hiding this comment

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

Are the functions/classes automatically hyperlinked or does one need markup, e.g. :func:alignto?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm checking right now

Copy link
Contributor

Choose a reason for hiding this comment

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

It builds as a list, one item per line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It creates a list indeed. And the links are done automatically. The See also section expect that format (which I do not like much).

Minor missformatting of docstring can cause part of the documentation
not to be rendered. This commit fixes some of this formatting issues. In
some occurences, it also updates some docstring refering to deprecated
methods.

The commit also restores the documentation for gromacs trajectory
formats.

Fixes 855
@jbarnoud
Copy link
Contributor Author

I just rebased against develop and squashed the commits.

``N*(N-1)/2`` numpy 1D array with the distances dist[i,j] between ref
coordinates i and j at position d[k]. Loop through d:

.. code-block:: python
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, do we need to markup code as python? I think sphinx's default is python.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure that specific change was required. It does not hurt, though.

@orbeckst orbeckst self-assigned this Jul 25, 2016
@orbeckst
Copy link
Member

Looks ready to me. Can I merge?

@jbarnoud
Copy link
Contributor Author

It is good for me.

@orbeckst orbeckst merged commit e5c98de into MDAnalysis:develop Jul 25, 2016
@orbeckst
Copy link
Member

Many thanks @jbarnoud !

abiedermann pushed a commit to abiedermann/mdanalysis that referenced this pull request Oct 26, 2016
Some fixes for the formatting of the documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs for XTC and TRR missing
5 participants