fusion-platform-python-sdk 2.2.3__py3-none-any.whl → 2.3.8__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.
- fusion_platform/__init__.py +6 -3
- fusion_platform/base.py +2 -3
- fusion_platform/command.py +969 -296
- fusion_platform/common/raise_thread.py +3 -2
- fusion_platform/models/data_file.py +35 -3
- fusion_platform/models/model.py +13 -2
- fusion_platform/models/process.py +12 -7
- fusion_platform/models/process_service_execution.md +1 -0
- fusion_platform/models/process_service_execution.py +1 -0
- fusion_platform/translations.py +181 -39
- {fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/METADATA +2 -1
- {fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/RECORD +16 -16
- {fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/WHEEL +1 -1
- {fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/entry_points.txt +0 -0
- {fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/licenses/LICENSE.txt +0 -0
- {fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/top_level.txt +0 -0
|
@@ -19,8 +19,9 @@ class RaiseThread(Thread):
|
|
|
19
19
|
"""
|
|
20
20
|
Initialises the object.
|
|
21
21
|
|
|
22
|
-
:
|
|
23
|
-
|
|
22
|
+
Args:
|
|
23
|
+
args: Positional arguments.
|
|
24
|
+
kwargs: Keyword arguments.
|
|
24
25
|
"""
|
|
25
26
|
super(RaiseThread, self).__init__(*args, **kwargs)
|
|
26
27
|
|
|
@@ -8,11 +8,10 @@ author: Matthew Casey
|
|
|
8
8
|
|
|
9
9
|
import i18n
|
|
10
10
|
from marshmallow import Schema, EXCLUDE
|
|
11
|
-
import os
|
|
12
11
|
|
|
13
12
|
import fusion_platform
|
|
14
13
|
from fusion_platform.common.raise_thread import RaiseThread
|
|
15
|
-
from fusion_platform.common.utilities import
|
|
14
|
+
from fusion_platform.common.utilities import dict_nested_get, value_from_read_only, value_to_read_only
|
|
16
15
|
from fusion_platform.models import fields
|
|
17
16
|
from fusion_platform.models.model import Model, ModelError
|
|
18
17
|
|
|
@@ -161,6 +160,12 @@ class DataFile(Model):
|
|
|
161
160
|
_STAC_COLLECTION_FILE_NAME = '.collection.stac'
|
|
162
161
|
_STAC_ITEM_FILE_NAME_FORMAT = '.{file_name}.stac'
|
|
163
162
|
|
|
163
|
+
# STAC item fields.
|
|
164
|
+
_STAC_ITEM_ASSETS = 'assets'
|
|
165
|
+
_STAC_ITEM_ASSET = 'asset'
|
|
166
|
+
_STAC_ITEM_HREF = 'href'
|
|
167
|
+
_STAC_ITEM_LINKS = 'links'
|
|
168
|
+
|
|
164
169
|
def __init__(self, session):
|
|
165
170
|
"""
|
|
166
171
|
Initialises the object.
|
|
@@ -291,13 +296,16 @@ class DataFile(Model):
|
|
|
291
296
|
|
|
292
297
|
return url
|
|
293
298
|
|
|
294
|
-
def get_stac_item(self, item_file_name_format=_STAC_ITEM_FILE_NAME_FORMAT, collection_file_name=_STAC_COLLECTION_FILE_NAME
|
|
299
|
+
def get_stac_item(self, item_file_name_format=_STAC_ITEM_FILE_NAME_FORMAT, collection_file_name=_STAC_COLLECTION_FILE_NAME, file_name=None,
|
|
300
|
+
item_file_name=None):
|
|
295
301
|
"""
|
|
296
302
|
Converts the data file representation into a STAC item.
|
|
297
303
|
|
|
298
304
|
Args:
|
|
299
305
|
item_file_name_format: The optional item file name format string, where the "file_name" placeholder is replaced with the item's file name.
|
|
300
306
|
collection_file_name: The optional owning collection file name.
|
|
307
|
+
file_name: The optional overriding file name.
|
|
308
|
+
item_file_name: The optional overriding item file name.
|
|
301
309
|
|
|
302
310
|
Returns:
|
|
303
311
|
A tuple of the STAC item definition as a dictionary and the item file name used in the definition.
|
|
@@ -307,4 +315,28 @@ class DataFile(Model):
|
|
|
307
315
|
stac_item = self.stac_item if hasattr(self, Model._FIELD_STAC_ITEM) else None
|
|
308
316
|
stac_item_file = self.stac_item_file if hasattr(self, Model._FIELD_STAC_ITEM_FILE) else None
|
|
309
317
|
|
|
318
|
+
# Make any required changes to the STAC item.
|
|
319
|
+
if (file_name is not None) or (item_file_name is not None):
|
|
320
|
+
# Convert the MappingProxy to a dictionary so we can modify it.
|
|
321
|
+
stac_item = value_from_read_only(stac_item)
|
|
322
|
+
|
|
323
|
+
# If an overriding file name has been provided, update the STAC definition to use it. This should just be in the asset list.
|
|
324
|
+
if file_name is not None:
|
|
325
|
+
href = dict_nested_get(stac_item, [DataFile._STAC_ITEM_ASSETS, DataFile._STAC_ITEM_ASSET, DataFile._STAC_ITEM_HREF])
|
|
326
|
+
|
|
327
|
+
if href is not None:
|
|
328
|
+
stac_item[DataFile._STAC_ITEM_ASSETS][DataFile._STAC_ITEM_ASSET][DataFile._STAC_ITEM_HREF] = file_name
|
|
329
|
+
|
|
330
|
+
# If an overriding item file name has been provided, update the STAC definition to use it. This should be in the links as the first item.
|
|
331
|
+
if item_file_name is not None:
|
|
332
|
+
links = stac_item.get(DataFile._STAC_ITEM_LINKS, [])
|
|
333
|
+
|
|
334
|
+
if len(links) > 0:
|
|
335
|
+
links[0][DataFile._STAC_ITEM_HREF] = item_file_name
|
|
336
|
+
|
|
337
|
+
stac_item_file = item_file_name # Because we have changed the STAC item file name.
|
|
338
|
+
|
|
339
|
+
# Convert the STAC item back into a read-only MappingProxy.
|
|
340
|
+
stac_item = value_to_read_only(stac_item)
|
|
341
|
+
|
|
310
342
|
return stac_item, stac_item_file
|
fusion_platform/models/model.py
CHANGED
|
@@ -46,6 +46,8 @@ class Model(Base):
|
|
|
46
46
|
|
|
47
47
|
# Useful fields and templates.
|
|
48
48
|
_FIELD_ABORT_REASON = 'abort_reason'
|
|
49
|
+
_FIELD_ALTERNATIVE = 'alternative'
|
|
50
|
+
_FIELD_AREA = 'area'
|
|
49
51
|
_FIELD_AVAILABLE_DISPATCHERS = 'available_dispatchers'
|
|
50
52
|
_FIELD_BOUNDS = 'bounds'
|
|
51
53
|
_FIELD_CATEGORY = 'category'
|
|
@@ -63,6 +65,7 @@ class Model(Base):
|
|
|
63
65
|
_FIELD_DOCUMENTATION_INPUTS = 'documentation_inputs'
|
|
64
66
|
_FIELD_DOCUMENTATION_OUTPUTS = 'documentation_outputs'
|
|
65
67
|
_FIELD_DOCUMENTATION_OPTIONS = 'documentation_options'
|
|
68
|
+
_FIELD_DOWNLOADS = 'downloads'
|
|
66
69
|
_FIELD_ENDED_AT = 'ended_at'
|
|
67
70
|
_FIELD_ERROR = 'error'
|
|
68
71
|
_FIELD_EXECUTIONS = 'executions'
|
|
@@ -83,7 +86,10 @@ class Model(Base):
|
|
|
83
86
|
_FIELD_INGESTERS = 'ingesters'
|
|
84
87
|
_FIELD_INPUT = 'input'
|
|
85
88
|
_FIELD_INPUTS = 'inputs'
|
|
89
|
+
_FIELD_INTERMEDIATE = 'intermediate'
|
|
86
90
|
_FIELD_KEYWORDS = 'keywords'
|
|
91
|
+
_FIELD_LENGTH = 'length'
|
|
92
|
+
_FIELD_LINES = 'lines'
|
|
87
93
|
_FIELD_MAXIMUM = 'maximum'
|
|
88
94
|
_FIELD_MEAN = 'mean'
|
|
89
95
|
_FIELD_MINIMUM = 'minimum'
|
|
@@ -92,19 +98,24 @@ class Model(Base):
|
|
|
92
98
|
_FIELD_NUMBER_OF_INGESTERS = 'number_of_ingesters'
|
|
93
99
|
_FIELD_OPTIONS = 'options'
|
|
94
100
|
_FIELD_OUTPUTS = 'outputs'
|
|
101
|
+
_FIELD_POINTS = 'points'
|
|
102
|
+
_FIELD_POLYGONS = 'polygons'
|
|
95
103
|
_FIELD_PROCESS_STATUS = 'process_status'
|
|
104
|
+
_FIELD_PUBLISHABLE = 'publishable'
|
|
96
105
|
_FIELD_RESOLUTION = 'resolution'
|
|
97
106
|
_FIELD_RUNTIME = 'runtime'
|
|
98
107
|
_FIELD_SD = 'sd'
|
|
99
108
|
_FIELD_SELECTOR = 'selector'
|
|
100
109
|
_FIELD_SELECTORS = 'selectors'
|
|
110
|
+
_FIELD_SIZE = 'size'
|
|
111
|
+
_FIELD_SOURCE = 'source'
|
|
101
112
|
_FIELD_SSD_ID = 'ssd_id'
|
|
102
113
|
_FIELD_STAC_ITEM = 'stac_item'
|
|
103
114
|
_FIELD_STAC_ITEM_FILE = 'stac_item_file'
|
|
115
|
+
_FIELD_STATISTICS_ID = 'statistics_id'
|
|
104
116
|
_FIELD_STARTED_AT = 'started_at'
|
|
105
117
|
_FIELD_SUCCESS = 'success'
|
|
106
|
-
|
|
107
|
-
_FIELD_SIZE = 'size'
|
|
118
|
+
_FIELD_TITLE = 'title'
|
|
108
119
|
_FIELD_UNIT = 'unit'
|
|
109
120
|
_FIELD_USED = 'used'
|
|
110
121
|
_FIELD_VALIDATION = 'validation'
|
|
@@ -759,8 +759,13 @@ class Process(Model):
|
|
|
759
759
|
RequestError: if any get fails.
|
|
760
760
|
ModelError: if a model could not be loaded or validated from the Fusion Platform<sup>®</sup>.
|
|
761
761
|
"""
|
|
762
|
-
|
|
763
|
-
|
|
762
|
+
|
|
763
|
+
# Only query executions if the process has some listed.
|
|
764
|
+
if len(self._model.get(self.__class__._FIELD_EXECUTIONS, [])) > 0:
|
|
765
|
+
return ProcessExecution._models_from_api_path(self._session, self._get_path(self.__class__._PATH_EXECUTIONS), reverse=True,
|
|
766
|
+
load_extras=False) # Most recent first.
|
|
767
|
+
else:
|
|
768
|
+
return iter([]) # We cannot yield here as we may be yielding in the above.
|
|
764
769
|
|
|
765
770
|
def find_executions(self, id=None, group_id=None):
|
|
766
771
|
"""
|
|
@@ -1113,15 +1118,15 @@ class Process(Model):
|
|
|
1113
1118
|
RequestError: if any request fails.
|
|
1114
1119
|
ModelError: if a model could not be loaded or validated from the Fusion Platform<sup>®</sup>.
|
|
1115
1120
|
"""
|
|
1121
|
+
# Confirm that the model is executing. We do not do this in the loop as the process will be set to stop once all of its executions have finished.
|
|
1122
|
+
if hasattr(self, self.__class__._FIELD_PROCESS_STATUS) and (self.process_status == Process._PROCESS_STATUS_STOP):
|
|
1123
|
+
raise ModelError(i18n.t('models.process.execution_stopped'))
|
|
1124
|
+
|
|
1116
1125
|
# Wait until we find the next execution.
|
|
1117
1126
|
while True:
|
|
1118
1127
|
# Load in the most recent version of the model.
|
|
1119
1128
|
self.get(organisation_id=self.organisation_id)
|
|
1120
1129
|
|
|
1121
|
-
# Check that the model is executing. It may have stopped on error.
|
|
1122
|
-
if hasattr(self, self.__class__._FIELD_PROCESS_STATUS) and (self.process_status == Process._PROCESS_STATUS_STOP):
|
|
1123
|
-
raise ModelError(i18n.t('models.process.execution_stopped'))
|
|
1124
|
-
|
|
1125
1130
|
# Check whether we have the next execution listed in the model. We sort the list to find the most recent.
|
|
1126
1131
|
self._logger.debug('checking for next execution')
|
|
1127
1132
|
executions = []
|
|
@@ -1143,7 +1148,7 @@ class Process(Model):
|
|
|
1143
1148
|
|
|
1144
1149
|
# Stop if we have an execution which is beyond the repeat start date.
|
|
1145
1150
|
if execution is not None:
|
|
1146
|
-
self._logger.debug('execution %s found', execution
|
|
1151
|
+
self._logger.debug('execution %s found', execution)
|
|
1147
1152
|
break
|
|
1148
1153
|
|
|
1149
1154
|
# If we have no recent executions, and longer than the allowed period has elapsed since the next execution was meant to start, then raise an exception.
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
* **value**: The value for the option.
|
|
45
45
|
* **data_type**: The data type associated with the option.
|
|
46
46
|
* **validation**: The optional validation for the option. This must be supplied for date/time and constrained values.
|
|
47
|
+
* **statistics_id**: The statistics file for the service.
|
|
47
48
|
* **intermediate**: Is this an intermediate service?
|
|
48
49
|
* **success**: Has the execution completed successfully?
|
|
49
50
|
* **metrics**: Metrics recorded during the execution.
|
|
@@ -161,6 +161,7 @@ class ProcessServiceExecutionSchema(Schema):
|
|
|
161
161
|
inputs = fields.List(fields.UUID(required=True), allow_none=True, metadata={'hide': True}) # Changed to hide as an attribute.
|
|
162
162
|
outputs = fields.List(fields.UUID(required=True), allow_none=True, metadata={'hide': True}) # Changed to hide as an attribute.
|
|
163
163
|
# Removed storage_id.
|
|
164
|
+
statistics_id = fields.UUID(allow_none=True, metadata={'read_only': True}) # Changed to prevent this being updated.
|
|
164
165
|
intermediate = fields.Boolean(allow_none=True)
|
|
165
166
|
# Removed task_id.
|
|
166
167
|
# Removed task_starts.
|
fusion_platform/translations.py
CHANGED
|
@@ -12,16 +12,30 @@ import i18n
|
|
|
12
12
|
|
|
13
13
|
# @formatter:off
|
|
14
14
|
i18n.add_translation('command.validate_constrained_error', 'Not one of %{constrained}', 'en')
|
|
15
|
+
i18n.add_translation('command.invalid_file_extension', 'File has an invalid extension (%{extension}) for files of type %{file_type}: %{file}', 'en')
|
|
16
|
+
i18n.add_translation('command.missing_file', 'Missing file %{file}', 'en')
|
|
17
|
+
i18n.add_translation('command.unknown_file_type', 'Unknown file type %{file_type}', 'en')
|
|
15
18
|
i18n.add_translation('command.unknown_command', 'Unknown command \'%{command}\'', 'en')
|
|
16
|
-
i18n.add_translation('command.
|
|
19
|
+
i18n.add_translation('command.no_upload_files', 'No files to upload', 'en')
|
|
20
|
+
i18n.add_translation('command.no_such_upload', 'No such upload \'%{upload}\'', 'en')
|
|
17
21
|
i18n.add_translation('command.no_such_service', 'No such service \'%{service}\'', 'en')
|
|
18
22
|
i18n.add_translation('command.no_such_process', 'No such process or execution \'%{process}\'', 'en')
|
|
19
23
|
i18n.add_translation('command.no_such_organisation', 'No such organisation \'%{organisation}\'', 'en')
|
|
20
24
|
i18n.add_translation('command.no_such_input', 'No such input \'%{input_name}\'', 'en')
|
|
25
|
+
i18n.add_translation('command.no_such_deployment', 'No such deployment \'%{deployment}\'', 'en')
|
|
26
|
+
i18n.add_translation('command.no_such_data_item', 'No such data item \'%{data}\'', 'en')
|
|
21
27
|
i18n.add_translation('command.no_executions', 'No executions for process \'%{process}\'', 'en')
|
|
22
28
|
i18n.add_translation('command.invalid_login_response', 'Incorrect username or password', 'en')
|
|
23
|
-
i18n.add_translation('command.
|
|
24
|
-
i18n.add_translation('command.
|
|
29
|
+
i18n.add_translation('command.log_no_uploads', 'No uploads', 'en')
|
|
30
|
+
i18n.add_translation('command.log_data_file', '%{name}%{file_type}%{crs}%{size}%{source}%{file_name}', 'en')
|
|
31
|
+
i18n.add_translation('command.log_no_services', 'No services', 'en')
|
|
32
|
+
i18n.add_translation('command.log_service_detail', '\'%{name}\': %{summary}', 'en')
|
|
33
|
+
i18n.add_translation('command.log_process_status.stop', 'Stopped', 'en')
|
|
34
|
+
i18n.add_translation('command.log_process_status.execute', 'Execute', 'en')
|
|
35
|
+
i18n.add_translation('command.log_process_status.draft', 'Pending', 'en')
|
|
36
|
+
i18n.add_translation('command.log_no_processes', 'No processes', 'en')
|
|
37
|
+
i18n.add_translation('command.log_process_summary', '\'%{process}\'%{group_progress}', 'en')
|
|
38
|
+
i18n.add_translation('command.log_process_group', '; Group %{group_number}: %{progress}%%', 'en')
|
|
25
39
|
i18n.add_translation('command.log_execution_group_index', ' %{group_index} of %{group_count}', 'en')
|
|
26
40
|
i18n.add_translation('command.log_execution_group_id', 'Group %{group_number} of %{group_count} (%{group_id}):', 'en')
|
|
27
41
|
i18n.add_translation('command.log_execution_duration', ' - %{minutes} minute(s)', 'en')
|
|
@@ -41,6 +55,7 @@ i18n.add_translation('command.log_summary', 'Summary:', 'en')
|
|
|
41
55
|
i18n.add_translation('command.log_dispatchers', 'Dispatchers:', 'en')
|
|
42
56
|
i18n.add_translation('command.log_options', 'Options:', 'en')
|
|
43
57
|
i18n.add_translation('command.log_outputs', 'Outputs:', 'en')
|
|
58
|
+
i18n.add_translation('command.log_no_executions', 'No executions', 'en')
|
|
44
59
|
i18n.add_translation('command.log_inputs', 'Inputs:', 'en')
|
|
45
60
|
i18n.add_translation('command.log_execution', 'Execution%{label} \'%{id}\'%{period}: %{status}%{duration}', 'en')
|
|
46
61
|
i18n.add_translation('command.log_service', 'Service \'%{service}\'', 'en')
|
|
@@ -56,6 +71,8 @@ i18n.add_translation('command.using_service', 'Using service \'%{service}\'', 'e
|
|
|
56
71
|
i18n.add_translation('command.using_organisation', 'Using organisation \'%{organisation}\'', 'en')
|
|
57
72
|
i18n.add_translation('command.upload_storage', 'Uploading %{files} storage file(s)...', 'en')
|
|
58
73
|
i18n.add_translation('command.upload_inputs', 'Uploading %{inputs} input file(s)...', 'en')
|
|
74
|
+
i18n.add_translation('command.upload_files', 'Creating upload \'%{upload_name}\' with file type %{file_type} and uploading %{number_of_files} file(s)...', 'en')
|
|
75
|
+
i18n.add_translation('command.template_service', 'Templating \'%{service}\'', 'en')
|
|
59
76
|
i18n.add_translation('command.storage_name', '%{process} Storage %{group_index} %{chain_index}', 'en')
|
|
60
77
|
i18n.add_translation('command.start_process', 'Starting \'%{process}\' from service \'%{service}\'', 'en')
|
|
61
78
|
i18n.add_translation('command.remove_process', 'Removing process \'%{process}\'', 'en')
|
|
@@ -68,24 +85,37 @@ i18n.add_translation('command.organisation', 'Organisation', 'en')
|
|
|
68
85
|
i18n.add_translation('command.find_inputs', 'Finding %{inputs} input file(s)...', 'en')
|
|
69
86
|
i18n.add_translation('command.executing', 'Executing...', 'en')
|
|
70
87
|
i18n.add_translation('command.email', 'Email', 'en')
|
|
71
|
-
i18n.add_translation('command.
|
|
88
|
+
i18n.add_translation('command.download_upload', 'Downloading upload \'%{upload}\' to %{output}', 'en')
|
|
89
|
+
i18n.add_translation('command.download_process_execution', 'Downloading \'%{process}\' (inputs %{inputs}, outputs %{outputs}, storage %{storage}, statistics %{statistics}, intermediate %{intermediate}, STAC only %{stac_only}, metrics %{metrics}, components %{components})', 'en')
|
|
72
90
|
i18n.add_translation('command.download_process', 'Downloading process \'%{process}\' to %{output}', 'en')
|
|
73
91
|
i18n.add_translation('command.download_files', 'Downloading %{files} file(s)...', 'en')
|
|
74
92
|
i18n.add_translation('command.download_executions', 'Gathering files%{wait} for %{executions} execution(s)...', 'en')
|
|
75
93
|
i18n.add_translation('command.download_execution', 'Downloading execution %{execution} to %{output}', 'en')
|
|
94
|
+
i18n.add_translation('command.delete_upload_confirmation', 'Are you sure you want to delete upload \'%{upload}\'?', 'en')
|
|
95
|
+
i18n.add_translation('command.delete_upload', 'Deleting upload \'%{upload}\'', 'en')
|
|
96
|
+
i18n.add_translation('command.delete_process_confirmation', 'Are you sure you want to delete process \'%{process}\'?', 'en')
|
|
97
|
+
i18n.add_translation('command.delete_process', 'Deleting process \'%{process}\'', 'en')
|
|
98
|
+
i18n.add_translation('command.delete_execution_confirmation', 'Are you sure you want to delete execution %{execution} for process \'%{process}\'?', 'en')
|
|
99
|
+
i18n.add_translation('command.delete_execution', 'Deleting execution %{execution} for process \'%{process}\'', 'en')
|
|
76
100
|
i18n.add_translation('command.define_storage', 'Defining storage file(s) for %{slices} slice(s)...', 'en')
|
|
77
101
|
i18n.add_translation('command.define_process', 'Defining \'%{process}\' (inputs %{inputs}, storage %{storage})', 'en')
|
|
78
102
|
i18n.add_translation('command.define_inputs', 'Defining %{files} input file(s)...', 'en')
|
|
79
103
|
i18n.add_translation('command.dispatch_intermediate', 'Dispatch intermediate components?', 'en')
|
|
80
104
|
i18n.add_translation('command.add_dispatcher', 'Add %{dispatcher} dispatcher?', 'en')
|
|
81
|
-
i18n.add_translation('command.
|
|
82
|
-
i18n.add_translation('command.
|
|
83
|
-
i18n.add_translation('command.
|
|
84
|
-
i18n.add_translation('command.
|
|
85
|
-
i18n.add_translation('command.
|
|
86
|
-
i18n.add_translation('command.
|
|
87
|
-
i18n.add_translation('command.
|
|
88
|
-
i18n.add_translation('command.
|
|
105
|
+
i18n.add_translation('command.upload.file_help', 'the path to the files to be uploaded', 'en')
|
|
106
|
+
i18n.add_translation('command.upload.file_long', 'file', 'en')
|
|
107
|
+
i18n.add_translation('command.upload.file_type_help', 'the type of files to be associated with the upload: CSV, DEM, ESRI Shapefile, GeoJSON, GeoTIFF, GZIP, JPEG, JPEG2000, KML, KMZ, PNG, PDF, ZIP or Other', 'en')
|
|
108
|
+
i18n.add_translation('command.upload.file_type_long', 'file_type', 'en')
|
|
109
|
+
i18n.add_translation('command.upload.upload_name_help', 'the name of the upload item to be created', 'en')
|
|
110
|
+
i18n.add_translation('command.upload.upload_name_long', 'upload_name', 'en')
|
|
111
|
+
i18n.add_translation('command.upload.description', 'Creates a single upload item and uploads files to it.', 'en')
|
|
112
|
+
i18n.add_translation('command.upload.help', 'creates a single upload item and uploads files to it', 'en')
|
|
113
|
+
i18n.add_translation('command.upload.command', 'upload', 'en')
|
|
114
|
+
i18n.add_translation('command.template.service_help', 'the name of the service, id, SSD id to build the YAML file', 'en')
|
|
115
|
+
i18n.add_translation('command.template.service_long', 'service', 'en')
|
|
116
|
+
i18n.add_translation('command.template.description', 'Creates new YAML files as templates of services.', 'en')
|
|
117
|
+
i18n.add_translation('command.template.help', 'creates new YAML files as templates of services', 'en')
|
|
118
|
+
i18n.add_translation('command.template.command', 'template', 'en')
|
|
89
119
|
i18n.add_translation('command.start.no_wait_for_completion_help', 'do not wait for the execution to complete (default %%(default)s)', 'en')
|
|
90
120
|
i18n.add_translation('command.start.no_wait_for_completion_long', '--no_wait_for_completion', 'en')
|
|
91
121
|
i18n.add_translation('command.start.no_wait_for_completion_short', '-n', 'en')
|
|
@@ -101,6 +131,9 @@ i18n.add_translation('command.start.component_short', '-c', 'en')
|
|
|
101
131
|
i18n.add_translation('command.start.intermediate_help', 'download the process inputs and/or outputs for all intermediate services (default %%(default)s)', 'en')
|
|
102
132
|
i18n.add_translation('command.start.intermediate_long', '--intermediate', 'en')
|
|
103
133
|
i18n.add_translation('command.start.intermediate_short', '-m', 'en')
|
|
134
|
+
i18n.add_translation('command.start.statistics_help', 'downloads the statistics (default %%(default)s)', 'en')
|
|
135
|
+
i18n.add_translation('command.start.statistics_long', '--statistics', 'en')
|
|
136
|
+
i18n.add_translation('command.start.statistics_short', '-q', 'en')
|
|
104
137
|
i18n.add_translation('command.start.storage_help', 'downloads the storage (default %%(default)s)', 'en')
|
|
105
138
|
i18n.add_translation('command.start.storage_long', '--storage', 'en')
|
|
106
139
|
i18n.add_translation('command.start.storage_short', '-s', 'en')
|
|
@@ -125,17 +158,75 @@ i18n.add_translation('command.start.options_short', '-p', 'en')
|
|
|
125
158
|
i18n.add_translation('command.start.input_list_help', 'the list of inputs to be used as either filenames or pre-existing input names', 'en')
|
|
126
159
|
i18n.add_translation('command.start.input_list_long', '--input_list', 'en')
|
|
127
160
|
i18n.add_translation('command.start.input_list_short', '-l', 'en')
|
|
128
|
-
i18n.add_translation('command.start.definition_help', 'the
|
|
161
|
+
i18n.add_translation('command.start.definition_help', 'the name, id or SSD id of the service that is to be used to start a process, or YAML file which defines the process', 'en')
|
|
129
162
|
i18n.add_translation('command.start.definition_long', 'service_or_yaml', 'en')
|
|
130
|
-
i18n.add_translation('command.start.
|
|
163
|
+
i18n.add_translation('command.start.description', 'Creates and starts new processes.', 'en')
|
|
164
|
+
i18n.add_translation('command.start.help', 'creates and starts new processes', 'en')
|
|
131
165
|
i18n.add_translation('command.start.command', 'start', 'en')
|
|
132
|
-
i18n.add_translation('command.
|
|
133
|
-
i18n.add_translation('command.
|
|
134
|
-
i18n.add_translation('command.
|
|
135
|
-
i18n.add_translation('command.
|
|
136
|
-
i18n.add_translation('command.list.help', 'lists
|
|
166
|
+
i18n.add_translation('command.list.upload.description', 'Lists uploads.', 'en')
|
|
167
|
+
i18n.add_translation('command.list.upload.help', 'lists uploads', 'en')
|
|
168
|
+
i18n.add_translation('command.list.upload.command', 'upload', 'en')
|
|
169
|
+
i18n.add_translation('command.list.service.description', 'Lists available services.', 'en')
|
|
170
|
+
i18n.add_translation('command.list.service.help', 'lists available services', 'en')
|
|
171
|
+
i18n.add_translation('command.list.service.command', 'service', 'en')
|
|
172
|
+
i18n.add_translation('command.list.process.description', 'Lists existing processes.', 'en')
|
|
173
|
+
i18n.add_translation('command.list.process.help', 'lists existing processes', 'en')
|
|
174
|
+
i18n.add_translation('command.list.process.command', 'process', 'en')
|
|
175
|
+
i18n.add_translation('command.list.subparser', 'Commands are available to list uploads, existing processes or available services:', 'en')
|
|
176
|
+
i18n.add_translation('command.list.description', 'Lists all uploads, existing processes or available services.', 'en')
|
|
177
|
+
i18n.add_translation('command.list.help', 'lists all uploads, existing processes or available services', 'en')
|
|
137
178
|
i18n.add_translation('command.list.command', 'list', 'en')
|
|
138
|
-
i18n.add_translation('command.
|
|
179
|
+
i18n.add_translation('command.download.upload.description', 'Downloads uploads.', 'en')
|
|
180
|
+
i18n.add_translation('command.download.upload.help', 'downloads uploads', 'en')
|
|
181
|
+
i18n.add_translation('command.download.upload.command', 'upload', 'en')
|
|
182
|
+
i18n.add_translation('command.download.process.description', 'Downloads existing processes or executions.', 'en')
|
|
183
|
+
i18n.add_translation('command.download.process.help', 'downloads existing processes or executions', 'en')
|
|
184
|
+
i18n.add_translation('command.download.process.command', 'process', 'en')
|
|
185
|
+
i18n.add_translation('command.download.upload_help', 'the name or id of the upload that is to be downloaded', 'en')
|
|
186
|
+
i18n.add_translation('command.download.upload_long', 'upload', 'en')
|
|
187
|
+
i18n.add_translation('command.download.process_help', 'the name or id of the process, or associated execution id, that is to be downloaded', 'en')
|
|
188
|
+
i18n.add_translation('command.download.process_long', 'process', 'en')
|
|
189
|
+
i18n.add_translation('command.download.subparser', 'Commands are available to download existing processes or uploads:', 'en')
|
|
190
|
+
i18n.add_translation('command.download.description', 'Downloads existing processes, executions or uploads.', 'en')
|
|
191
|
+
i18n.add_translation('command.download.help', 'downloads existing processes, executions or uploads', 'en')
|
|
192
|
+
i18n.add_translation('command.download.command', 'download', 'en')
|
|
193
|
+
i18n.add_translation('command.display.service.description', 'Displays details of services.', 'en')
|
|
194
|
+
i18n.add_translation('command.display.service.help', 'displays details of services', 'en')
|
|
195
|
+
i18n.add_translation('command.display.service.command', 'service', 'en')
|
|
196
|
+
i18n.add_translation('command.display.process.description', 'Displays details of existing processes.', 'en')
|
|
197
|
+
i18n.add_translation('command.display.process.help', 'displays details of existing processes', 'en')
|
|
198
|
+
i18n.add_translation('command.display.process.command', 'process', 'en')
|
|
199
|
+
i18n.add_translation('command.display.service_help', 'the name, id or SSD id of the service that is to be displayed', 'en')
|
|
200
|
+
i18n.add_translation('command.display.service_long', 'service', 'en')
|
|
201
|
+
i18n.add_translation('command.display.process_help', 'the name or id of the process, or associated execution id, that is to be displayed', 'en')
|
|
202
|
+
i18n.add_translation('command.display.process_long', 'process', 'en')
|
|
203
|
+
i18n.add_translation('command.display.subparser', 'Commands are available to display details of existing processes or services:', 'en')
|
|
204
|
+
i18n.add_translation('command.display.description', 'Displays details of existing processes or services.', 'en')
|
|
205
|
+
i18n.add_translation('command.display.help', 'displays details of existing processes or services', 'en')
|
|
206
|
+
i18n.add_translation('command.display.command', 'display', 'en')
|
|
207
|
+
i18n.add_translation('command.delete.upload.description', 'Deletes uploads.', 'en')
|
|
208
|
+
i18n.add_translation('command.delete.upload.help', 'deletes uploads', 'en')
|
|
209
|
+
i18n.add_translation('command.delete.upload.command', 'upload', 'en')
|
|
210
|
+
i18n.add_translation('command.delete.process.description', 'Deletes existing processes or executions.', 'en')
|
|
211
|
+
i18n.add_translation('command.delete.process.help', 'deletes existing processes or executions', 'en')
|
|
212
|
+
i18n.add_translation('command.delete.process.command', 'process', 'en')
|
|
213
|
+
i18n.add_translation('command.delete.force_help', 'force deletion without prompting (default %%(default)s)', 'en')
|
|
214
|
+
i18n.add_translation('command.delete.force_long', '--force', 'en')
|
|
215
|
+
i18n.add_translation('command.delete.force_short', '-f', 'en')
|
|
216
|
+
i18n.add_translation('command.delete.upload_help', 'the name or id of the upload that is to be deleted', 'en')
|
|
217
|
+
i18n.add_translation('command.delete.upload_long', 'upload', 'en')
|
|
218
|
+
i18n.add_translation('command.delete.process_help', 'the name or id of the process, or associated execution id, that is to be deleted', 'en')
|
|
219
|
+
i18n.add_translation('command.delete.process_long', 'process', 'en')
|
|
220
|
+
i18n.add_translation('command.delete.subparser', 'Commands are available to delete existing processes, executions or uploads:', 'en')
|
|
221
|
+
i18n.add_translation('command.delete.description', 'Deletes existing processes, executions or uploads.', 'en')
|
|
222
|
+
i18n.add_translation('command.delete.help', 'deletes existing processes or uploads', 'en')
|
|
223
|
+
i18n.add_translation('command.delete.command', 'delete', 'en')
|
|
224
|
+
i18n.add_translation('command.define.process_help', 'the name of the process, the process id or execution id to build the YAML file', 'en')
|
|
225
|
+
i18n.add_translation('command.define.process_long', 'process', 'en')
|
|
226
|
+
i18n.add_translation('command.define.description', 'Creates new YAML files to define existing processes.', 'en')
|
|
227
|
+
i18n.add_translation('command.define.help', 'creates new YAML files to define existing processes', 'en')
|
|
228
|
+
i18n.add_translation('command.define.command', 'define', 'en')
|
|
229
|
+
i18n.add_translation('command.subparser', 'Commands are available to display service information and processes, to upload, download or delete files, or download, define, delete, list or start processes:', 'en')
|
|
139
230
|
i18n.add_translation('command.version_content', '%%(prog)s %{version} (%{version_date})', 'en')
|
|
140
231
|
i18n.add_translation('command.version_help', 'show the version information and exit', 'en')
|
|
141
232
|
i18n.add_translation('command.version_long', '--version', 'en')
|
|
@@ -146,6 +237,9 @@ i18n.add_translation('command.debug_short', '-b', 'en')
|
|
|
146
237
|
i18n.add_translation('command.organisation_help', 'the organisation to be used', 'en')
|
|
147
238
|
i18n.add_translation('command.organisation_long', '--organisation', 'en')
|
|
148
239
|
i18n.add_translation('command.organisation_short', '-g', 'en')
|
|
240
|
+
i18n.add_translation('command.no_save_password_help', 'prevents the password from being saved to the local password storage service and deletes any password associated with the email address', 'en')
|
|
241
|
+
i18n.add_translation('command.no_save_password_long', '--no_save_password', 'en')
|
|
242
|
+
i18n.add_translation('command.no_save_password_short', '-k', 'en')
|
|
149
243
|
i18n.add_translation('command.email_help', 'the email address to be used to login', 'en')
|
|
150
244
|
i18n.add_translation('command.email_long', '--email', 'en')
|
|
151
245
|
i18n.add_translation('command.email_short', '-e', 'en')
|
|
@@ -156,32 +250,52 @@ i18n.add_translation('command.epilog', '''
|
|
|
156
250
|
For more detailed options, use:
|
|
157
251
|
|
|
158
252
|
fusion_platform list --help
|
|
159
|
-
fusion_platform display --help
|
|
160
|
-
fusion_platform start --help
|
|
161
253
|
fusion_platform define --help
|
|
254
|
+
fusion_platform delete --help
|
|
255
|
+
fusion_platform display --help
|
|
162
256
|
fusion_platform download --help
|
|
257
|
+
fusion_platform start --help
|
|
258
|
+
fusion_platform template --help
|
|
259
|
+
fusion_platform upload --help
|
|
163
260
|
|
|
164
261
|
''', 'en')
|
|
165
262
|
i18n.add_translation('command.description', '''
|
|
166
|
-
Use this command to display service information and processes,
|
|
167
|
-
defined by a YAML file.
|
|
263
|
+
Use this command to display service information and processes, to upload, download or delete files, or download, define, delete, list or start processes.
|
|
264
|
+
Processes can be selected via command line options or defined by a YAML file.
|
|
168
265
|
|
|
169
266
|
Usage:
|
|
170
|
-
The following will list all
|
|
267
|
+
The following will list all current processes:
|
|
268
|
+
|
|
269
|
+
fusion_platform list process
|
|
270
|
+
|
|
271
|
+
The following will display information about one or more processes from the given \'process\':
|
|
272
|
+
|
|
273
|
+
fusion_platform display process <process> ...
|
|
274
|
+
|
|
275
|
+
This will show the current process configuration, including options, inputs, outputs and dispatchers, and whether it has any executions.
|
|
171
276
|
|
|
172
|
-
|
|
277
|
+
The following will list all available services:
|
|
173
278
|
|
|
174
|
-
|
|
279
|
+
fusion_platform list service
|
|
175
280
|
|
|
176
|
-
|
|
281
|
+
The following will display information about one or more services from the given \'service\':
|
|
177
282
|
|
|
178
|
-
|
|
179
|
-
configuration.
|
|
283
|
+
fusion_platform display service <service> ...
|
|
180
284
|
|
|
181
|
-
|
|
182
|
-
processes will use the same inputs and options:
|
|
285
|
+
This will display the full service documentation, including its expected inputs and options.
|
|
183
286
|
|
|
184
|
-
|
|
287
|
+
The following will list all current uploads:
|
|
288
|
+
|
|
289
|
+
fusion_platform list upload
|
|
290
|
+
|
|
291
|
+
The following will upload files to a single upload item:
|
|
292
|
+
|
|
293
|
+
fusion_platform upload <upload_name> <file_type> <file> ...
|
|
294
|
+
|
|
295
|
+
The following will attempt to create one or more processes from the given \'service\' to use the inputs (in order) and options and execute them. All processes
|
|
296
|
+
will use the same inputs and options:
|
|
297
|
+
|
|
298
|
+
fusion_platform start <service> ... -l <input_file|input_name> ... -p <option=value> ...
|
|
185
299
|
|
|
186
300
|
The following will also attempt to create one or more processes and execute them, but this time with the parameters specified in the YAML files:
|
|
187
301
|
|
|
@@ -219,28 +333,56 @@ Usage:
|
|
|
219
333
|
{tomorrow@hour:minute}: Is replaced with tomorrow\'s date with the optional hour and minute (UTC). If \'@hour:minute\' is not provided, \'@00:00\' is assumed.
|
|
220
334
|
{<day_name>@hour:minute}: Is replaced with the next occurrence of the specified day, including today. If \'@hour:minute\' is not provided, \'@00:00\' is assumed.
|
|
221
335
|
|
|
336
|
+
The following will create a YAML file template for one or more services. The YAML file will be named as a sanitised version of the service name with any
|
|
337
|
+
existing file overwritten:
|
|
338
|
+
|
|
339
|
+
fusion_platform template <service> ...
|
|
340
|
+
|
|
222
341
|
The following will create a YAML file from one or more existing processes. The YAML file will be named as a sanitised version of the process name with any
|
|
223
342
|
existing file overwritten:
|
|
224
343
|
|
|
225
|
-
fusion_platform define <
|
|
344
|
+
fusion_platform define <process> ...
|
|
226
345
|
|
|
227
346
|
The following will optionally download all the outputs for the executions of a process. Only the last execution is downloaded, unless it is part of a group,
|
|
228
347
|
in which case all the executions in the group are downloaded. The files are downloaded to a sanitised version of the process name with any existing directory
|
|
229
348
|
replaced:
|
|
230
349
|
|
|
231
|
-
fusion_platform download <
|
|
350
|
+
fusion_platform download process <process> -o
|
|
351
|
+
|
|
352
|
+
The following will download an upload:
|
|
353
|
+
|
|
354
|
+
fusion_platform download upload <upload>
|
|
355
|
+
|
|
356
|
+
The following will delete a process with a confirmation prompt. If an execution id is provided, then only the specific execution will be deleted and not the
|
|
357
|
+
whole process or any other executions:
|
|
358
|
+
|
|
359
|
+
fusion_platform delete process <process>
|
|
360
|
+
|
|
361
|
+
The following will delete an upload with a confirmation prompt. Uploads can only be deleted if they are not in use by any processes. This will delete the
|
|
362
|
+
upload matching the name provided, or corresponding id.
|
|
363
|
+
|
|
364
|
+
fusion_platform delete upload <upload>
|
|
232
365
|
|
|
233
366
|
where
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
input_file: Is the path to an input file. The file\'s extension
|
|
367
|
+
file: Is the path to a file to be uploaded. The file\'s extension must match the expected file type.
|
|
368
|
+
file_type: Is the type of file to be uploaded: CSV, DEM, ESRI Shapefile, GeoJSON, GeoTIFF, GZIP, JPEG, JPEG2000, KML, KMZ, PNG, PDF, ZIP or Other.
|
|
369
|
+
input_file: Is the path to an input file. The file\'s extension must match the expected file type.
|
|
237
370
|
input_name: Is the name of an existing input within the Fusion Platform(r) which will be used.
|
|
371
|
+
option: The precise (lower case) name of the option. For example, \'minimum_coverage\' or \'repeat_count\'.
|
|
372
|
+
process: Is the name of the process, process id or an execution id.
|
|
373
|
+
process_name: Is the name of the process.
|
|
374
|
+
service: Is the name of the service, id or SSD id.
|
|
375
|
+
service_name: Is the name of the service used to create the process.
|
|
238
376
|
storage_id: Is the UUID of the storage data item which should be uploaded.
|
|
239
377
|
storage_file: Is the path to a storage file.
|
|
240
|
-
|
|
378
|
+
upload: Is the name of the upload or id.
|
|
379
|
+
upload_name: Is the name of the upload.
|
|
241
380
|
value: The value of the option. For date times, use ISO formatting, such as \'2024-02-21T13:40:06.732527+00:00\'
|
|
242
381
|
yaml_file: Is the path to the YAML file.
|
|
243
382
|
|
|
383
|
+
For each command, the deployment, email address and organisation name can be supplied as options. The password will be prompted for unless local password
|
|
384
|
+
storage is available and in use, in which case the email address and password will be saved for the deployment and used the next time.
|
|
385
|
+
|
|
244
386
|
''', 'en')
|
|
245
387
|
i18n.add_translation('command.program', 'fusion_platform', 'en')
|
|
246
388
|
i18n.add_translation('session.request_failed', 'API request failed: %{message}', 'en')
|
{fusion_platform_python_sdk-2.2.3.dist-info → fusion_platform_python_sdk-2.3.8.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fusion-platform-python-sdk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.8
|
|
4
4
|
Summary: Python SDK used to interact with the Fusion Platform(r)
|
|
5
5
|
Home-page: https://github.com/d-cat-support/fusion-platform-python-sdk
|
|
6
6
|
Author: Digital Content Analysis Technology Ltd
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.14
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE.txt
|
|
18
|
+
Requires-Dist: keyring
|
|
18
19
|
Requires-Dist: marshmallow
|
|
19
20
|
Requires-Dist: pathos
|
|
20
21
|
Requires-Dist: prompt_toolkit
|