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

Formats and AtomGroup methods #30

Merged
merged 27 commits into from
Dec 13, 2019
Merged

Formats and AtomGroup methods #30

merged 27 commits into from
Dec 13, 2019

Conversation

lilyminium
Copy link
Member

@lilyminium lilyminium commented Nov 6, 2019

To do:

  • Move all TopologyAttr and TopologyObject stuff to topology_system.rst (which is now very long)
  • Script to document all attributes read and guessed from a topology
  • Script to document whether velocities and forces are read from a coordinate file
    • Note: currently this misses TRZ and DLPoly formats due to missing force units (this MDA issue)
  • Script to list all topology parsers and coordinate readers
  • Script to create class tables for each format
  • Script to document attributes for transplanted methods
  • Script to document all topology attributes, their default values, levels, and types
  • Move console Python to IPython
  • Make sure IPython works on Travis
  • Short pages on all formats
  • MemoryReader page
  • ChainReader page
  • Auxiliary readers (+ script?)
  • Writing Universes out
  • Selection exporters
  • Pickling
  • Page on guessing information
    • What is guessed
    • What is it guessed from / how is it guessed
  • Update selections for 0.21.0
    - [ ] Have IPython examples if 0.21.0 is released?
  • Finish alignment.ipynb
  • check oldest valid MDAnalysis versions
    - [ ] Move scripts to conf.py for automatic execution

Running the first script currently requires this branch.

Current open question: how to make sure the user guide stays up to date? 0.21.0 will already have significant changes that mean some warnings and notes are out-of-date. The scripts, notebooks, and IPython help to an extent by actually executing MDAnalysis code. Perhaps the user guide should be part of the main repo; then, at least, the examples won't be wrong.

@orbeckst
Copy link
Member

orbeckst commented Nov 7, 2019

Perhaps the user guide should be part of the main repo; then, at least, the examples won't be wrong.

If there's a way to run the examples (doctest?) then we would at least know when the user guide becomes outdated. This is an important issue but I don't know how to solve it (certainly not part of this issue). How do matplotlib and scipy (@tylerjereddy ?) solve keeping their docs in sync with code?

We could put a mature UserGuide in the main repo but I'd prefer rather moving stuff out of the main repo....

@lilyminium
Copy link
Member Author

I built this PR at https://lilyminium.github.io/UserGuide/ for convenience.

@lilyminium lilyminium force-pushed the trajectories-topologies branch from 98e1488 to 09b3989 Compare November 25, 2019 20:23
@lilyminium
Copy link
Member Author

@orbeckst @richardjgowers I'd love your thoughts on this PR in its current state. (viewable here)

@richardjgowers
Copy link
Member

One option for keeping things up to date is to rebuild the docs each release, then a quick grep through the repo to check for references to the old and new version?

I’d prefer to keep these docs separate

@richardjgowers
Copy link
Member

The auto generated format specific topologyattrs seems to have picked up a few base classes (eg atomattr)

@lilyminium
Copy link
Member Author

Thanks for the review, @richardjgowers. I'll merge tomorrow if you and @orbeckst are happy.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Really awesome work! I only managed to review a small subset and found a few things I would change.

@lilyminium
Copy link
Member Author

lilyminium commented Dec 12, 2019

Thanks for the comments @orbeckst. I realise 115 is a lot of files changed and a massive pain to review. (I think script-generated tables make up more than a few of those, and file format stubs). Is there anything I can do to make this easier to review?

(Going forward I'll try not to let PR's get away from me like this...)

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

a few more comments, but I think you can merge and we just keep raising issues when we see something in the product, looks already very good (just ran out of more time to review)

@@ -5,8 +5,8 @@
/* MDAnalysis gray: #808080 */
/* MDAnalysis white: #FFFFFF */
/* MDAnalysis black: #000000 */
/* Darker orange: e76900 */
/* Even darker orange: #a24900 */
/* Very light orange: #FFEBD0 */
Copy link
Member

Choose a reason for hiding this comment

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

Are these changes that need to be ported to the MDAnalysis docs, too?

@@ -19,10 +19,12 @@ Atom selection language

AtomGroup instances are typically created with :meth:`Universe.select_atoms <MDAnalysis.core.universe.Universe.select_atoms>` or by manipulating another :class:`~MDAnalysis.core.groups.AtomGroup`, e.g. by slicing.

.. code-block:: python
.. ipython:: python
Copy link
Member

Choose a reason for hiding this comment

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

What does an ipython:: block do? Just curious.

Copy link
Member

Choose a reason for hiding this comment

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

Evaluate?

That's cool!

Copy link
Member Author

@lilyminium lilyminium Dec 12, 2019

Choose a reason for hiding this comment

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

Yes, ipython:: python lets you write Python input and IPython will handle the output, generating errors during doc compilation if there are any. Good for handling typos and not copy-paste outputs.

@@ -26,7 +26,7 @@

# -- Scripts -----------------------------------------------------------------
# regenerate tables for which residues are selected by keywords
subprocess.call('./scripts/gen_standard_selections.py')
# subprocess.call('./scripts/gen_standard_selections.py')
Copy link
Member

Choose a reason for hiding this comment

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

Maybe comment on how this works or reference a README that says how the docs are build?

If it's not needed then better remove to avoid maintainer confusion.

@lilyminium lilyminium merged commit fbad183 into master Dec 13, 2019
@RMeli RMeli deleted the trajectories-topologies branch August 18, 2023 20:14
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.

3 participants