-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/folder path #166
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
Merged
Merged
Feat/folder path #166
Changes from 16 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
6223aab
feat(folder_path): data_folder generated with uuid
MaxNumerique 878be26
Apply prepare changes
MaxNumerique d626e4a
fix args
MaxNumerique 7847778
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique 8017752
Apply prepare changes
MaxNumerique e6e3755
light_viewable removed
MaxNumerique 9d7ea19
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique cf9589a
Generate a unique project UUID and create a dedicated upload director…
MaxNumerique 5605db7
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique c1d3a9b
Validate folder path in test_generate_native_viewable_and_light_viewa…
MaxNumerique cd7d83f
folder_path halfway there. light_viewable missing still
MaxNumerique d504bc8
feat(folder_path): upload files ino upload folder into project folder…
MaxNumerique 12bff86
id to mesh_components schema
MaxNumerique 9027f76
revert changes to test function
MaxNumerique 7451bf7
test modified to fit with new folder_path (refacto needed)
MaxNumerique 7061126
Apply prepare changes
MaxNumerique a734e8a
id added to texture_coordinates, vertex_attribute_names, polygon_attr…
MaxNumerique 061ecf4
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique 5d13ad8
Apply prepare changes
MaxNumerique 500906d
models_routes & test_models_routes adjusted to fit data/id/ path
MaxNumerique 0e7d610
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique 01469ec
Apply prepare changes
MaxNumerique a0022d8
geode_functions for refacto
MaxNumerique 6544070
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique b312038
Apply prepare changes
MaxNumerique 5ebb91d
test
MaxNumerique 4c19434
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique 1ccfa9b
Apply prepare changes
MaxNumerique eddbc9c
test
MaxNumerique b0c91a2
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique 6085729
Apply prepare changes
MaxNumerique e8596a3
test
MaxNumerique 1c3305c
Apply prepare changes
MaxNumerique 01fa755
test
MaxNumerique a3c4016
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique d37e32a
Apply prepare changes
MaxNumerique 4d9f503
test
MaxNumerique 094b85e
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions…
MaxNumerique 5612c04
Apply prepare changes
MaxNumerique 5a81dd2
Refactored blueprints_routes and blueprint_models for improved organi…
MaxNumerique 86d0a0c
Apply prepare changes
MaxNumerique 5195202
add shared var for both pytest.fixture
MaxNumerique 605b59e
removed try/catch
MaxNumerique e74b50f
Apply prepare changes
MaxNumerique 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,5 @@ __pycache__ | |
| .vscode | ||
| uploads | ||
| node_modules | ||
| schemas.json | ||
| schemas.json | ||
| tmp | ||
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
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 |
|---|---|---|
| @@ -1,30 +1,57 @@ | ||
| def test_model_mesh_components(client): | ||
| route = f"/models/vtm_component_indices" | ||
| get_full_data = lambda: {"id": "cube"} | ||
| json = get_full_data() | ||
| response = client.post(route, json=json) | ||
| assert response.status_code == 200 | ||
| import shutil | ||
| import os | ||
|
|
||
| uuid_dict = response.json["uuid_to_flat_index"] | ||
| assert isinstance(uuid_dict, dict) | ||
|
|
||
| indices = list(uuid_dict.values()) | ||
| indices.sort() | ||
| assert all(indices[i] > indices[i - 1] for i in range(1, len(indices))) | ||
| for uuid in uuid_dict.keys(): | ||
| assert isinstance(uuid, str) | ||
| def test_model_mesh_components(client, uuid_project_structure): | ||
| route = "/models/vtm_component_indices" | ||
| uuid_data = uuid_project_structure["uuid_data"] | ||
| data_path = uuid_project_structure["data_path"] | ||
|
|
||
| shutil.copy("./tests/data/cube.vtm", os.path.join(data_path, "viewable.vtm")) | ||
|
|
||
| def test_extract_brep_uuids(client): | ||
| original_path = client.application.config["DATA_FOLDER_PATH"] | ||
| client.application.config["DATA_FOLDER_PATH"] = uuid_project_structure["base_path"] | ||
BotellaA marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| try: | ||
| response = client.post(route, json={"id": uuid_data}) | ||
| assert response.status_code == 200 | ||
| uuid_dict = response.json["uuid_to_flat_index"] | ||
| assert isinstance(uuid_dict, dict) | ||
|
|
||
| indices = list(uuid_dict.values()) | ||
| indices.sort() | ||
| assert all(indices[i] > indices[i - 1] for i in range(1, len(indices))) | ||
| for uuid_key in uuid_dict.keys(): | ||
| assert isinstance(uuid_key, str) | ||
| finally: | ||
| client.application.config["DATA_FOLDER_PATH"] = original_path | ||
|
|
||
|
|
||
| def test_extract_brep_uuids(client, uuid_project_structure): | ||
| route = "/models/mesh_components" | ||
| json_data = {"filename": "cube.og_brep", "geode_object": "BRep"} | ||
| response = client.post(route, json=json_data) | ||
|
|
||
| assert response.status_code == 200 | ||
| uuid_dict = response.json["uuid_dict"] | ||
| assert isinstance(uuid_dict, dict) | ||
| expected_keys = {"Block", "Line", "Surface", "Corner"} | ||
| assert any(key in uuid_dict for key in expected_keys) | ||
| for key, value in uuid_dict.items(): | ||
| assert isinstance(value, list) | ||
| assert all(isinstance(v, str) for v in value) | ||
| uuid_data = uuid_project_structure["uuid_data"] | ||
| data_path = uuid_project_structure["data_path"] | ||
|
|
||
| shutil.copy("./tests/data/cube.og_brep", os.path.join(data_path, "cube.og_brep")) | ||
|
|
||
| original_path = client.application.config["DATA_FOLDER_PATH"] | ||
| client.application.config["DATA_FOLDER_PATH"] = uuid_project_structure["base_path"] | ||
|
|
||
| try: | ||
| json_data = { | ||
| "filename": "cube.og_brep", | ||
| "geode_object": "BRep", | ||
| "id": uuid_data, | ||
| } | ||
| response = client.post(route, json=json_data) | ||
| assert response.status_code == 200 | ||
|
|
||
| uuid_dict = response.json["uuid_dict"] | ||
| assert isinstance(uuid_dict, dict) | ||
| expected_keys = {"Block", "Line", "Surface", "Corner"} | ||
| assert any(key in uuid_dict for key in expected_keys) | ||
| for key, value in uuid_dict.items(): | ||
| assert isinstance(value, list) | ||
| assert all(isinstance(v, str) for v in value) | ||
| finally: | ||
| client.application.config["DATA_FOLDER_PATH"] = original_path | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.