Skip to content

Commit 5eeced4

Browse files
Apply prepare changes
1 parent c53d028 commit 5eeced4

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ werkzeug==3.1.2
6060
# flask
6161
# flask-cors
6262

63-
opengeodeweb-microservice==1.*,>=1.0.12

src/opengeodeweb_back/routes/models/blueprint_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
routes = flask.Blueprint("models", __name__, url_prefix="/models")
1111
schemas_dict = get_schemas_dict(os.path.join(os.path.dirname(__file__), "schemas"))
1212

13+
1314
@routes.route(
1415
schemas_dict["mesh_components"]["route"],
1516
methods=schemas_dict["mesh_components"]["methods"],
@@ -23,7 +24,6 @@ def mesh_components() -> flask.Response:
2324
if not isinstance(model, GeodeModel):
2425
flask.abort(400, f"{params.id} is not a GeodeModel")
2526

26-
2727
vtm_file_path = geode_functions.data_file_path(params.id, "viewable.vtm")
2828
tree = ET.parse(vtm_file_path)
2929
root = tree.find("vtkMultiBlockDataSet")
@@ -44,13 +44,13 @@ def mesh_components() -> flask.Response:
4444
geode_id = id.string()
4545
component_name = geode_id
4646
viewer_id = uuid_to_flat_index[geode_id]
47-
47+
4848
mesh_component_object = {
4949
"id": params.id,
5050
"viewer_id": viewer_id,
5151
"geode_id": geode_id,
5252
"name": component_name,
53-
"type": component_type
53+
"type": component_type,
5454
}
5555
mesh_components.append(mesh_component_object)
5656

tests/test_models_routes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_mesh_components(client: FlaskClient) -> None:
2626
route = "/opengeodeweb_back/models/mesh_components"
2727
brep_filename = os.path.join(data_dir, "cube.og_brep")
2828

29-
3029
response = client.post(route, json={"id": response.get_json()["id"]})
3130
assert response.status_code == 200
3231
assert "mesh_components" in response.get_json()
@@ -42,7 +41,6 @@ def test_mesh_components(client: FlaskClient) -> None:
4241
assert isinstance(mesh_component["type"], str)
4342

4443

45-
4644
def test_export_project_route(client: FlaskClient, tmp_path: Path) -> None:
4745
route = "/opengeodeweb_back/export_project"
4846
snapshot = {
@@ -162,6 +160,7 @@ def test_import_project_route(client: FlaskClient, tmp_path: Path) -> None:
162160

163161
client.application.config["DATA_FOLDER_PATH"] = original_data_folder
164162

163+
165164
def test_save_viewable_workflow_from_object(client: FlaskClient) -> None:
166165
route = "/opengeodeweb_back/create/point"
167166
point_data = {

tests/test_routes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ def get_full_data() -> test_utils.JsonData:
161161
test_utils.test_route_wrong_params(client, route, get_full_data)
162162

163163

164-
def test_save_viewable_file(client: FlaskClient, geode_object_type: str = "BRep", filename: str = "corbi.og_brep") -> TestResponse:
164+
def test_save_viewable_file(
165+
client: FlaskClient,
166+
geode_object_type: str = "BRep",
167+
filename: str = "corbi.og_brep",
168+
) -> TestResponse:
165169
test_upload_file(client, filename)
166170
route = f"/opengeodeweb_back/save_viewable_file"
167171

@@ -190,6 +194,7 @@ def get_full_data() -> test_utils.JsonData:
190194
test_utils.test_route_wrong_params(client, route, get_full_data)
191195
return response
192196

197+
193198
def test_texture_coordinates(client: FlaskClient, test_id: str) -> None:
194199
with client.application.app_context():
195200
file = os.path.join(data_dir, "hat.vtp")

0 commit comments

Comments
 (0)