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
In the course of resolving the issue with mutable types as default parameters in attrs classes within FLORIS in pull request #759, @RHammond2 points out that we need to pick a consistent method for empty object creation. Currently, we are at risk that if in the future we implement type checking, we could fail tests.
For instances like this below, I would recommend modifying slightly to ensure the typing is valid (even if unchecked currently) to use the following paragdigm:
Essentially what will happen if typing is implemented, without converting to the array type, it will fail. Additionally it creates some confusion (though some already exists tbc) to create a list for an object indicated to be an array.
The only place this will cause issues is with non-float arrays, in which case I'd recommend having two variations of floris_array_converter such as float_array_converter and object_array_converter. I don't know that it needs to have floris_ at the front at this point, and might be a lingering (but dated) idea from early in the design process.
The text was updated successfully, but these errors were encountered:
Use one process for empty object creation process
In the course of resolving the issue with mutable types as default parameters in attrs classes within FLORIS in pull request #759, @RHammond2 points out that we need to pick a consistent method for empty object creation. Currently, we are at risk that if in the future we implement type checking, we could fail tests.
@RHammond2 says:
For instances like this below, I would recommend modifying slightly to ensure the typing is valid (even if unchecked currently) to use the following paragdigm:
Essentially what will happen if typing is implemented, without converting to the array type, it will fail. Additionally it creates some confusion (though some already exists tbc) to create a list for an object indicated to be an array.
The only place this will cause issues is with non-float arrays, in which case I'd recommend having two variations of
floris_array_converter
such asfloat_array_converter
andobject_array_converter
. I don't know that it needs to havefloris_
at the front at this point, and might be a lingering (but dated) idea from early in the design process.The text was updated successfully, but these errors were encountered: