-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Inconsistencies in iotools #1245
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
Comments
+1 to normalizing the argument names. I would prefer the simpler |
One thing that also supports |
I like While our long and detailed review of #1175 suggests otherwise (sorry), I really have wanted to keep 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. |
@wholmgren @kanderso-nrel All of the |
I'm +1 for consistency. Is there a way to somehow deprecate the order of return values? No reasonable solution comes to mind, and some quick googling didn't turn up anything either. Maybe this should just be a sudden breaking change, with the excuse that pvlib is still pre-1.0. |
I'm fine with a breaking change or with leaving it alone for now. Continued growth of pvlib could support that it's better to make current users go through a little pain for the betterment of the larger pool of future users. At our current release cadence, we would not have an opportunity to make this breaking change until 2022. |
I would make this change (switch order of output from |
I've made the change - I really think it's going to be great in the long term having Now that we're talking iotools inconsistencies and breaking changes - the |
For PVGIS def get_pvgis_tmy(..., map_variables=None):
if map_variables is None:
warnings.warn(
'PVGIS variable names will be renamed to pvlib conventions by '
'default starting in pvlib 0.10.0. Specify map_variables=True to '
'enable that behavior now, or specify map_variables=False to '
'hide this warning.', pvlib._deprecation.pvlibDeprecationWarning
)
map_variables = False
... And then in pvlib 0.10.0 we change |
@kandersolar Is this still the plan? If so, I'll open a PR to change the default and remove warnings. |
I've not heard anyone say otherwise! Go for it :) |
There 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:
pvigs
,epw
(code),tmy
(in code)epw
(in documentation),surfrad
,tmy
(in documentation)and then there's
psm3
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
andread_srml_month_from_solardat
, which ideally should be calledget_midc
andget_srml
to match their read_ counterparts.The text was updated successfully, but these errors were encountered: