You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docstring for pvsystem.calcparams_xxx are inconsistent with function code #716
Docstrings for pvsystem.calcparams_desoto, pvsystem.calcparams_cec and pvsystem.calcparams_pvsyst list outputs as photocurrent etc. but code uses different terms, e.g., IL. Using the long variable names inside the functions would clarify the code.
Might want to consider returning dict rather than tuple.
Ok with me to change the code to use long names. But I don't think the long/short inconsistency between the docstring/API and internal variable names is necessarily a problem. Our Contributing docs say:
pvlib python uses a mix of full and abbreviated variable names. See Variables and Symbols. We could be better about consistency. Prefer full names for new contributions. This is especially important for the API. Abbreviations can be used within a function to improve the readability of formulae.
Maybe adding a comment line with the return statement will close the bit of gap between the docstring and the variables used in the code. I think it is helpful to use the common symbols as variable names. I don't think including the symbols in the docstring would improve matters; seems like step back from the Contributing goal of full names.
Can i do like
Updating the docstrings for the mentioned functions to match the variable names used in the code.
Modifying the functions to use long variable names for clarity.
Consider changing the return type of the functions from a tuple to a dictionary to improve readability.
Activity
wholmgren commentedon May 9, 2019
Ok with me to change the code to use long names. But I don't think the long/short inconsistency between the docstring/API and internal variable names is necessarily a problem. Our Contributing docs say:
cwhanse commentedon May 9, 2019
Maybe adding a comment line with the return statement will close the bit of gap between the docstring and the variables used in the code. I think it is helpful to use the common symbols as variable names. I don't think including the symbols in the docstring would improve matters; seems like step back from the Contributing goal of full names.
pratham15541 commentedon Feb 18, 2025
Can i do like
Updating the docstrings for the mentioned functions to match the variable names used in the code.
Modifying the functions to use long variable names for clarity.
Consider changing the return type of the functions from a tuple to a dictionary to improve readability.
cwhanse commentedon Feb 18, 2025
The agreement here was to add some comments, e.g. for
calcparams_desotoat this line, explaining how the internal variables map to the named outputs.Changing the output type would require a much longer discussion that we had in this issue.
cwhanse commentedon Mar 31, 2025
Closed by #2405