-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Docstring formatting #833
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
Merged
Merged
Docstring formatting #833
Changes from 11 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
c7ea688
improve docstring sphinx rendering in ModelChain methods
kevinsa5 bc09814
improve docstring sphinx rendering in Location.from_tmy
kevinsa5 4cb0b0d
improve docstring sphinx rendering in tracking.singleaxis
kevinsa5 106ab87
improve docstring sphinx rendering in iotools.midc.read_midc
kevinsa5 9520610
improve docstring sphinx rendering in ivtools functions
kevinsa5 af11331
remove duplicate pvwatts_losses entry in api.rst
kevinsa5 0ae798e
improve docstring sphinx rendering in clearsky functions
kevinsa5 dd3c614
add whatsnew entry
kevinsa5 13a699b
update formatting of "Assigns attributes" info in modelchain.py docst…
kevinsa5 5bbf06c
fix capitalization in iotools.midc.read_midc
kevinsa5 a928c41
improve docstring formatting for return value dict keys in ivtools.fi…
kevinsa5 864e517
simplify Location.from_tmy docstring
kevinsa5 dfef019
pin sphinx version at 1.8.5 in setup.py
kevinsa5 a15484f
make solarposition.py footnotes compatible with numpydoc
kevinsa5 4257f97
make clearsky.py footnotes compatible with numpydoc
kevinsa5 f62a376
make atmosphere.py footnotes compatible with numpydoc
kevinsa5 ec5dfc5
make irradiance.py footnotes compatible with numpydoc
kevinsa5 336fb47
make iam.py footnotes compatible with numpydoc
kevinsa5 f6d683f
make temperature.py footnotes compatible with numpydoc
kevinsa5 81103ad
make pvsystem.py footnotes compatible with numpydoc
kevinsa5 9a38a02
make singlediode.py footnotes compatible with numpydoc
kevinsa5 ba530f7
make ivtools.py footnotes compatible with numpydoc
kevinsa5 27292af
make tracking.py footnotes compatible with numpydoc
kevinsa5 a6f6c2b
make tmy.py footnotes compatible with numpydoc
kevinsa5 1eb5122
make epw.py footnotes compatible with numpydoc
kevinsa5 bdab55c
make srml.py footnotes compatible with numpydoc
kevinsa5 e1f6168
make surfrad.py footnotes compatible with numpydoc
kevinsa5 37ba6c1
make psm3.py footnotes compatible with numpydoc
kevinsa5 9309522
fix typo in pvsyst_cell docstring footnote
kevinsa5 d62e7c4
add sphinx suppress_warnings entry for unreferenced footnote warnings
kevinsa5 0962a4e
make the stickler happy
kevinsa5 57a8098
fix improper reference format in pvsystem.calcparams_pvsyst docstring
kevinsa5 0c20996
remove TMY module from api.rst and add pvsystem.adrinverter
kevinsa5 6c9203c
add link to github issue about suppressing sphinx warnings
kevinsa5 5700205
Merge branch 'master' into docstring_formatting
kevinsa5 de881cc
fix lint issue in pvsystem.py and make pvsystem.adrinverter docstring…
kevinsa5 6c2cf74
Merge branch 'docstring_formatting' of https://github.com/kevinsa5/pv…
kevinsa5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Neither the current format nor the proposed change is consistent with references section of numpydoc
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.
Fair, but I am having zero success with doing it the "right way" and getting the results to look any better than the ones here: https://pvlib-python.readthedocs.io/en/stable/generated/pvlib.atmosphere.first_solar_spectral_correction.html
Is that how references are supposed to look?
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.
Hm... They should look like the format in the numpydoc example. I don't know why they do not. I poked at the html/css. I think numpydoc is writing out the correct rst and sphinx is processing it into the correct html, so I'm guessing it's related to the css. It could be specific to the readthedocs sphinx theme, but that's just a guess.
So, none of the formats are ideal. I have a slight preference for sticking with the numpydoc format and hoping that someone, somewhere, fixes some bug for us. But I'm also ok with your "plain text" approach.
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.
Good guess! Looks like it's an incompatibility between sphinx_rtd_theme and sphinx 2.0+: readthedocs/sphinx_rtd_theme#741. It's a bit of a rabbit hole, but I've found two workarounds:
sphinx=1.7.2in theenvironment.ymlfile isn't being respected because that file is used for conda installs, butreadthedocs.ymlsays to use pip and install all extra requirements, which according tosetup.pyincludes sphinx without a version constraint. So I'd guess that pinning sphinx at a pre-2.0 version insetup.pywould change the version RTD ends up using. RTD also encourages pinning specific versions of sphinx, see the blueNotesection here: https://docs.readthedocs.io/en/stable/builds.html#understanding-what-s-going-onBoth of these are a little heavy handed and have an effect on how the rest of the docs are rendered so I wanted to get feedback on whether this seemed like a good idea or if you'd prefer to just wait for the theme to fix it on their end. Either way, I'll standardize the docstring references to the numpydoc format. Some other functions already had the plaintext version (e.g. clearsky.bird) so I'll change those as well.
Uh oh!
There was an error while loading. Please reload this page.
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.
+1 here.
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.
You are correct about the conda file being ignored. I’m ok with either work around.