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
When a method uses a single quantity that may be found in an sbpy DataClass, sbpy's coding guidelines recommends internally transforming that quantity into a DataClass object. From the docs:
This buries the physical dependency of the method (although that can be addressed in the docstring), and it also makes the code slightly harder to read, with references to eph["phase"] versus just phase.
Following the Zen of Python, where it is stated that "Simple is better than complex," and "Flat is better than nested," perhaps we should reverse the rule and instead transform DataClass to Quantity?
When a method uses a single quantity that may be found in an sbpy
DataClass
, sbpy's coding guidelines recommends internally transforming that quantity into aDataClass
object. From the docs:This buries the physical dependency of the method (although that can be addressed in the docstring), and it also makes the code slightly harder to read, with references to
eph["phase"]
versus justphase
.Following the Zen of Python, where it is stated that "Simple is better than complex," and "Flat is better than nested," perhaps we should reverse the rule and instead transform
DataClass
toQuantity
?This approach would still validate the parameter's dimensions. I think we would deprecate
quantity_to_dataclass
.The text was updated successfully, but these errors were encountered: