NREL-Sienna / InfrastructureSystems.jl

Utility package for Sienna's simulation infrastructure
https://nrel-sienna.github.io/InfrastructureSystems.jl/
BSD 3-Clause "New" or "Revised" License
35 stars 20 forks source link

Add default value to struct docstrings #374

Closed kdayday closed 1 month ago

kdayday commented 1 month ago

Adds a print of the default value of parameters in each parameter docstring in auto-generated structs

Example from ThermalStandard Screenshot 2024-06-04 at 2 10 58 PM

jd-lara commented 1 month ago

@kdayday we can populate the (optional) here with (has default) for the fields that have defaults and autodetect here in the template instead of doing it manually.

kdayday commented 1 month ago

@kdayday we can populate the (optional) here with (has default) for the fields that have defaults and autodetect here in the template instead of doing it manually.

@jd-lara I'm going to delete the (optional)s on PSY now. Is that what you meant? We'll just have the default value then

jd-lara commented 1 month ago

@kdayday we can populate the (optional) here with (has default) for the fields that have defaults and autodetect here in the template instead of doing it manually.

@jd-lara I'm going to delete the (optional)s on PSY now. Is that what you meant? We'll just have the default value then

I mean that we can add a note to the field that is that defaults when they are just in case the users misses the fact that there is a default printed in the long comment.

or do what @daniel-thom suggested here https://github.com/NREL-Sienna/InfrastructureSystems.jl/pull/374#discussion_r1626625228