Skip to content

Commit f420217

Browse files
Merge branch 'geode-objects-redesign' of https://github.com/Geode-solutions/OpenGeodeWeb-Back into geode-objects-redesign
2 parents 5919746 + 87c93f1 commit f420217

File tree

5 files changed

+38
-52
lines changed

5 files changed

+38
-52
lines changed

requirements.txt

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile --output-file=./requirements.txt ./requirements-internal.in ./requirements.in
5+
# pip-compile --output-file=./requirements.txt ./requirements.in
66
#
7-
asgiref==3.11.0
7+
asgiref>=3
88
# via flask
9-
blinker==1.9.0
9+
blinker>=1
1010
# via flask
11-
click==8.3.1
11+
click>=8
1212
# via flask
13-
dataclasses-json==0.6.7
14-
# via opengeodeweb-microservice
15-
fastjsonschema==2.21.1
16-
# via opengeodeweb-microservice
17-
flask[async]==3.1.2
13+
flask[async]>=3
1814
# via
1915
# -r requirements.in
2016
# flask-cors
@@ -26,27 +22,15 @@ geode-common==33.11.3
2622
# geode-viewables
2723
geode-viewables==3.3.2
2824
# via -r requirements.in
29-
greenlet==3.2.4
30-
# via
31-
# opengeodeweb-microservice
32-
# sqlalchemy
33-
itsdangerous==2.2.0
25+
itsdangerous>=2
3426
# via flask
35-
jinja2==3.1.6
27+
jinja2>=3
3628
# via flask
37-
markupsafe==3.0.3
29+
markupsafe>=3
3830
# via
3931
# flask
4032
# jinja2
4133
# werkzeug
42-
marshmallow==3.26.1
43-
# via
44-
# dataclasses-json
45-
# opengeodeweb-microservice
46-
mypy-extensions==1.1.0
47-
# via
48-
# opengeodeweb-microservice
49-
# typing-inspect
5034
opengeode-core==15.30.4
5135
# via
5236
# -r requirements.in
@@ -70,25 +54,9 @@ opengeode-io==7.4.6
7054
# -r requirements.in
7155
# geode-viewables
7256
# opengeode-geosciencesio
73-
opengeodeweb-microservice==1.0.9
74-
# via -r requirements-internal.in
75-
packaging==25.0
76-
# via
77-
# marshmallow
78-
# opengeodeweb-microservice
79-
sqlalchemy==2.0.44
80-
# via opengeodeweb-microservice
81-
typing-extensions==4.15.0
82-
# via
83-
# opengeodeweb-microservice
84-
# sqlalchemy
85-
# typing-inspect
86-
typing-inspect==0.9.0
87-
# via
88-
# dataclasses-json
89-
# opengeodeweb-microservice
9057
werkzeug==3.1.2
9158
# via
9259
# -r requirements.in
9360
# flask
9461
# flask-cors
62+

src/opengeodeweb_back/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535

3636

3737
@app.before_request
38-
def before_request() -> flask.Response|None:
38+
def before_request() -> flask.Response | None:
3939
if flask.request.method == "OPTIONS":
4040
response = flask.make_response()
41-
response.headers['Access-Control-Allow-Methods'] = 'GET,POST,PUT,DELETE,OPTIONS'
41+
response.headers["Access-Control-Allow-Methods"] = "GET,POST,PUT,DELETE,OPTIONS"
4242
return response
4343
utils_functions.before_request(flask.current_app)
4444
return None

src/opengeodeweb_back/routes/blueprint_routes.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def upload_file() -> flask.Response:
7272
methods=schemas_dict["allowed_objects"]["methods"],
7373
)
7474
def allowed_objects() -> flask.Response:
75-
json_data = utils_functions.validate_request(flask.request, schemas_dict["allowed_objects"])
75+
json_data = utils_functions.validate_request(
76+
flask.request, schemas_dict["allowed_objects"]
77+
)
7678
params = schemas.AllowedObjects.from_dict(json_data)
7779
file_absolute_path = geode_functions.upload_file_path(params.filename)
7880
file_extension = utils_functions.extension_from_filename(
@@ -96,7 +98,9 @@ def allowed_objects() -> flask.Response:
9698
methods=schemas_dict["missing_files"]["methods"],
9799
)
98100
def missing_files() -> flask.Response:
99-
json_data = utils_functions.validate_request(flask.request, schemas_dict["missing_files"])
101+
json_data = utils_functions.validate_request(
102+
flask.request, schemas_dict["missing_files"]
103+
)
100104
params = schemas.MissingFiles.from_dict(json_data)
101105
file_path = geode_functions.upload_file_path(params.filename)
102106
geode_object = geode_functions.geode_object_from_string(params.geode_object_type)
@@ -158,7 +162,9 @@ def crs_converter_geographic_coordinate_systems() -> flask.Response:
158162
methods=schemas_dict["inspect_file"]["methods"],
159163
)
160164
def inspect_file() -> flask.Response:
161-
json_data = utils_functions.validate_request(flask.request, schemas_dict["inspect_file"])
165+
json_data = utils_functions.validate_request(
166+
flask.request, schemas_dict["inspect_file"]
167+
)
162168
params = schemas.InspectFile.from_dict(json_data)
163169
file_path = geode_functions.upload_file_path(params.filename)
164170
geode_object = geode_functions.geode_object_from_string(
@@ -224,7 +230,9 @@ def geode_objects_and_output_extensions() -> flask.Response:
224230
methods=schemas_dict["save_viewable_file"]["methods"],
225231
)
226232
def save_viewable_file() -> flask.Response:
227-
json_data = utils_functions.validate_request(flask.request, schemas_dict["save_viewable_file"])
233+
json_data = utils_functions.validate_request(
234+
flask.request, schemas_dict["save_viewable_file"]
235+
)
228236
params = schemas.SaveViewableFile.from_dict(json_data)
229237
return flask.make_response(
230238
utils_functions.generate_native_viewable_and_light_viewable_from_file(
@@ -240,7 +248,9 @@ def save_viewable_file() -> flask.Response:
240248
methods=schemas_dict["texture_coordinates"]["methods"],
241249
)
242250
def texture_coordinates() -> flask.Response:
243-
json_data = utils_functions.validate_request(flask.request, schemas_dict["texture_coordinates"])
251+
json_data = utils_functions.validate_request(
252+
flask.request, schemas_dict["texture_coordinates"]
253+
)
244254
params = schemas.TextureCoordinates.from_dict(json_data)
245255
geode_object = geode_functions.load_geode_object(params.id)
246256
if not isinstance(geode_object, GeodeSurfaceMesh2D | GeodeSurfaceMesh3D):
@@ -355,7 +365,9 @@ def kill() -> flask.Response:
355365
methods=schemas_dict["export_project"]["methods"],
356366
)
357367
def export_project() -> flask.Response:
358-
json_data = utils_functions.validate_request(flask.request, schemas_dict["export_project"])
368+
json_data = utils_functions.validate_request(
369+
flask.request, schemas_dict["export_project"]
370+
)
359371
params = schemas.ExportProject.from_dict(json_data)
360372

361373
project_folder: str = flask.current_app.config["DATA_FOLDER_PATH"]

src/opengeodeweb_back/routes/create/blueprint_create.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
)
2323
def create_point() -> flask.Response:
2424
"""Endpoint to create a single point in 3D space."""
25-
json_data = utils_functions.validate_request(flask.request, schemas_dict["create_point"])
25+
json_data = utils_functions.validate_request(
26+
flask.request, schemas_dict["create_point"]
27+
)
2628
params = schemas.CreatePoint.from_dict(json_data)
2729

2830
# Create the point
@@ -43,7 +45,9 @@ def create_point() -> flask.Response:
4345
)
4446
def create_aoi() -> flask.Response:
4547
"""Endpoint to create an Area of Interest (AOI) as an EdgedCurve3D."""
46-
json_data = utils_functions.validate_request(flask.request, schemas_dict["create_aoi"])
48+
json_data = utils_functions.validate_request(
49+
flask.request, schemas_dict["create_aoi"]
50+
)
4751
params = schemas.CreateAoi.from_dict(json_data)
4852

4953
# Create the edged curve

src/opengeodeweb_back/routes/models/blueprint_models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def uuid_to_flat_index() -> flask.Response:
3939
methods=schemas_dict["mesh_components"]["methods"],
4040
)
4141
def extract_uuids_endpoint() -> flask.Response:
42-
json_data = utils_functions.validate_request(flask.request, schemas_dict["mesh_components"])
42+
json_data = utils_functions.validate_request(
43+
flask.request, schemas_dict["mesh_components"]
44+
)
4345
params = schemas.MeshComponents.from_dict(json_data)
4446
model = geode_functions.load_geode_object(params.id)
4547
if not isinstance(model, GeodeModel):

0 commit comments

Comments
 (0)