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
OperatingPoint.__init__ defaults alpha to 5.0 degrees when the parameter is omitted at a positive vCg__E, and issues a FutureWarning (via the _UNSET sentinel) announcing that the default will change to None in v6.0.0. At a vCg__E of 0.0, an omitted alpha already resolves to NaN without the warning, since that resolution matches the future default. The v6.0.0 release needs to complete the flip.
Change alpha's default from the _UNSET sentinel to None, so an omitted alpha resolves to 0.0 at a positive vCg__E and to NaN at a vCg__E of 0.0, mirroring beta.
Remove the FutureWarning and the sentinel branch for alpha, and update alpha's docstring to describe the None default.
Update test_initialization_with_defaults in tests/unit/test_operating_point.py to stop expecting the FutureWarning and to assert that the default resolves to 0.0.
This is a breaking results change for any caller who omits alpha and relied on the 5.0 degree default, which is why it is scheduled for the v6.0.0 major release and pre-announced with the FutureWarning.
Problem Statement
OperatingPoint.__init__defaultsalphato 5.0 degrees when the parameter is omitted at a positivevCg__E, and issues a FutureWarning (via the_UNSETsentinel) announcing that the default will change to None in v6.0.0. At avCg__Eof 0.0, an omittedalphaalready resolves to NaN without the warning, since that resolution matches the future default. The v6.0.0 release needs to complete the flip.Location(s):
pterasoftware/operating_point.py,tests/unit/test_operating_point.pyProposed Solution
alpha's default from the_UNSETsentinel to None, so an omittedalpharesolves to 0.0 at a positivevCg__Eand to NaN at avCg__Eof 0.0, mirroringbeta.alpha, and updatealpha's docstring to describe the None default.test_initialization_with_defaultsintests/unit/test_operating_point.pyto stop expecting the FutureWarning and to assert that the default resolves to 0.0.externalFX_Wremoval (Replace externalFX_W and boundsExternalFX_W with an external_loads interface #230) has also landed, delete the then-unused_Unsetclass and_UNSETinstance; otherwise leave them for that issue.Additional Context
This is a breaking results change for any caller who omits
alphaand relied on the 5.0 degree default, which is why it is scheduled for the v6.0.0 major release and pre-announced with the FutureWarning.