OpenGeodeWeb-Back 3.0.0rc5__tar.gz → 3.0.0rc7__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-3.0.0rc5/src/OpenGeodeWeb_Back.egg-info → OpenGeodeWeb-Back-3.0.0rc7}/PKG-INFO +5 -5
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/pyproject.toml +1 -1
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/requirements.txt +5 -9
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +5 -5
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/OpenGeodeWeb_Back.egg-info/requires.txt +4 -4
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/opengeodeweb_back/geode_functions.py +36 -18
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/tests/test_functions.py +75 -54
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/LICENSE +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/README.md +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/setup.cfg +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/opengeodeweb_back/__init__.py +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/opengeodeweb_back/geode_objects.py +0 -0
- {OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/opengeodeweb_back/inspector_functions.py +0 -0
{OpenGeodeWeb-Back-3.0.0rc5/src/OpenGeodeWeb_Back.egg-info → OpenGeodeWeb-Back-3.0.0rc7}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.0rc7
|
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
|
@@ -17,7 +17,7 @@ Requires-Dist: blinker==1.7.0
|
|
17
17
|
Requires-Dist: click==8.1.7
|
18
18
|
Requires-Dist: colorama==0.4.6
|
19
19
|
Requires-Dist: flask[async]==3.0.0
|
20
|
-
Requires-Dist: geode-common==30.0.
|
20
|
+
Requires-Dist: geode-common==30.0.4
|
21
21
|
Requires-Dist: geode-viewables==2.1.7
|
22
22
|
Requires-Dist: importlib-metadata==7.0.0
|
23
23
|
Requires-Dist: itsdangerous==2.1.2
|
@@ -28,11 +28,11 @@ Requires-Dist: markupsafe==2.1.3
|
|
28
28
|
Requires-Dist: opengeode-core==14.10.2
|
29
29
|
Requires-Dist: opengeode-geosciences==7.3.2
|
30
30
|
Requires-Dist: opengeode-geosciencesio==4.5.4
|
31
|
-
Requires-Dist: opengeode-inspector==4.0.
|
31
|
+
Requires-Dist: opengeode-inspector==4.0.4
|
32
32
|
Requires-Dist: opengeode-io==6.2.4
|
33
|
-
Requires-Dist: referencing==0.
|
33
|
+
Requires-Dist: referencing==0.32.0
|
34
34
|
Requires-Dist: rpds-py==0.13.2
|
35
|
-
Requires-Dist: typing-extensions==4.
|
35
|
+
Requires-Dist: typing-extensions==4.9.0
|
36
36
|
Requires-Dist: werkzeug==3.0.1
|
37
37
|
Requires-Dist: zipp==3.17.0
|
38
38
|
|
@@ -18,7 +18,7 @@ colorama==0.4.6
|
|
18
18
|
# via click
|
19
19
|
flask[async]==3.0.0
|
20
20
|
# via -r requirements.in
|
21
|
-
geode-common==30.0.
|
21
|
+
geode-common==30.0.4
|
22
22
|
# via geode-viewables
|
23
23
|
geode-viewables==2.1.7
|
24
24
|
# via -r requirements.in
|
@@ -50,19 +50,15 @@ opengeode-geosciences==7.3.2
|
|
50
50
|
# -r requirements.in
|
51
51
|
# geode-viewables
|
52
52
|
# opengeode-geosciencesio
|
53
|
-
# opengeode-inspector
|
54
53
|
opengeode-geosciencesio==4.5.4
|
55
|
-
# via
|
56
|
-
|
57
|
-
# opengeode-inspector
|
58
|
-
opengeode-inspector==4.0.3
|
54
|
+
# via -r requirements.in
|
55
|
+
opengeode-inspector==4.0.4
|
59
56
|
# via -r requirements.in
|
60
57
|
opengeode-io==6.2.4
|
61
58
|
# via
|
62
59
|
# -r requirements.in
|
63
60
|
# geode-viewables
|
64
|
-
|
65
|
-
referencing==0.31.1
|
61
|
+
referencing==0.32.0
|
66
62
|
# via
|
67
63
|
# jsonschema
|
68
64
|
# jsonschema-specifications
|
@@ -70,7 +66,7 @@ rpds-py==0.13.2
|
|
70
66
|
# via
|
71
67
|
# jsonschema
|
72
68
|
# referencing
|
73
|
-
typing-extensions==4.
|
69
|
+
typing-extensions==4.9.0
|
74
70
|
# via asgiref
|
75
71
|
werkzeug==3.0.1
|
76
72
|
# via
|
{OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.0rc7
|
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
|
@@ -17,7 +17,7 @@ Requires-Dist: blinker==1.7.0
|
|
17
17
|
Requires-Dist: click==8.1.7
|
18
18
|
Requires-Dist: colorama==0.4.6
|
19
19
|
Requires-Dist: flask[async]==3.0.0
|
20
|
-
Requires-Dist: geode-common==30.0.
|
20
|
+
Requires-Dist: geode-common==30.0.4
|
21
21
|
Requires-Dist: geode-viewables==2.1.7
|
22
22
|
Requires-Dist: importlib-metadata==7.0.0
|
23
23
|
Requires-Dist: itsdangerous==2.1.2
|
@@ -28,11 +28,11 @@ Requires-Dist: markupsafe==2.1.3
|
|
28
28
|
Requires-Dist: opengeode-core==14.10.2
|
29
29
|
Requires-Dist: opengeode-geosciences==7.3.2
|
30
30
|
Requires-Dist: opengeode-geosciencesio==4.5.4
|
31
|
-
Requires-Dist: opengeode-inspector==4.0.
|
31
|
+
Requires-Dist: opengeode-inspector==4.0.4
|
32
32
|
Requires-Dist: opengeode-io==6.2.4
|
33
|
-
Requires-Dist: referencing==0.
|
33
|
+
Requires-Dist: referencing==0.32.0
|
34
34
|
Requires-Dist: rpds-py==0.13.2
|
35
|
-
Requires-Dist: typing-extensions==4.
|
35
|
+
Requires-Dist: typing-extensions==4.9.0
|
36
36
|
Requires-Dist: werkzeug==3.0.1
|
37
37
|
Requires-Dist: zipp==3.17.0
|
38
38
|
|
@@ -4,7 +4,7 @@ blinker==1.7.0
|
|
4
4
|
click==8.1.7
|
5
5
|
colorama==0.4.6
|
6
6
|
flask[async]==3.0.0
|
7
|
-
geode-common==30.0.
|
7
|
+
geode-common==30.0.4
|
8
8
|
geode-viewables==2.1.7
|
9
9
|
importlib-metadata==7.0.0
|
10
10
|
itsdangerous==2.1.2
|
@@ -15,10 +15,10 @@ markupsafe==2.1.3
|
|
15
15
|
opengeode-core==14.10.2
|
16
16
|
opengeode-geosciences==7.3.2
|
17
17
|
opengeode-geosciencesio==4.5.4
|
18
|
-
opengeode-inspector==4.0.
|
18
|
+
opengeode-inspector==4.0.4
|
19
19
|
opengeode-io==6.2.4
|
20
|
-
referencing==0.
|
20
|
+
referencing==0.32.0
|
21
21
|
rpds-py==0.13.2
|
22
|
-
typing-extensions==4.
|
22
|
+
typing-extensions==4.9.0
|
23
23
|
werkzeug==3.0.1
|
24
24
|
zipp==3.17.0
|
{OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/opengeodeweb_back/geode_functions.py
RENAMED
@@ -151,27 +151,20 @@ def list_geode_objects(extension: str, key: str = None):
|
|
151
151
|
|
152
152
|
|
153
153
|
def geode_objects_output_extensions(geode_object: str, data):
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
output = geode_object_output_extensions(geode_object)
|
159
|
-
|
160
|
-
extension_saveable_array = []
|
161
|
-
for output_extension in output:
|
154
|
+
geode_objects_output_extensions_dict = {}
|
155
|
+
output_extensions = geode_object_output_extensions(geode_object)
|
156
|
+
extensions_dict = {}
|
157
|
+
for output_extension in output_extensions:
|
162
158
|
bool_is_saveable = is_saveable(geode_object, data, f"test.{output_extension}")
|
163
|
-
|
164
|
-
|
165
|
-
)
|
166
|
-
|
167
|
-
geode_object_dict["outputs"] = extension_saveable_array
|
168
|
-
|
169
|
-
return_list.append(geode_object_dict)
|
159
|
+
extensions_dict[output_extension] = {"is_saveable": bool_is_saveable}
|
160
|
+
geode_objects_output_extensions_dict[geode_object] = extensions_dict
|
170
161
|
|
171
162
|
if "parent" in geode_object_value(geode_object).keys():
|
172
|
-
|
173
|
-
|
174
|
-
|
163
|
+
parent_geode_object = geode_object_value(geode_object)["parent"]
|
164
|
+
geode_objects_output_extensions_dict.update(
|
165
|
+
geode_objects_output_extensions(parent_geode_object, data)
|
166
|
+
)
|
167
|
+
return geode_objects_output_extensions_dict
|
175
168
|
|
176
169
|
|
177
170
|
def versions(list_packages: list):
|
@@ -303,3 +296,28 @@ def create_coordinate_system(
|
|
303
296
|
create_crs(
|
304
297
|
geode_object, data, name, input_coordiante_system, output_coordiante_system
|
305
298
|
)
|
299
|
+
|
300
|
+
|
301
|
+
def send_file(upload_folder, saved_files, new_file_name):
|
302
|
+
if len(saved_files) == 1:
|
303
|
+
mimetype = "application/octet-binary"
|
304
|
+
else:
|
305
|
+
mimetype = "application/zip"
|
306
|
+
new_file_name = strict_file_name + ".zip"
|
307
|
+
with zipfile.ZipFile(os.path.join(upload_folder, new_file_name), "w") as zipObj:
|
308
|
+
for saved_file_path in saved_files:
|
309
|
+
zipObj.write(
|
310
|
+
saved_file_path,
|
311
|
+
os.path.basename(saved_file_path),
|
312
|
+
)
|
313
|
+
|
314
|
+
response = flask.send_from_directory(
|
315
|
+
directory=upload_folder,
|
316
|
+
path=new_file_name,
|
317
|
+
as_attachment=True,
|
318
|
+
mimetype=mimetype,
|
319
|
+
)
|
320
|
+
response.headers["new-file-name"] = new_file_name
|
321
|
+
response.headers["Access-Control-Expose-Headers"] = "new-file-name"
|
322
|
+
|
323
|
+
return response
|
@@ -72,41 +72,44 @@ def test_load():
|
|
72
72
|
)
|
73
73
|
|
74
74
|
data = geode_functions.load(geode_object, file_apsolute_path)
|
75
|
+
|
76
|
+
if "save_viewable" in value:
|
77
|
+
uu_id = str(uuid.uuid4()).replace("-", "")
|
78
|
+
viewable_file_path = geode_functions.save_viewable(
|
79
|
+
geode_object,
|
80
|
+
data,
|
81
|
+
os.path.abspath(f"/output"),
|
82
|
+
uu_id,
|
83
|
+
)
|
84
|
+
os.remove(viewable_file_path)
|
85
|
+
geode_objects_and_output_extensions = (
|
86
|
+
geode_functions.geode_objects_output_extensions(geode_object, data)
|
87
|
+
)
|
88
|
+
assert type(geode_objects_and_output_extensions) is dict
|
75
89
|
for (
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
):
|
80
|
-
output_geode_object = geode_object_and_output_extensions[
|
81
|
-
"geode_object"
|
82
|
-
]
|
90
|
+
output_geode_object,
|
91
|
+
output_geode_object_value,
|
92
|
+
) in geode_objects_and_output_extensions.items():
|
83
93
|
print(f"\t\t{output_geode_object=}")
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
for output_extension in output_extensions:
|
94
|
+
for (
|
95
|
+
output_extension,
|
96
|
+
output_extension_value,
|
97
|
+
) in output_geode_object_value.items():
|
89
98
|
print(f"\t\t\t{output_extension=}")
|
90
99
|
uu_id = str(uuid.uuid4()).replace("-", "")
|
91
100
|
filename = f"{uu_id}.{output_extension}"
|
92
|
-
if geode_functions.is_saveable(
|
93
|
-
|
94
|
-
|
101
|
+
if geode_functions.is_saveable(
|
102
|
+
output_geode_object, data, filename
|
103
|
+
):
|
104
|
+
saved_files = geode_functions.save(
|
105
|
+
output_geode_object,
|
95
106
|
data,
|
96
|
-
os.path.abspath(f"output"),
|
97
|
-
|
107
|
+
os.path.abspath(f"/output"),
|
108
|
+
filename,
|
98
109
|
)
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
viewable_file_path = geode_functions.save_viewable(
|
103
|
-
geode_object,
|
104
|
-
data,
|
105
|
-
os.path.abspath(f"output"),
|
106
|
-
uu_id,
|
107
|
-
)
|
108
|
-
|
109
|
-
os.remove(viewable_file_path)
|
110
|
+
assert type(saved_files) is list
|
111
|
+
for saved_file in saved_files:
|
112
|
+
os.remove(saved_file)
|
110
113
|
|
111
114
|
|
112
115
|
def test_is_model():
|
@@ -137,10 +140,39 @@ def test_geode_object_input_extensions():
|
|
137
140
|
|
138
141
|
def test_geode_object_output_extensions():
|
139
142
|
for geode_object, value in geode_objects.geode_objects_dict().items():
|
140
|
-
|
141
|
-
|
142
|
-
for
|
143
|
-
|
143
|
+
print(f"\n{geode_object=}")
|
144
|
+
input_extensions = geode_functions.geode_object_input_extensions(geode_object)
|
145
|
+
for input_extension in input_extensions:
|
146
|
+
if geode_object != "RegularGrid3D" and input_extension != "vti":
|
147
|
+
print(f"\t{input_extension=}")
|
148
|
+
missing_files = geode_functions.missing_files(
|
149
|
+
geode_object, f"tests/data/test.{input_extension}"
|
150
|
+
)
|
151
|
+
has_missing_files = missing_files.has_missing_files()
|
152
|
+
if has_missing_files:
|
153
|
+
mandatory_files = missing_files.mandatory_files
|
154
|
+
print(f"\t\t{mandatory_files=}")
|
155
|
+
additional_files = missing_files.additional_files
|
156
|
+
print(f"\t\t{additional_files=}")
|
157
|
+
file_apsolute_path = os.path.abspath(
|
158
|
+
f"tests/data/test.{input_extension}"
|
159
|
+
)
|
160
|
+
|
161
|
+
data = geode_functions.load(geode_object, file_apsolute_path)
|
162
|
+
geode_objets_and_output_extensions = (
|
163
|
+
geode_functions.geode_objects_output_extensions(geode_object, data)
|
164
|
+
)
|
165
|
+
assert type(geode_objets_and_output_extensions) is dict
|
166
|
+
for (
|
167
|
+
output_geode_object,
|
168
|
+
output_geode_object_value,
|
169
|
+
) in geode_objets_and_output_extensions.items():
|
170
|
+
for (
|
171
|
+
output_extension,
|
172
|
+
output_extension_value,
|
173
|
+
) in output_geode_object_value.items():
|
174
|
+
assert type(output_extension) is str
|
175
|
+
assert type(output_extension_value["is_saveable"]) is bool
|
144
176
|
|
145
177
|
|
146
178
|
def test_list_input_extensions():
|
@@ -168,8 +200,6 @@ def test_list_geode_objects():
|
|
168
200
|
"Graph",
|
169
201
|
"RasterImage2D",
|
170
202
|
"RasterImage3D",
|
171
|
-
"RasterImage2D",
|
172
|
-
"RasterImage3D",
|
173
203
|
"VertexSet",
|
174
204
|
],
|
175
205
|
},
|
@@ -202,32 +232,23 @@ def test_geode_objects_output_extensions():
|
|
202
232
|
for geode_object, value in geode_objects.geode_objects_dict().items():
|
203
233
|
input_extensions = geode_functions.geode_object_input_extensions(geode_object)
|
204
234
|
for input_extension in input_extensions:
|
205
|
-
if
|
235
|
+
if geode_object != "RegularGrid3D" and input_extension != "vti":
|
206
236
|
data = geode_functions.load(
|
207
237
|
geode_object, f"tests/data/test.{input_extension}"
|
208
238
|
)
|
209
|
-
|
239
|
+
geode_objects_and_output_extensions = (
|
210
240
|
geode_functions.geode_objects_output_extensions(geode_object, data)
|
211
241
|
)
|
212
|
-
|
213
|
-
assert type(geode_objects_and_output_extensions_list) is list
|
242
|
+
assert type(geode_objects_and_output_extensions) is dict
|
214
243
|
for (
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
assert "outputs" in geode_object_and_output_extensions
|
224
|
-
assert type(geode_object_and_output_extensions["outputs"]) is list
|
225
|
-
outputs = geode_object_and_output_extensions["outputs"]
|
226
|
-
for output in outputs:
|
227
|
-
assert "extension" in output
|
228
|
-
assert type(output["extension"]) is str
|
229
|
-
assert "is_saveable" in output
|
230
|
-
assert type(output["is_saveable"]) is bool
|
244
|
+
output_geode_object,
|
245
|
+
output_geode_object_value,
|
246
|
+
) in geode_objects_and_output_extensions.items():
|
247
|
+
for (
|
248
|
+
output_extension,
|
249
|
+
output_extension_value,
|
250
|
+
) in output_geode_object_value.items():
|
251
|
+
assert type(output_extension_value["is_saveable"]) is bool
|
231
252
|
|
232
253
|
|
233
254
|
def test_versions():
|
File without changes
|
File without changes
|
File without changes
|
{OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{OpenGeodeWeb-Back-3.0.0rc5 → OpenGeodeWeb-Back-3.0.0rc7}/src/opengeodeweb_back/geode_objects.py
RENAMED
File without changes
|
File without changes
|