fusion-platform-python-sdk 1.13.1__tar.gz → 1.13.5__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.
- {fusion-platform-python-sdk-1.13.1/fusion_platform_python_sdk.egg-info → fusion-platform-python-sdk-1.13.5}/PKG-INFO +1 -1
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/__init__.py +2 -2
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/data.py +7 -6
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/model.py +8 -5
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/organisation.py +4 -3
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process.md +2 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process.py +7 -2
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5/fusion_platform_python_sdk.egg-info}/PKG-INFO +1 -1
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/setup.py +1 -1
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/LICENSE.txt +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/MANIFEST.in +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/README.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/__main__.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/base.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/command.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/common/__init__.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/common/raise_thread.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/common/utilities.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/detailed_example.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/documentation.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/fusion_platform_sdk.pdf +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/glasgow.geojson +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/lake_district.geojson +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/localisations.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/localise.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/__init__.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/credit.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/credit.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/data.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/data_file.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/data_file.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/fields.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/organisation.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process_execution.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process_execution.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process_service_execution.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process_service_execution.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process_service_execution_log.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/process_service_execution_log.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/service.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/service.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/user.md +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/models/user.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/quick_example.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/session.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/translations.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform_python_sdk.egg-info/SOURCES.txt +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform_python_sdk.egg-info/dependency_links.txt +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform_python_sdk.egg-info/entry_points.txt +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform_python_sdk.egg-info/requires.txt +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform_python_sdk.egg-info/top_level.txt +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/setup.cfg +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_base.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_command.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_init.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_localise.py +0 -0
- {fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_session.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fusion-platform-python-sdk
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.5
|
|
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
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/__init__.py
RENAMED
|
@@ -11,8 +11,8 @@ API, and this is defined within the corresponding OpenAPI 3.0 specification, whi
|
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
# Do not modify the following two lines as they are maintained by the version.sh script.
|
|
14
|
-
__version__ = '1.13.
|
|
15
|
-
__version_date__ = '2024-
|
|
14
|
+
__version__ = '1.13.5'
|
|
15
|
+
__version_date__ = '2024-08-08T11:19:48Z'
|
|
16
16
|
|
|
17
17
|
# Exclude certain sub-modules from documentation.
|
|
18
18
|
# @formatter:off
|
|
@@ -215,7 +215,7 @@ class Data(Model):
|
|
|
215
215
|
# Return the copy.
|
|
216
216
|
return self.__class__._model_from_api_id(self._session, organisation_id=self.organisation_id, id=copy_data_id)
|
|
217
217
|
|
|
218
|
-
def _create(self, name, file_type, files, wait=False):
|
|
218
|
+
def _create(self, name, file_type, files, wait=False, **kwargs):
|
|
219
219
|
"""
|
|
220
220
|
Attempts to create the model object with the given values. This assumes the model template has been loaded first using the _new method, and that the model
|
|
221
221
|
is then created using a POST RESTful request. This assumes that the post body contains key names which include the name of the model class.
|
|
@@ -223,10 +223,11 @@ class Data(Model):
|
|
|
223
223
|
This method is overridden to also upload the corresponding files and optionally wait for the upload and analysis to complete.
|
|
224
224
|
|
|
225
225
|
Args:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
name: The name of the data object.
|
|
227
|
+
file_type: The type of files that the data object will hold.
|
|
228
|
+
files: The list of file paths to be uploaded.
|
|
229
|
+
wait: Optionally wait for the upload and analysis to complete? Default False.
|
|
230
|
+
kwargs: The model attributes which override those already in the template.
|
|
230
231
|
|
|
231
232
|
Returns:
|
|
232
233
|
The created data object.
|
|
@@ -236,7 +237,7 @@ class Data(Model):
|
|
|
236
237
|
ModelError: if the model could not be created and validated by the Fusion Platform<sup>®</sup>.
|
|
237
238
|
"""
|
|
238
239
|
# Use the super method to create the data item with the correct attributes. This will raise an exception if anything fails.
|
|
239
|
-
super(Data, self)._create(name=name)
|
|
240
|
+
super(Data, self)._create(name=name, **kwargs)
|
|
240
241
|
|
|
241
242
|
# Add each of the files, assuming that each is of the same file type, and start its upload in a thread.
|
|
242
243
|
try:
|
|
@@ -165,11 +165,12 @@ class Model(Base):
|
|
|
165
165
|
|
|
166
166
|
return attributes
|
|
167
167
|
|
|
168
|
-
def __build_body(self, **kwargs):
|
|
168
|
+
def __build_body(self, create=False, **kwargs):
|
|
169
169
|
"""
|
|
170
|
-
Builds a request body suitable for sending to the API. All current model attributes are included, with the keywords arguments
|
|
170
|
+
Builds a request body suitable for sending to the API. All current model attributes are included, with the keywords arguments overriding their value.
|
|
171
171
|
|
|
172
172
|
Args:
|
|
173
|
+
create: Whether the body is being built for a create request. This allows the id to be overridden.
|
|
173
174
|
kwargs: The model attributes which override those already in the template.
|
|
174
175
|
|
|
175
176
|
Returns:
|
|
@@ -184,9 +185,11 @@ class Model(Base):
|
|
|
184
185
|
if (self.__model is not None) and (key in self.__model):
|
|
185
186
|
body[Model._REQUEST_KEY_NAME.format(model=model_name, key=key)] = self.__model.get(key)
|
|
186
187
|
|
|
187
|
-
# Now override any of the passed in attributes, ignoring anything which is read-only or hidden.
|
|
188
|
+
# Now override any of the passed in attributes, ignoring anything which is read-only or hidden. The exception here is the id, which can be overridden
|
|
189
|
+
# during a create operation.
|
|
188
190
|
for key in kwargs:
|
|
189
|
-
if (
|
|
191
|
+
if (create and (key == Model._FIELD_ID)) or (
|
|
192
|
+
(Model._METADATA_READ_ONLY not in schema.fields[key].metadata) and (Model._METADATA_HIDE not in schema.fields[key].metadata)):
|
|
190
193
|
body[Model._REQUEST_KEY_NAME.format(model=model_name, key=key)] = kwargs[key]
|
|
191
194
|
|
|
192
195
|
return body
|
|
@@ -228,7 +231,7 @@ class Model(Base):
|
|
|
228
231
|
raise ModelError(i18n.t('models.model.already_persisted'))
|
|
229
232
|
|
|
230
233
|
# Form the post body dictionary from the current object and the keyword arguments.
|
|
231
|
-
body = self.__build_body(**kwargs)
|
|
234
|
+
body = self.__build_body(create=True, **kwargs)
|
|
232
235
|
|
|
233
236
|
# Make sure there is a create which can be performed. This requires a non-empty body.
|
|
234
237
|
if len(body) <= 0:
|
|
@@ -113,7 +113,7 @@ class Organisation(Model):
|
|
|
113
113
|
_PATH_SERVICES = f"{_PATH_BASE}/services/latest"
|
|
114
114
|
_PATH_DISPATCHERS = f"{_PATH_BASE}/services/dispatchers"
|
|
115
115
|
|
|
116
|
-
def create_data(self, name, file_type, files, wait=False):
|
|
116
|
+
def create_data(self, name, file_type, files, wait=False, **kwargs):
|
|
117
117
|
"""
|
|
118
118
|
Creates a data object for the organisation and uploads the corresponding files. Optionally waits for the upload and analysis to complete.
|
|
119
119
|
|
|
@@ -122,6 +122,7 @@ class Organisation(Model):
|
|
|
122
122
|
file_type: The type of files that the data object will hold.
|
|
123
123
|
files: The list of file paths to be uploaded.
|
|
124
124
|
wait: Optionally wait for the upload and analysis to complete? Default False.
|
|
125
|
+
kwargs: The model attributes which override those already in the template.
|
|
125
126
|
|
|
126
127
|
Returns:
|
|
127
128
|
The created data object.
|
|
@@ -134,8 +135,8 @@ class Organisation(Model):
|
|
|
134
135
|
data = Data(self._session)
|
|
135
136
|
data._new(organisation_id=self.id)
|
|
136
137
|
|
|
137
|
-
# Now attempt to create the data item.
|
|
138
|
-
data._create(name, file_type, files, wait)
|
|
138
|
+
# Now attempt to create the data item with any overriding keyword arguments.
|
|
139
|
+
data._create(name, file_type, files, wait=wait, **kwargs)
|
|
139
140
|
|
|
140
141
|
return data
|
|
141
142
|
|
|
@@ -29,3 +29,5 @@
|
|
|
29
29
|
* **test_run**: Is this a test run of a service?
|
|
30
30
|
* **price**: The price in FPUs to execute this process given its inputs and options.
|
|
31
31
|
* **deletable**: Is this process scheduled for deletion?
|
|
32
|
+
* **non_aggregator_count**: The count of non-aggregator executions within the current or last execution.
|
|
33
|
+
* **aggregator_count**: The count of aggregator executions within the current or last execution.
|
|
@@ -473,6 +473,8 @@ class ProcessSchema(Schema):
|
|
|
473
473
|
has_executions = fields.String(required=True, metadata={'hide': True}) # Changed to hide as an attribute.
|
|
474
474
|
has_executions_organisation_id = fields.String(required=True, metadata={'hide': True}) # Changed to hide as an attribute.
|
|
475
475
|
executions = fields.List(fields.Nested(ProcessExecutionStatusSchema()), allow_none=True, metadata={'hide': True}) # Changed to hide as an attribute.
|
|
476
|
+
non_aggregator_count = fields.Integer(allow_none=True, metadata={'read_only': True}) # Changed to prevent this being updated.
|
|
477
|
+
aggregator_count = fields.Integer(allow_none=True, metadata={'read_only': True}) # Changed to prevent this being updated.
|
|
476
478
|
# Removed creator.
|
|
477
479
|
|
|
478
480
|
# Removed search.
|
|
@@ -657,16 +659,19 @@ class Process(Model):
|
|
|
657
659
|
# Return the copy.
|
|
658
660
|
return process
|
|
659
661
|
|
|
660
|
-
def create(self):
|
|
662
|
+
def create(self, **kwargs):
|
|
661
663
|
"""
|
|
662
664
|
Attempts to persist the template process in the Fusion Platform<sup>®</sup> so that it can be executed.
|
|
663
665
|
|
|
666
|
+
Args:
|
|
667
|
+
kwargs: The model attributes which override those already in the template.
|
|
668
|
+
|
|
664
669
|
Raises:
|
|
665
670
|
RequestError: if the create fails.
|
|
666
671
|
ModelError: if the model could not be created and validated by the Fusion Platform<sup>®</sup>.
|
|
667
672
|
"""
|
|
668
673
|
# Attempt to issue the create.
|
|
669
|
-
self._create()
|
|
674
|
+
self._create(**kwargs)
|
|
670
675
|
|
|
671
676
|
def __dispatchers(self, dispatchers):
|
|
672
677
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fusion-platform-python-sdk
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.5
|
|
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
|
|
@@ -19,7 +19,7 @@ PACKAGE_DIR = pathlib.Path(__file__).parent
|
|
|
19
19
|
# @formatter:off
|
|
20
20
|
setup(
|
|
21
21
|
name='fusion-platform-python-sdk',
|
|
22
|
-
version='1.13.
|
|
22
|
+
version='1.13.5',
|
|
23
23
|
description='Python SDK used to interact with the Fusion Platform(r)',
|
|
24
24
|
long_description=(PACKAGE_DIR / 'README.md').read_text(),
|
|
25
25
|
long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/__main__.py
RENAMED
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/base.py
RENAMED
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/localise.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/fusion_platform/session.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_localise.py
RENAMED
|
File without changes
|
{fusion-platform-python-sdk-1.13.1 → fusion-platform-python-sdk-1.13.5}/tests/test_session.py
RENAMED
|
File without changes
|