Inconsistencies in iotools
See original GitHub issueThere exists a number of inconsistencies between the functions in pvlib.iotools that I would like to address.
First, the naming of start/stop date differs between functions for unknown reasons. E.g., get_ecmw_macc
uses startdate/stopdate, read_midc_raw_data_from_nrel
uses start/end and #1175 currently uses start_date/end_date. It would be great with a common consensus of which of the three to use. I’d be willing to change the functions to comply with the decision (of course with deprecation warnings to start with)
Another inconsistency is that meta data is called different things by different functions. Here’s a list:
- Meta:
pvigs
,epw
(code),tmy
(in code) - Metadata:
epw
(in documentation),surfrad
,tmy
(in documentation) and then there’spsm3
which calls it “headers”.
Again if we can agree on a consensus I’d like to offer to implement the changes.
Lastly, the naming of the two data retrieval functions: read_midc_raw_data_from_nrel
and read_srml_month_from_solardat
, which ideally should be called get_midc
and get_srml
to match their read_ counterparts.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
For PVGIS
map_variables
can we do a typical deprecation cycle using a strategy like this?And then in pvlib 0.10.0 we change
map_variables
to default toTrue
instead ofNone
and remove the warning. Thoughts?I like
start
,end
, andmetadata
.While our long and detailed review of #1175 suggests otherwise (sorry), I really have wanted to keep
iotools
relatively easy to contribute to. Part of that means accepting some inconsistencies, but there’s also no reason we can’t come through and clean up the API from time to time.We don’t maintain standards for names within actual code other than readability - it’s only the API names that matter. And no need to deprecate positional argument names - just function names and keyword arguments.