-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Document internal module-level constants #2096
Comments
To my knowledge, the current sphinx docs document only one module-level variable; see the bottom of this page: https://pvlib-python.readthedocs.io/en/stable/reference/pv_modeling/temperature.html I think documenting the variables near the functions they are related to makes sense. I don't think a toctree for all variables makes sense. |
Agree with Kevin that they should be documented near where they belong. I am overall very supportive of documenting them! For example, the |
Should we consider properties for constants. Although highly unlikely, constants could be accidentally overwritten and currently nothing in pvlib would alert you to this. Although clumsy a property is read only and cannot be changed without a |
I'm only in favour about marking their type as Final. It would alert linters. |
Agreed, I only mention it here for posterity in case this becomes an issue again in the future. The documentation of |
Is your feature request related to a problem? Please describe.
A lot of times constants are referenced in the documentation, but the only way to access them is either by visual inspection of the code or importing the object that contains it programmatically.
Describe the solution you'd like
Include constants in a toctree and add their respective documentation.
Describe alternatives you've considered
A toctree dedicated exclusively to all pvlib constants.
Additional context
https://stackoverflow.com/questions/40748886/how-can-i-document-a-constant-module-level-variable-with-sphinx-docstring-wit
https://stackoverflow.com/questions/50831070/how-to-document-linkable-constants-with-sphinx
The text was updated successfully, but these errors were encountered: