-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Adding a diff filter #193
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
Update to the last version of the main
geos-processing/src/geos/processing/generic_processing_tools/AttributesDiff.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Jacques Franc <49998870+jafranc@users.noreply.github.com>
geos-processing/src/geos/processing/generic_processing_tools/AttributesDiff.py
Outdated
Show resolved
Hide resolved
| self.dicNbElements: dict[ Piece, int ] = {} | ||
|
|
||
| self.dicSharedAttributes: dict[ Piece, set[ str ] ] = {} | ||
| self.dicAttributesToCompare: dict[ Piece, set[ str ] ] = {} | ||
| self.dicAttributesDiffNames: dict[ Piece, list[ str ] ] = {} | ||
| self.dicAttributesArray: dict[ Piece, npt.NDArray[ np.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.
| self.dicNbElements: dict[ Piece, int ] = {} | |
| self.dicSharedAttributes: dict[ Piece, set[ str ] ] = {} | |
| self.dicAttributesToCompare: dict[ Piece, set[ str ] ] = {} | |
| self.dicAttributesDiffNames: dict[ Piece, list[ str ] ] = {} | |
| self.dicAttributesArray: dict[ Piece, npt.NDArray[ np.float32 ] ] = {} | |
| self.dictNbElements: dict[ Piece, int ] = {} | |
| self.dictSharedAttributes: dict[ Piece, set[ str ] ] = {} | |
| self.dictAttributesToCompare: dict[ Piece, set[ str ] ] = {} | |
| self.dictAttributesDiffNames: dict[ Piece, list[ str ] ] = {} | |
| self.dictAttributesArray: dict[ Piece, npt.NDArray[ np.float32 ] ] = {} |
I think we can afford the t of dict for these variables names :)
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 for similar variables in the rest of the code
| def getDicAttributesToCompare( self: Self ) -> dict[ Piece, set[ str ] ]: | ||
| """Getter of the dictionary of the attribute to compare per localization.""" | ||
| return self.dicAttributesToCompare | ||
|
|
||
| def getDicAttributesDiffNames( self: Self ) -> dict[ Piece, list[ str ] ]: | ||
| """Getter of the dictionary with the name of the attribute created with the calculated attributes diff.""" | ||
| return self.dicAttributesDiffNames |
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.
Missing return type docstring in these two functions
| else: | ||
| listBlockId: list[ int ] = getBlockElementIndexesFlatten( self.outputMesh ) | ||
| l2Max: Any = 0 | ||
| for BlockId in listBlockId: |
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.
| for BlockId in listBlockId: | |
| for blockId in listBlockId: |
geos-processing/src/geos/processing/generic_processing_tools/AttributesDiff.py
Outdated
Show resolved
Hide resolved
| AttributesDiffFilter: AttributesDiff = AttributesDiff() | ||
| AttributesDiffFilter.setMeshes( [ mesh1, mesh2 ] ) | ||
| AttributesDiffFilter.logSharedAttributeInfo() | ||
| dicAttributesToCompare: dict[ Piece, set[ str ] ] = { |
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 for dic -> dict in variables names in this file
Co-authored-by: paloma-martinez <104762252+paloma-martinez@users.noreply.github.com>
…franc/feat/DiffFilter
Adding a diff filter in VTK and paraview that allows to