ARTIST-Association / ARTIST

A differentiable ray tracer using the PyTorch machine-learning framework in Python.
MIT License
3 stars 0 forks source link

Informative Docstrings #73

Closed kalebphipps closed 4 weeks ago

kalebphipps commented 1 month ago

Is your feature request related to a problem? Please describe. Currently the sphinx variable autoapi_python_class_content is set to "init". This implies that the docstrings generated for the classes only consider the init function and not the description above the init. This results in a clearer output that is easier to understand, however, currently the docstrings used in ARTIST init functions are not informative.

Describe the solution you'd like We should expand on the docstrings in the init functions to include a description of class behaviour. An example of this expansion is implemented for the Heliostat object. Additionally, global variables (such as a logger or type mapping dictionary) should include a one-line docstring description—see heliostat.py for an example.

MarleneBusch commented 1 month ago

I have added informative docstrings for almost all inits. I only had problems with the following two files:

  1. actuator_ideal.py - the class in this file does not have an init function maybe we should add an empty one to be able to write a docstring for it?
  2. configuration_classes.py - I think the one line docstrings are already informative enough but i am unsure

Furthermore the global variables such as logger and type mapping dictionary now all have a one line docstring description