-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Deprecate modelchain.get_orientation
#2495
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
base: main
Are you sure you want to change the base?
Changes from all commits
4653d9d
442ee6a
7b7f667
2a7ac35
8e25637
bb3d7df
e2c7fc3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -10,6 +10,8 @@ Breaking Changes | |||||||
|
||||||||
Deprecations | ||||||||
~~~~~~~~~~~~ | ||||||||
* Deprecate :py:func:`~pvlib.modelchain.get_orientation`. Removal scheduled for | ||||||||
``v0.14.0``. (:pull:`2691`) | ||||||||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
In case v0.14.0 turns out to be in the next few releases, I think it is better to not mention a version number. However, I notice that generally I seem to be the only one advocating for not mentioning specific versions regarding deprecation removals. Maybe it's time to discuss and adopt an actual policy here? In the meantime, feel free to overrule me! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Hmm that's a fair point, I confess I had not thought much about that. I think I am on board with your suggestion. If no-one objects in the next day or two, I'll commit your suggestion.
+1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like setting a version more for us, so it does not get forgotten. I understand Kevin's point is to make it more agile. >>> import pvlib.modelchain as mc
>>> mc.get_orientation('flat')
<stdin>:1: pvlibDeprecationWarning: The pvlib.modelchain.get_orientation function was deprecated in pvlib 0.13 and will be removed in next version.
(0, 180)
>>> And let's set the patch number too, so it's deprecated in 0.13.x and next version clearly is 0.13.(x+1). |
||||||||
|
||||||||
|
||||||||
Bug fixes | ||||||||
|
@@ -44,3 +46,4 @@ Maintenance | |||||||
Contributors | ||||||||
~~~~~~~~~~~~ | ||||||||
* Elijah Passmore (:ghuser:`eljpsm`) | ||||||||
* Rajiv Daxini (:ghuser:`RDaxini`) |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -18,6 +18,8 @@ | |||||
from pvlib.pvsystem import _DC_MODEL_PARAMS | ||||||
from pvlib.tools import _build_kwargs | ||||||
|
||||||
from pvlib._deprecation import deprecated | ||||||
|
||||||
# keys that are used to detect input data and assign data to appropriate | ||||||
# ModelChain attribute | ||||||
# for ModelChain.weather | ||||||
|
@@ -59,6 +61,13 @@ | |||||
) | ||||||
|
||||||
|
||||||
@deprecated( | ||||||
since="0.13", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
removal="0.14", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
name="pvlib.modelchain.get_orientation", | ||||||
alternative=None, | ||||||
addendum=None, | ||||||
) | ||||||
def get_orientation(strategy, **kwargs): | ||||||
""" | ||||||
Determine a PV system's surface tilt and surface azimuth | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1785,11 +1785,6 @@ def test_invalid_models(model, sapm_dc_snl_ac_system, location): | |
ModelChain(sapm_dc_snl_ac_system, location, **kwargs) | ||
|
||
|
||
def test_bad_get_orientation(): | ||
with pytest.raises(ValueError): | ||
modelchain.get_orientation('bad value') | ||
|
||
|
||
Comment on lines
-1788
to
-1792
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To add to @echedey-ls's point above, the usual practice would be to wait to remove the tests until we remove the functionality. For the deprecation period, we would usually retain the tests, just slightly modified so that the function calls are inside I suggest just for the sake of best practice we should do that here too. |
||
# tests for PVSystem with multiple Arrays | ||
def test_with_sapm_pvsystem_arrays(sapm_dc_snl_ac_system_Array, location, | ||
weather): | ||
|
Uh oh!
There was an error while loading. Please reload this page.