Skip to content

Commit b0c91a2

Browse files
committed
Merge branch 'feat/folder_path' of https://github.com/Geode-solutions/OpenGeodeWeb-Back into feat/folder_path
2 parents eddbc9c + 1ccfa9b commit b0c91a2

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

src/opengeodeweb_back/app_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ class DevConfig(Config):
3232
SECONDS_BETWEEN_SHUTDOWNS = "10"
3333
DATA_FOLDER_PATH = "./data/"
3434

35-
TEST_ID = "1"
35+
36+
TEST_ID = "1"

src/opengeodeweb_back/routes/blueprint_routes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ def missing_files():
126126
flask.request.json["input_geode_object"],
127127
geode_functions.upload_file_path(
128128
UPLOAD_FOLDER, flask.request.json["filename"]),
129+
geode_functions.build_upload_file_path(
130+
UPLOAD_FOLDER, flask.request.json["filename"]
131+
),
129132
)
130133
has_missing_files = missing_files.has_missing_files()
131134

@@ -219,6 +222,9 @@ def geode_objects_and_output_extensions():
219222
flask.request.json["input_geode_object"],
220223
geode_functions.upload_file_path(
221224
UPLOAD_FOLDER, flask.request.json["filename"]),
225+
geode_functions.build_upload_file_path(
226+
UPLOAD_FOLDER, flask.request.json["filename"]
227+
),
222228
)
223229
geode_objects_and_output_extensions = (
224230
geode_functions.geode_objects_output_extensions(

src/opengeodeweb_back/routes/models/blueprint_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def uuid_to_flat_index():
3535
current_index += 1
3636
return flask.make_response({"uuid_to_flat_index": uuid_to_flat_index}, 200)
3737

38+
3839
def extract_model_uuids(model):
3940
mesh_components = model.mesh_components()
4041
uuid_dict = {}

tests/test_models_routes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import os
22
import shutil
3+
4+
35
def test_model_mesh_components(client, test_id):
46
route = "/models/vtm_component_indices"
57

6-
data_path = geode_functions.data_file_path(
7-
{"id": test_id},
8-
"viewable.vtm"
9-
)
8+
data_path = geode_functions.data_file_path({"id": test_id}, "viewable.vtm")
109
os.makedirs(os.path.dirname(data_path), exist_ok=True)
1110
shutil.copy("./tests/data/cube.vtm", data_path)
1211

@@ -28,10 +27,7 @@ def test_extract_brep_uuids(client, test_id):
2827
brep_filename = "cube.og_brep"
2928
json_data = {"id": test_id, "geode_object": "BRep", "filename": brep_filename}
3029

31-
data_path = geode_functions.data_file_path(
32-
json_data,
33-
brep_filename
34-
)
30+
data_path = geode_functions.data_file_path(json_data, brep_filename)
3531
os.makedirs(os.path.dirname(data_path), exist_ok=True)
3632
shutil.copy(f"./tests/data/{brep_filename}", data_path)
3733

0 commit comments

Comments
 (0)