OpenGeodeWeb-Back 1.3.0rc1__py3-none-any.whl → 1.3.0rc2__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 1.3.0rc1
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
@@ -0,0 +1,9 @@
1
+ opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ opengeodeweb_back/geode_functions.py,sha256=hFbJ1Lslc2y4FAM1ss3Fihb4kliguc67TCgyl-k5Aq0,9326
3
+ opengeodeweb_back/geode_objects.py,sha256=vwlQg8dId0vLhR12mKME6OoEaDr9E4ShDXM59wbc8MA,16760
4
+ opengeodeweb_back/inspector_functions.py,sha256=rx3LsY6ETKl1J9kKilcFRZMZrIoBZEIOebqWrcuMJsk,15903
5
+ OpenGeodeWeb_Back-1.3.0rc2.dist-info/LICENSE,sha256=d-icw4NmOEwW-hCOcEjYmvoBZW_cEqiC4VL3cxZMe6Y,1072
6
+ OpenGeodeWeb_Back-1.3.0rc2.dist-info/METADATA,sha256=wHoYYX-3Y39KYUAAMpDTl7y43HAPPvqAqKDImZAqkJ8,2332
7
+ OpenGeodeWeb_Back-1.3.0rc2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
8
+ OpenGeodeWeb_Back-1.3.0rc2.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
9
+ OpenGeodeWeb_Back-1.3.0rc2.dist-info/RECORD,,
@@ -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 keys:
128
- for key in keys:
129
- if key in value:
130
- if type(value[key]) == bool and value[key] == True:
131
- pass
132
- else:
133
- continue
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
- continue
136
-
137
- geode_object_input_extensions = get_geode_object_input_extensions(geode_object)
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 list_geode_objects(extension: str, keys: list = []):
146
- """
147
- Purpose:
148
- Function that returns a list of objects that can handle a file, given his extension
149
- Args:
150
- extension -- The extension of the file
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
- input_factory = get_input_factory(geode_object)
158
- for input in input_factory:
159
- if input.has_creator(extension):
160
- if geode_object not in geode_objects_list:
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
 
@@ -1,9 +0,0 @@
1
- opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- opengeodeweb_back/geode_functions.py,sha256=ofutckZEBi6FTx73ExfBgNyNWNzvbTXB2y7RcsW1si8,9268
3
- opengeodeweb_back/geode_objects.py,sha256=vwlQg8dId0vLhR12mKME6OoEaDr9E4ShDXM59wbc8MA,16760
4
- opengeodeweb_back/inspector_functions.py,sha256=rx3LsY6ETKl1J9kKilcFRZMZrIoBZEIOebqWrcuMJsk,15903
5
- OpenGeodeWeb_Back-1.3.0rc1.dist-info/LICENSE,sha256=d-icw4NmOEwW-hCOcEjYmvoBZW_cEqiC4VL3cxZMe6Y,1072
6
- OpenGeodeWeb_Back-1.3.0rc1.dist-info/METADATA,sha256=6qMpesMI2SvWdKaMF_ULmgsZUEieKeGM0C-xXUeVwEM,2332
7
- OpenGeodeWeb_Back-1.3.0rc1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
8
- OpenGeodeWeb_Back-1.3.0rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
9
- OpenGeodeWeb_Back-1.3.0rc1.dist-info/RECORD,,