Skip to content

Commit 7c57ae5

Browse files
BotellaAgithub-actions[bot]
authored andcommitted
Apply prepare changes
1 parent 0739348 commit 7c57ae5

File tree

3 files changed

+75
-18
lines changed

3 files changed

+75
-18
lines changed

requirements.txt

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
1-
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pip-compile --pre requirements.in
6+
#
7+
asgiref==3.9.1
8+
# via flask
9+
blinker==1.9.0
10+
# via flask
11+
click==8.2.1
12+
# via flask
13+
fastjsonschema==2.16.2
14+
# via -r requirements.in
15+
flask[async]==3.0.3
16+
# via
17+
# -r requirements.in
18+
# flask
19+
# flask-cors
20+
flask-cors==6.0.1
21+
# via -r requirements.in
22+
geode-common==33.8.8
23+
# via geode-viewables
24+
geode-viewables==3.1.4
25+
# via -r requirements.in
26+
itsdangerous==2.2.0
27+
# via flask
28+
jinja2==3.1.6
29+
# via flask
30+
markupsafe==3.0.2
31+
# via
32+
# jinja2
33+
# werkzeug
34+
opengeode-core==15.21.2
35+
# via
36+
# -r requirements.in
37+
# geode-common
38+
# geode-viewables
39+
# opengeode-geosciences
40+
# opengeode-geosciencesio
41+
# opengeode-inspector
42+
# opengeode-io
43+
opengeode-geosciences==9.0.0
44+
# via
45+
# -r requirements.in
46+
# geode-viewables
47+
# opengeode-geosciencesio
48+
opengeode-geosciencesio==5.4.2
49+
# via -r requirements.in
50+
opengeode-inspector==6.6.1
51+
# via -r requirements.in
52+
opengeode-io==7.2.1
53+
# via
54+
# -r requirements.in
55+
# geode-viewables
56+
# opengeode-geosciencesio
57+
werkzeug==3.0.3
58+
# via
59+
# -r requirements.in
60+
# flask
61+
# flask-cors

src/opengeodeweb_back/utils_functions.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,8 @@ def create_unique_data_folder() -> tuple[str, str]:
154154

155155

156156
def save_all_viewables_and_return_info(
157-
geode_object,
158-
data, generated_id,
159-
data_path,
160-
additional_files=None
161-
):
157+
geode_object, data, generated_id, data_path, additional_files=None
158+
):
162159
saved_native_file_path = geode_functions.save(
163160
geode_object,
164161
data,
@@ -185,30 +182,31 @@ def save_all_viewables_and_return_info(
185182
"input_files": additional_files or [],
186183
}
187184

188-
def generate_native_viewable_and_light_viewable_from_object(
189-
geode_object,
190-
data
191-
):
185+
186+
def generate_native_viewable_and_light_viewable_from_object(geode_object, data):
192187
generated_id, data_path = create_unique_data_folder()
193-
return save_all_viewables_and_return_info(geode_object, data, generated_id, data_path)
188+
return save_all_viewables_and_return_info(
189+
geode_object, data, generated_id, data_path
190+
)
194191

195192

196-
def generate_native_viewable_and_light_viewable_from_file(
197-
geode_object,
198-
input_filename
199-
):
193+
def generate_native_viewable_and_light_viewable_from_file(geode_object, input_filename):
200194
generated_id, data_path = create_unique_data_folder()
201195

202196
full_input_filename = geode_functions.upload_file_path(input_filename)
203-
copied_full_path = os.path.join(data_path, werkzeug.utils.secure_filename(input_filename))
197+
copied_full_path = os.path.join(
198+
data_path, werkzeug.utils.secure_filename(input_filename)
199+
)
204200
shutil.copy2(full_input_filename, copied_full_path)
205201

206202
additional_files_copied = []
207203
additional = geode_functions.additional_files(geode_object, full_input_filename)
208204
for additional_file in additional.mandatory_files + additional.optional_files:
209205
if additional_file.is_missing:
210206
continue
211-
source_path = os.path.join(os.path.dirname(full_input_filename), additional_file.filename)
207+
source_path = os.path.join(
208+
os.path.dirname(full_input_filename), additional_file.filename
209+
)
212210
if not os.path.exists(source_path):
213211
continue
214212
dest_path = os.path.join(data_path, additional_file.filename)

tests/test_utils_functions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ def test_create_unique_data_folder(client):
8585
assert not os.path.exists(data_path)
8686

8787

88-
8988
def test_save_all_viewables_and_return_info(client):
9089
app = client.application
9190
with app.app_context():

0 commit comments

Comments
 (0)