OpenGeodeWeb-Back 5.4.3__tar.gz → 5.5.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {opengeodeweb_back-5.4.3/src/OpenGeodeWeb_Back.egg-info → opengeodeweb_back-5.5.0rc1}/PKG-INFO +1 -1
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/pyproject.toml +1 -1
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +1 -1
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +1 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/blueprint_routes.py +36 -7
- opengeodeweb_back-5.5.0rc1/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json +15 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/tests/test_routes.py +60 -2
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/LICENSE +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/README.md +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/requirements.txt +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/setup.cfg +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/requires.txt +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/__init__.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/app_config.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/geode_functions.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/geode_objects.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/allowed_files.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/allowed_objects.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/create_point.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/inspect_file.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/missing_files.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/ping.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/save_viewable_file.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/upload_file.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/test_utils.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/utils_functions.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/tests/test_geode_functions.py +0 -0
- {opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/tests/test_utils_functions.py +0 -0
{opengeodeweb_back-5.4.3/src/OpenGeodeWeb_Back.egg-info → opengeodeweb_back-5.5.0rc1}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.5.0rc1
|
4
4
|
Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
|
5
5
|
Author-email: Geode-solutions <team-web@geode-solutions.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.5.0rc1
|
4
4
|
Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
|
5
5
|
Author-email: Geode-solutions <team-web@geode-solutions.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt
RENAMED
@@ -23,6 +23,7 @@ src/opengeodeweb_back/routes/schemas/inspect_file.json
|
|
23
23
|
src/opengeodeweb_back/routes/schemas/missing_files.json
|
24
24
|
src/opengeodeweb_back/routes/schemas/ping.json
|
25
25
|
src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json
|
26
|
+
src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json
|
26
27
|
src/opengeodeweb_back/routes/schemas/save_viewable_file.json
|
27
28
|
src/opengeodeweb_back/routes/schemas/upload_file.json
|
28
29
|
src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json
|
@@ -256,6 +256,7 @@ def save_viewable_file():
|
|
256
256
|
DATA_FOLDER_PATH,
|
257
257
|
generated_id + "." + native_extension,
|
258
258
|
)
|
259
|
+
os.remove(os.path.join(UPLOAD_FOLDER, secure_filename))
|
259
260
|
object_type = geode_functions.get_object_type(
|
260
261
|
flask.request.json["input_geode_object"]
|
261
262
|
)
|
@@ -316,11 +317,10 @@ with open(
|
|
316
317
|
methods=vertex_attribute_names_json["methods"],
|
317
318
|
)
|
318
319
|
def vertex_attribute_names():
|
319
|
-
|
320
|
-
UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
|
320
|
+
DATA_FOLDER_PATH = flask.current_app.config["DATA_FOLDER_PATH"]
|
321
321
|
utils_functions.validate_request(flask.request, vertex_attribute_names_json)
|
322
322
|
file_absolute_path = os.path.join(
|
323
|
-
|
323
|
+
DATA_FOLDER_PATH, werkzeug.utils.secure_filename(flask.request.json["filename"])
|
324
324
|
)
|
325
325
|
data = geode_functions.load(
|
326
326
|
flask.request.json["input_geode_object"], file_absolute_path
|
@@ -347,11 +347,10 @@ with open(
|
|
347
347
|
methods=polygon_attribute_names_json["methods"],
|
348
348
|
)
|
349
349
|
def polygon_attribute_names():
|
350
|
-
|
351
|
-
|
352
|
-
utils_functions.validate_request(flask.request, vertex_attribute_names_json)
|
350
|
+
DATA_FOLDER_PATH = flask.current_app.config["DATA_FOLDER_PATH"]
|
351
|
+
utils_functions.validate_request(flask.request, polygon_attribute_names_json)
|
353
352
|
file_absolute_path = os.path.join(
|
354
|
-
|
353
|
+
DATA_FOLDER_PATH, werkzeug.utils.secure_filename(flask.request.json["filename"])
|
355
354
|
)
|
356
355
|
data = geode_functions.load(
|
357
356
|
flask.request.json["input_geode_object"], file_absolute_path
|
@@ -366,6 +365,36 @@ def polygon_attribute_names():
|
|
366
365
|
)
|
367
366
|
|
368
367
|
|
368
|
+
with open(
|
369
|
+
os.path.join(schemas, "polyhedron_attribute_names.json"),
|
370
|
+
"r",
|
371
|
+
) as file:
|
372
|
+
polyhedron_attribute_names_json = json.load(file)
|
373
|
+
|
374
|
+
|
375
|
+
@routes.route(
|
376
|
+
polyhedron_attribute_names_json["route"],
|
377
|
+
methods=polyhedron_attribute_names_json["methods"],
|
378
|
+
)
|
379
|
+
def polyhedron_attribute_names():
|
380
|
+
DATA_FOLDER_PATH = flask.current_app.config["DATA_FOLDER_PATH"]
|
381
|
+
utils_functions.validate_request(flask.request, vertex_attribute_names_json)
|
382
|
+
file_absolute_path = os.path.join(
|
383
|
+
DATA_FOLDER_PATH, werkzeug.utils.secure_filename(flask.request.json["filename"])
|
384
|
+
)
|
385
|
+
data = geode_functions.load(
|
386
|
+
flask.request.json["input_geode_object"], file_absolute_path
|
387
|
+
)
|
388
|
+
polyhedron_attribute_names = data.polyhedron_attribute_manager().attribute_names()
|
389
|
+
|
390
|
+
return flask.make_response(
|
391
|
+
{
|
392
|
+
"polyhedron_attribute_names": polyhedron_attribute_names,
|
393
|
+
},
|
394
|
+
200,
|
395
|
+
)
|
396
|
+
|
397
|
+
|
369
398
|
with open(
|
370
399
|
os.path.join(schemas, "ping.json"),
|
371
400
|
"r",
|
opengeodeweb_back-5.5.0rc1/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"route": "/polyhedron_attribute_names",
|
3
|
+
"methods": ["POST"],
|
4
|
+
"type": "object",
|
5
|
+
"properties": {
|
6
|
+
"input_geode_object": {
|
7
|
+
"type": "string"
|
8
|
+
},
|
9
|
+
"filename": {
|
10
|
+
"type": "string"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
"required": ["input_geode_object", "filename"],
|
14
|
+
"additionalProperties": false
|
15
|
+
}
|
@@ -4,6 +4,7 @@ import os
|
|
4
4
|
|
5
5
|
# Third party imports
|
6
6
|
from werkzeug.datastructures import FileStorage
|
7
|
+
from flask import app
|
7
8
|
|
8
9
|
# Local application imports
|
9
10
|
from src.opengeodeweb_back import test_utils
|
@@ -174,12 +175,22 @@ def test_vertex_attribute_names(client):
|
|
174
175
|
)
|
175
176
|
assert response.status_code == 201
|
176
177
|
|
178
|
+
response = client.post(
|
179
|
+
"/save_viewable_file",
|
180
|
+
json={
|
181
|
+
"input_geode_object": "PolygonalSurface3D",
|
182
|
+
"filename": "vertex_attribute.vtp",
|
183
|
+
},
|
184
|
+
)
|
185
|
+
assert response.status_code == 200
|
186
|
+
native_file_name = response.json["native_file_name"]
|
187
|
+
|
177
188
|
route = f"/vertex_attribute_names"
|
178
189
|
|
179
190
|
def get_full_data():
|
180
191
|
return {
|
181
192
|
"input_geode_object": "PolygonalSurface3D",
|
182
|
-
"filename":
|
193
|
+
"filename": native_file_name,
|
183
194
|
}
|
184
195
|
|
185
196
|
# Normal test with filename 'vertex_attribute.vtp'
|
@@ -200,12 +211,22 @@ def test_polygon_attribute_names(client):
|
|
200
211
|
)
|
201
212
|
assert response.status_code == 201
|
202
213
|
|
214
|
+
response = client.post(
|
215
|
+
"/save_viewable_file",
|
216
|
+
json={
|
217
|
+
"input_geode_object": "PolygonalSurface3D",
|
218
|
+
"filename": "polygon_attribute.vtp",
|
219
|
+
},
|
220
|
+
)
|
221
|
+
assert response.status_code == 200
|
222
|
+
native_file_name = response.json["native_file_name"]
|
223
|
+
|
203
224
|
route = f"/polygon_attribute_names"
|
204
225
|
|
205
226
|
def get_full_data():
|
206
227
|
return {
|
207
228
|
"input_geode_object": "PolygonalSurface3D",
|
208
|
-
"filename":
|
229
|
+
"filename": native_file_name,
|
209
230
|
}
|
210
231
|
|
211
232
|
# Normal test with filename 'vertex_attribute.vtp'
|
@@ -220,6 +241,43 @@ def test_polygon_attribute_names(client):
|
|
220
241
|
test_utils.test_route_wrong_params(client, route, get_full_data)
|
221
242
|
|
222
243
|
|
244
|
+
def test_polyhedron_attribute_names(client):
|
245
|
+
response = client.put(
|
246
|
+
f"/upload_file",
|
247
|
+
data={"file": FileStorage(open("./tests/polyhedron_attribute.vtu", "rb"))},
|
248
|
+
)
|
249
|
+
assert response.status_code == 201
|
250
|
+
|
251
|
+
response = client.post(
|
252
|
+
"/save_viewable_file",
|
253
|
+
json={
|
254
|
+
"input_geode_object": "HybridSolid3D",
|
255
|
+
"filename": "polyhedron_attribute.vtu",
|
256
|
+
},
|
257
|
+
)
|
258
|
+
assert response.status_code == 200
|
259
|
+
native_file_name = response.json["native_file_name"]
|
260
|
+
|
261
|
+
route = f"/polyhedron_attribute_names"
|
262
|
+
|
263
|
+
def get_full_data():
|
264
|
+
return {
|
265
|
+
"input_geode_object": "HybridSolid3D",
|
266
|
+
"filename": native_file_name,
|
267
|
+
}
|
268
|
+
|
269
|
+
# Normal test with filename 'vertex_attribute.vtp'
|
270
|
+
response = client.post(route, json=get_full_data())
|
271
|
+
assert response.status_code == 200
|
272
|
+
polygon_attribute_names = response.json["polyhedron_attribute_names"]
|
273
|
+
assert type(polygon_attribute_names) is list
|
274
|
+
for polygon_attribute_name in polygon_attribute_names:
|
275
|
+
assert type(polygon_attribute_name) is str
|
276
|
+
|
277
|
+
# Test all params
|
278
|
+
test_utils.test_route_wrong_params(client, route, get_full_data)
|
279
|
+
|
280
|
+
|
223
281
|
def test_create_point(client):
|
224
282
|
route = f"/create_point"
|
225
283
|
get_full_data = lambda: {"x": 1, "y": 2, "z": 3}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/requires.txt
RENAMED
File without changes
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/OpenGeodeWeb_Back.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/geode_functions.py
RENAMED
File without changes
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/geode_objects.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{opengeodeweb_back-5.4.3 → opengeodeweb_back-5.5.0rc1}/src/opengeodeweb_back/utils_functions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|