OpenGeodeWeb-Back 1.3.0rc1__tar.gz → 1.3.0rc2__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-1.3.0rc1/src/OpenGeodeWeb_Back.egg-info → OpenGeodeWeb-Back-1.3.0rc2}/PKG-INFO +1 -1
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/pyproject.toml +1 -1
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +1 -1
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/opengeodeweb_back/geode_functions.py +31 -37
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/tests/test_functions.py +42 -11
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/LICENSE +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/README.md +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/requirements.txt +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/setup.cfg +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/OpenGeodeWeb_Back.egg-info/requires.txt +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/opengeodeweb_back/__init__.py +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/opengeodeweb_back/geode_objects.py +0 -0
- {OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/opengeodeweb_back/inspector_functions.py +0 -0
{OpenGeodeWeb-Back-1.3.0rc1/src/OpenGeodeWeb_Back.egg-info → OpenGeodeWeb-Back-1.3.0rc2}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.0rc2
|
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-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2/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: 1.3.
|
3
|
+
Version: 1.3.0rc2
|
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-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/opengeodeweb_back/geode_functions.py
RENAMED
@@ -110,55 +110,49 @@ def get_geode_object_output_extensions(geode_object: str):
|
|
110
110
|
return output_list
|
111
111
|
|
112
112
|
|
113
|
-
def list_input_extensions(
|
114
|
-
keys: list = [],
|
115
|
-
):
|
116
|
-
"""
|
117
|
-
Purpose:
|
118
|
-
Function that returns a list of all input extensions
|
119
|
-
Args:
|
120
|
-
keys -- Tells the function if we want the geode_objects that have a crs
|
121
|
-
Returns:
|
122
|
-
An ordered list of input file extensions
|
123
|
-
"""
|
113
|
+
def list_input_extensions(key: str = None):
|
124
114
|
extensions_list = []
|
125
|
-
|
126
115
|
for geode_object, value in objects_list().items():
|
127
|
-
if
|
128
|
-
|
129
|
-
if key
|
130
|
-
if
|
131
|
-
|
132
|
-
|
133
|
-
|
116
|
+
if key != None:
|
117
|
+
if key in value:
|
118
|
+
if type(value[key]) == bool:
|
119
|
+
if value[key] == True:
|
120
|
+
extensions_list += get_geode_object_input_extensions(
|
121
|
+
geode_object
|
122
|
+
)
|
134
123
|
else:
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
extensions_list = extensions_list + geode_object_input_extensions
|
124
|
+
extensions_list += get_geode_object_input_extensions(geode_object)
|
125
|
+
else:
|
126
|
+
extensions_list += get_geode_object_input_extensions(geode_object)
|
139
127
|
|
140
128
|
extensions_list = list(set(extensions_list))
|
141
129
|
extensions_list.sort()
|
142
130
|
return extensions_list
|
143
131
|
|
144
132
|
|
145
|
-
def
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
Returns:
|
152
|
-
An ordered list of object's names
|
153
|
-
"""
|
154
|
-
geode_objects_list = []
|
133
|
+
def has_creator(geode_object: str, extension: str):
|
134
|
+
geode_object_input_factory = get_input_factory(geode_object)
|
135
|
+
for input in geode_object_input_factory:
|
136
|
+
if input.has_creator(extension):
|
137
|
+
return True
|
138
|
+
return False
|
155
139
|
|
140
|
+
|
141
|
+
def list_geode_objects(extension: str, key: str = None):
|
142
|
+
geode_objects_list = []
|
156
143
|
for geode_object, value in objects_list().items():
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
144
|
+
if key != None:
|
145
|
+
if key in value:
|
146
|
+
if type(value[key]) == bool:
|
147
|
+
if value[key] == True:
|
148
|
+
if has_creator(geode_object, extension):
|
149
|
+
geode_objects_list.append(geode_object)
|
150
|
+
elif has_creator(geode_object, extension):
|
161
151
|
geode_objects_list.append(geode_object)
|
152
|
+
else:
|
153
|
+
if has_creator(geode_object, extension):
|
154
|
+
geode_objects_list.append(geode_object)
|
155
|
+
|
162
156
|
geode_objects_list.sort()
|
163
157
|
return geode_objects_list
|
164
158
|
|
@@ -71,7 +71,7 @@ def test_get_geode_object_output_extensions():
|
|
71
71
|
|
72
72
|
|
73
73
|
def test_list_input_extensions():
|
74
|
-
keys_array = [
|
74
|
+
keys_array = ["crs", "inspector", None]
|
75
75
|
for geode_object, value in geode_objects.objects_list().items():
|
76
76
|
for keys in keys_array:
|
77
77
|
input_extensions = geode_functions.list_input_extensions(keys)
|
@@ -79,18 +79,51 @@ def test_list_input_extensions():
|
|
79
79
|
|
80
80
|
|
81
81
|
def test_list_geode_objects():
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
82
|
+
test_list = [
|
83
|
+
{
|
84
|
+
"key": "crs",
|
85
|
+
"invalid_geode_objects": [
|
86
|
+
"Graph",
|
87
|
+
"RasterImage2D",
|
88
|
+
"RasterImage3D",
|
89
|
+
"VertexSet",
|
90
|
+
],
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"key": "inspector",
|
94
|
+
"invalid_geode_objects": [
|
95
|
+
"Graph",
|
96
|
+
"RasterImage2D",
|
97
|
+
"RasterImage3D",
|
98
|
+
"RasterImage2D",
|
99
|
+
"RasterImage3D",
|
100
|
+
"VertexSet",
|
101
|
+
],
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"key": None,
|
105
|
+
"invalid_geode_objects": [],
|
106
|
+
},
|
107
|
+
]
|
108
|
+
for test in test_list:
|
109
|
+
key = test["key"]
|
110
|
+
invalid_geode_objects = test["invalid_geode_objects"]
|
111
|
+
|
112
|
+
input_extensions = geode_functions.list_input_extensions(key)
|
113
|
+
for geode_object, value in geode_objects.objects_list().items():
|
114
|
+
for input_extension in input_extensions:
|
89
115
|
geode_objects_list = geode_functions.list_geode_objects(
|
90
|
-
input_extension,
|
116
|
+
input_extension, key
|
91
117
|
)
|
92
118
|
assert type(geode_objects_list) is list
|
93
119
|
|
120
|
+
if key != None:
|
121
|
+
assert len(geode_objects_list) > 0
|
122
|
+
for invalid_geode_object in invalid_geode_objects:
|
123
|
+
assert invalid_geode_object not in geode_objects_list
|
124
|
+
else:
|
125
|
+
assert len(geode_objects_list) >= 1
|
126
|
+
|
94
127
|
|
95
128
|
def test_get_versions():
|
96
129
|
list_packages = [
|
@@ -107,7 +140,5 @@ def test_get_versions():
|
|
107
140
|
|
108
141
|
def test_get_extension_from_filename():
|
109
142
|
extension = geode_functions.get_extension_from_filename("test.toto")
|
110
|
-
print(extension)
|
111
143
|
assert type(extension) is str
|
112
|
-
print()
|
113
144
|
assert extension.count(".") == 0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{OpenGeodeWeb-Back-1.3.0rc1 → OpenGeodeWeb-Back-1.3.0rc2}/src/opengeodeweb_back/geode_objects.py
RENAMED
File without changes
|
File without changes
|