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

Non-normative docstrings #150

Closed
brandondube opened this issue Jun 17, 2023 · 3 comments
Closed

Non-normative docstrings #150

brandondube opened this issue Jun 17, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation paper Custom label to denote JOSS paper issues

Comments

@brandondube
Copy link

This issue is part of my portion of the JOSS review, openjournals/joss-reviews#5478

The revised documentation's contributing page shows how to document code, and elucifies that you are using something other than python docstrings to document functions. This choice breaks completions for editors, jupyter kernels, etc, and will hamper users' ability to interact in the usual ways with your code when consuming it. I would recommend documenting the python API using any of the standards for python docstrings; numpy style, google style, sphinx style, etc.

This is not mandatory, just a suggestion to help your software gain traction among python users

@arendMoerman
Copy link
Collaborator

Thank you for the suggestion. We have investigated the possibilities and have come to the conclusion that doxygen does support special commands in docstrings, with the help of a little extra formatting:
"""!

"""
This is supported by doxygen and its special commands, but comes at the cost of an extra exclamation mark after the first quote triplet which might not comply with a common style but at least adds the docstring to the doc attribute of a function.
We have already implemented this in the entire src/PyPO/ directory (source directory), but not yet for the GUI source code. We will do this in due time.

The updated documenting style (using docstrings) is now also reflected in the documentation itself.

Could you please let us know if this satisfies your suggestion?

@arendMoerman
Copy link
Collaborator

The GUI source code has now also been updated to contain the docstrings instead of the old style.

@brandondube
Copy link
Author

Thank you. One nit: your docs say:

Because docstrings cannot be used as file descriptions, we use a different style to describe files. Just as for C/C++/CUDA, file descriptions go after import statements and before the classes and/or methods in the file:

If the first line of a python file is a string, that is the docstring for the file. For example, prysm:

https://github.com/brandondube/prysm/blob/master/prysm/__init__.py#L1

and

>>> prysm.__doc__
'prysm, a python optics module.'

@arendMoerman arendMoerman added documentation Improvements or additions to documentation paper Custom label to denote JOSS paper issues labels Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation paper Custom label to denote JOSS paper issues
Projects
None yet
Development

No branches or pull requests

2 participants