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

Improve Package Exposure in Documentaiton #878

Merged

Conversation

rocco8773
Copy link
Member

This is a long needed update to the documentation that increases the document exposure of the plamsapy package. Currently there is functionality in the package whose docstrings do not make it into the documentation build. This is primarily due the fact that many package elements do not go through the sphinx autodoc directives during our narrative documentation.

This PR manually creates reST files for the package elements that are not autodoc-ed in our narrative documentation. These reST files are placed in a newly created /docs/api_static directory (similar to the automatically generated automodapi stub files in the api directory).

This has no affect on our current narrative documentation, but improves the objects detected by intersphinx and exposes all package members in the genindex and/or py-modindex links.

I am also reviewing/adding docstrings to improve readability.

rocco8773 added 25 commits July 27, 2020 18:04
…nflict with decorator `particle_input` in the documentation.
…ge members; add __all__; explicitly import all sub-packages; organize imports;
@rocco8773 rocco8773 added docs PlasmaPy Docs at http://docs.plasmapy.org refactoring ♻️ Improving an implementation without adding new functionality labels Jul 28, 2020
@rocco8773 rocco8773 self-assigned this Jul 28, 2020
@rocco8773 rocco8773 marked this pull request as ready for review July 30, 2020 06:24
@rocco8773
Copy link
Member Author

@StanczakDominik I don't understand the errors we're getting with azure piplines now. It always seems to be on py36_windows, but where the error happens does not seem to be consistent. It does seems to correspond with an import of astropy.units. Can you try rerunning the pipeline? I don't seem to have the permissions to do it myself.

  • I don't thing astropy is necessarily the culprit since there has not been a new release between the pipelines consistently passing to now.

@StanczakDominik
Copy link
Member

Sure, I'll get to it later in the day. Get some sleep! :)

@StanczakDominik StanczakDominik self-assigned this Jul 30, 2020
@rocco8773
Copy link
Member Author

Looks like the pipelines fixed themselves. After a little reading, I think the fails could be due to either circular imports or pushing new commits too frequently, which interrupts the last build and causes issues for the new build. I'm not confident with either of those solutions, but I'll take that they're passing now.

@StanczakDominik
Copy link
Member

Gah, I ended up literally sleeping through it (I blame the blueberry pie) and now this ended up reinforcing my procrastinatory habits :(

I'll look through it tomorrow.

Copy link
Member

@StanczakDominik StanczakDominik left a comment

Choose a reason for hiding this comment

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

Looks great! I saw a good bunch of SphinxDD for the Plasma class in there, which is awesome 👍 Thanks for all of this! I've made a couple of minor typo fixes.

Comment on lines +1 to +10
:orphan:

`plasmapy.conftest`
===================

.. currentmodule:: plasmapy.conftest

.. automodapi:: plasmapy.conftest
:include-all-objects:
:no-heading:
Copy link
Member

Choose a reason for hiding this comment

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

I was surprised to see what I see as essentially a pytest config file documented. But sure, there's no harm in putting it in here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I debated this, along with documenting private members. I deferred the decision on the later due to automodapi not having convenient mechanisms for this. I included the module because I thought it might be useful for contributors down the road.

plasmapy/particles/elements.py Outdated Show resolved Hide resolved
plasmapy/plasma/plasma_factory.py Outdated Show resolved Hide resolved
@rocco8773
Copy link
Member Author

@StanczakDominik I don't plan on making anymore changes, so you can merge whenever you like. Not sure if we want to get @namurphy's feedback first. @namurphy do you have anything to say about this?

@StanczakDominik I'm assuming you want to merge this PR before #857, correct?

@StanczakDominik
Copy link
Member

@StanczakDominik I'm assuming you want to merge this PR before #857, correct?

Preferably, yeah!

I think Nick was broadly on the 👍 side during the last telecon for the main idea behind these changes, so I think it should be fine to merge it now.

@rocco8773
Copy link
Member Author

Do it! You have the honors. :)

Thanks for the review!

@StanczakDominik StanczakDominik merged commit a4e69a9 into PlasmaPy:master Jul 31, 2020
@rocco8773 rocco8773 deleted the improve-pkg-exposure-in-docs branch October 23, 2020 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http://docs.plasmapy.org refactoring ♻️ Improving an implementation without adding new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants