8000 Deprecate/raise error for PVSystem "pass-through" properties by kandersolar · Pull Request #1196 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Deprecate/raise error for PVSystem "pass-through" properties #1196

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

Merged
merged 16 commits into from
May 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
create missing PVSystem setters
  • Loading branch information
kandersolar committed May 19, 2021
commit 7b963953bba50a12a680862493b37e9f35493940
36 changes: 36 additions & 0 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,18 +1117,36 @@ def dc_ohms_from_percent(self):
def module_parameters(self):
return tuple(array.module_parameters for array in self.arrays)

@module_parameters.setter
@_check_deprecated_passthrough
def module_parameters(self, value):
for array in self.arrays:
array.module_parameters = value

@property
@_unwrap_single_value
@_check_deprecated_passthrough
def module(self):
return tuple(array.module for array in self.arrays)

@module.setter
@_check_deprecated_passthrough
def module(self, value):
for array in self.arrays:
array.module = value

@property
@_unwrap_single_value
@_check_deprecated_passthrough
def module_type(self):
return tuple(array.module_type for array in self.arrays)

@module_type.setter
@_check_deprecated_passthrough
def module_type(self, value):
for array in self.arrays:
array.module_type = value

@property
@_unwrap_single_value
@_check_deprecated_passthrough
Expand Down Expand Up @@ -1172,6 +1190,12 @@ def surface_azimuth(self, value):
def albedo(self):
return tuple(array.albedo for array in self.arrays)

@albedo.setter
@_check_deprecated_passthrough
def albedo(self, value):
for array in self.arrays:
array.albedo = value

@property
@_unwrap_single_value
@_check_deprecated_passthrough
Expand All @@ -1190,12 +1214,24 @@ def racking_model(self, value):
def modules_per_string(self):
return tuple(array.modules_per_string for array in self.arrays)

@modules_per_string.setter
@_check_deprecated_passthrough
def modules_per_string(self, value):
for array in self.arrays:
array.modules_per_string = value

@property
@_unwrap_single_value
@_check_deprecated_passthrough
def strings_per_inverter(self):
return tuple(array.strings for array in self.arrays)

@strings_per_inverter.setter
@_check_deprecated_passthrough
def strings_per_inverter(self, value):
for array in self.arrays:
array.strings = value

@property
def num_arrays(self):
"""The number of Arrays in the system."""
Expand Down
0