-
Notifications
You must be signed in to change notification settings - Fork 0
feat: improve and update of geos-mesh utils functions #109
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?
Conversation
…ckdataset if it exist
npArraycreated: npt.NDArray[ Any ] = vnp.vtk_to_numpy( createdAttribute ) | ||
assert ( npArray == npArraycreated ).all() | ||
assert valueType == npArraycreated.dtype | ||
|
||
vtkDataTypeCreated: int = createdAttribute.GetDataType() | ||
assert vtkDataTypeTest == vtkDataTypeCreated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same remark about test result and reference
@pytest.mark.parametrize( "componentNames, componentNamesTest, onPoints, vtkDataType, vtkDataTypeTest, valueType", [ | ||
( (), (), True, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( (), (), False, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( (), (), True, None, VTK_FLOAT, "float32" ), | ||
( (), (), False, None, VTK_FLOAT, "float32" ), | ||
( (), ( "Component0", "Component1" ), True, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( (), ( "Component0", "Component1" ), False, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( (), ( "Component0", "Component1" ), True, None, VTK_FLOAT, "float32" ), | ||
( (), ( "Component0", "Component1" ), False, None, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y" ), ( "X", "Y" ), True, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y" ), ( "X", "Y" ), False, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y" ), ( "X", "Y" ), True, None, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y" ), ( "X", "Y" ), False, None, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y", "Z" ), ( "X", "Y" ), True, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y", "Z" ), ( "X", "Y" ), False, VTK_FLOAT, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y", "Z" ), ( "X", "Y" ), True, None, VTK_FLOAT, "float32" ), | ||
( ( "X", "Y", "Z" ), ( "X", "Y" ), False, None, VTK_FLOAT, "float32" ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark about one line comments for a rapid visual about what you're testing
|
||
createdAttribute: vtkDataArray = data.GetArray( attributeName ) | ||
nbComponentsCreated: int = createdAttribute.GetNumberOfComponents() | ||
assert nbComponents == nbComponentsCreated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obtained from test == expected
assert componentNamesTest == componentsNamesCreated | ||
|
||
npArraycreated: npt.NDArray[ Any ] = vnp.vtk_to_numpy( createdAttribute ) | ||
assert ( npArray == npArraycreated ).all() | ||
assert valueType == npArraycreated.dtype | ||
|
||
vtkDataTypeCreated: int = createdAttribute.GetDataType() | ||
assert vtkDataTypeTest == vtkDataTypeCreated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same remark test == expected
Co-authored-by: paloma-martinez <104762252+paloma-martinez@users.noreply.github.com>
This PR updates the utils functions of geos-mesh:
close #108