-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Many docstrings are inconsistent with the numpydoc format #680
Comments
Hey, I am newcomer here and I would like to work on this issue. Can someone help me in going forward with this? |
What questions do you have? |
We may think about making an aggregate issue, collection everything related to coding style. |
hello, |
Is this issue still open? It's just something was merged already. |
Solves issue #680 for tardis.util.base (i.e. numpydocs format for doc strings.)
Fixed the last file for tardis-sn#680
* Inside of tardis/docs/pphysics/plasma/plasma_plots updated two files multi-line # to be docstrings where appropriate * Some more documentation updates * Finished issue #680 * Fixed the last file for #680 * Fixed two random indentation irregularities found upon review * Update base.py * Update base.py * Update packet_source.py Going through and writing documentation guidelines, noticed that the carriage returns at line 450 and 456 were missing somehow, most likely from me missing them. I added those two carriage returns to make them consistent with the rest of the docstrings.
* Fixed to the montecarlo_numba file to compy w/ issue #680 * Fixed the latex equation * Trying to fix merge conflict * revert to conf.py * Remove extra carriage return * Update tardis/io/decay.py Co-authored-by: Jaladh Singhal <[email protected]> * Update decay.py * Update interaction.py * Update tardis/plasma/properties/atomic.py Co-authored-by: Jaladh Singhal <[email protected]> * Update single_packet_loop.py * Update atomic.py Fixed the formatting in regards to @jalahdh-singhal 's comments * Update numba_interface.py Changed the numba.array to numba.ndarray * Update r_packet.py Changed the r_packet type from RPacket to tardis.montecarlo.montecarlo_numba.r_packet.RPacket * Update ion_population.py Changed the Pandas DataFrame to pandas.DataFrame, and Numpy Array to numpy.ndarray. Made sure that the indentation was consistent as well. * Update atomic.py Changed to Pandas DataFrame/Series/MultiIndex to be pandas.DataFrame/Series/MultiIndex. Also changed the numpy descriptor to numpy.ndarray, and for now moved the type as a comment. * fixing merge conflicts * Changed the returns to fit what type they are Returns were mostly in : descriptor. Changed them to just be what type, which they are pandas.DataFrame as seen from the inheritance of the class IsotopeAbundances. * Modification to docstrings and addressing comments * Update base.py Removed trailing carriage returns on docstrings * Update interaction.py Naming the variables by their full extensions, not just the class that they are. * Update macro_atom.py Added the whole path (.NumbaPlasma) to the end of the description so the entire path is present. * Update r_packet.py Made the complete path for variables * Update atomic.py Updated the descriptions to try and match comments. Fixed the descriptors for the numpy.ndarrays to make them in the same line. * Update ion_population.py Fixing the format of docstrings so that the dtype would be same line as the var : type * Update docs/index.rst Co-authored-by: Jaladh Singhal <[email protected]> * Update tardis/plasma/properties/atomic.py Co-authored-by: Jaladh Singhal <[email protected]> * Update tardis/io/decay.py Co-authored-by: Jaladh Singhal <[email protected]> * Update decay.py * Update r_packet.py Co-authored-by: Jaladh Singhal <[email protected]>
Solves issue tardis-sn#680 for tardis.util.base (i.e. numpydocs format for doc strings.)
Fixed the last file for tardis-sn#680
* Inside of tardis/docs/pphysics/plasma/plasma_plots updated two files multi-line # to be docstrings where appropriate * Some more documentation updates * Finished issue tardis-sn#680 * Fixed the last file for tardis-sn#680 * Fixed two random indentation irregularities found upon review * Update base.py * Update base.py * Update packet_source.py Going through and writing documentation guidelines, noticed that the carriage returns at line 450 and 456 were missing somehow, most likely from me missing them. I added those two carriage returns to make them consistent with the rest of the docstrings.
* Fixed to the montecarlo_numba file to compy w/ issue tardis-sn#680 * Fixed the latex equation * Trying to fix merge conflict * revert to conf.py * Remove extra carriage return * Update tardis/io/decay.py Co-authored-by: Jaladh Singhal <[email protected]> * Update decay.py * Update interaction.py * Update tardis/plasma/properties/atomic.py Co-authored-by: Jaladh Singhal <[email protected]> * Update single_packet_loop.py * Update atomic.py Fixed the formatting in regards to @jalahdh-singhal 's comments * Update numba_interface.py Changed the numba.array to numba.ndarray * Update r_packet.py Changed the r_packet type from RPacket to tardis.montecarlo.montecarlo_numba.r_packet.RPacket * Update ion_population.py Changed the Pandas DataFrame to pandas.DataFrame, and Numpy Array to numpy.ndarray. Made sure that the indentation was consistent as well. * Update atomic.py Changed to Pandas DataFrame/Series/MultiIndex to be pandas.DataFrame/Series/MultiIndex. Also changed the numpy descriptor to numpy.ndarray, and for now moved the type as a comment. * fixing merge conflicts * Changed the returns to fit what type they are Returns were mostly in : descriptor. Changed them to just be what type, which they are pandas.DataFrame as seen from the inheritance of the class IsotopeAbundances. * Modification to docstrings and addressing comments * Update base.py Removed trailing carriage returns on docstrings * Update interaction.py Naming the variables by their full extensions, not just the class that they are. * Update macro_atom.py Added the whole path (.NumbaPlasma) to the end of the description so the entire path is present. * Update r_packet.py Made the complete path for variables * Update atomic.py Updated the descriptions to try and match comments. Fixed the descriptors for the numpy.ndarrays to make them in the same line. * Update ion_population.py Fixing the format of docstrings so that the dtype would be same line as the var : type * Update docs/index.rst Co-authored-by: Jaladh Singhal <[email protected]> * Update tardis/plasma/properties/atomic.py Co-authored-by: Jaladh Singhal <[email protected]> * Update tardis/io/decay.py Co-authored-by: Jaladh Singhal <[email protected]> * Update decay.py * Update r_packet.py Co-authored-by: Jaladh Singhal <[email protected]>
Using the numpydoc format allows for type hinting in PyCharm and easy linking to other docstrings. However, in many places the docstrings violate this format, breaking the type hinting for PyCharm.
An example:
Here, the keyword "Parameters" is followed by a colon, immediately breaking type hinting, and furthermore the parameter types start with a "~", which is unnecessary and also breaks class resolving.
There are probably more kinds of docstring errors in other places too, so this needs some careful research.
Note: You can view the formatted documentation of an object with
ctrl + q
in PyCharm.The text was updated successfully, but these errors were encountered: