-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add scalar array selection in geos-trame #103
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
Open
lucas-givord
wants to merge
3
commits into
main
Choose a base branch
from
lgivord/feature/add-scalar-arrays
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies. | ||
# SPDX-FileContributor: Kitware | ||
# ruff: noqa | ||
import pyvista as pv | ||
from pathlib import Path | ||
|
||
from trame_server import Server | ||
from trame_server.state import State | ||
from trame_vuetify.ui.vuetify3 import VAppLayout | ||
|
||
from geos.trame.app.core import GeosTrame | ||
from tests.trame_fixtures import trame_server_layout, trame_state | ||
|
||
|
||
def test_data_loader( trame_server_layout: tuple[ Server, VAppLayout ], trame_state: State ) -> None: | ||
root_path = Path( __file__ ).parent.absolute().__str__() | ||
file_name = root_path + "/data/geosDeck/geosDeck.xml" | ||
|
||
geos_trame = GeosTrame( trame_server_layout[ 0 ], file_name ) | ||
|
||
geos_trame.data_loader.load_vtkmesh_from_id( "Problem/Mesh/0/VTKMesh/0" ) | ||
ug: pv.UnstructuredGrid = geos_trame.data_loader.region_viewer.input | ||
assert ug.GetCellData().HasArray( "attribute" ) | ||
assert ug.GetPointData().HasArray( "RandomPointScalars" ) | ||
assert not ug.GetPointData().HasArray( "RandomPointVectors" ) | ||
assert ug.GetPointData().HasArray( "RandomPointVectors_0" ) | ||
assert ug.GetPointData().HasArray( "RandomPointVectors_1" ) | ||
assert ug.GetPointData().HasArray( "RandomPointVectors_2" ) | ||
assert not ug.GetPointData().HasArray( "RandomPointVectors_3" ) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
hello @alexbenedicto, should I have to push this data with git lfs? If I do that, I believe I'll hit this issue once again : #83 (comment), wdyt?
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.
Hello @lucas-givord , you are right. There is no available credit for git lfs. Do you need to add this .vtu to tests your functionalities ? With this size ?
I have asked the GEOS devs in charge of the project and they highly suggest to minimize the amount of data that will need to use git lfs and the size of test cases as much as possible.
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.
Fine, we should be able to reduce the data. I think I'll add *.vtu in the .gitattributes.
I notice several other *.vtu in this repository :
Do you think it will be worth to open an issue regarding this git lfs limitation ?
FYI @margauxraguenel @paloma-martinez
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.
we can reduce the data to 4.0K, however we hit the lfs limit when I tried to push to the repository. I guess we only have 2 options ?
@alexbenedicto let me know how you want me to proceed
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.
I was told that there are currently no lfs credits left in the whole repository right now. So you can push this data without lfs.