fusion-platform-python-sdk 2.0.8__tar.gz → 2.1.2__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-2.0.8/fusion_platform_python_sdk.egg-info → fusion_platform_python_sdk-2.1.2}/PKG-INFO +1 -1
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/__init__.py +2 -2
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/command.py +17 -12
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/fusion_platform_sdk.pdf +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2/fusion_platform_python_sdk.egg-info}/PKG-INFO +1 -1
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/setup.py +1 -1
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/LICENSE.txt +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/MANIFEST.in +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/README.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/__main__.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/base.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/common/__init__.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/common/raise_thread.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/common/utilities.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/detailed_example.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/documentation.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/glasgow.geojson +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/lake_district.geojson +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/localisations.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/localise.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/__init__.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/credit.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/credit.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/data.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/data.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/data_file.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/data_file.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/fields.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/model.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/organisation.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/organisation.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process_execution.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process_execution.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process_service_execution.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process_service_execution.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process_service_execution_log.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/process_service_execution_log.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/service.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/service.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/user.md +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/user.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/quick_example.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/session.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/translations.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform_python_sdk.egg-info/SOURCES.txt +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform_python_sdk.egg-info/dependency_links.txt +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform_python_sdk.egg-info/entry_points.txt +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform_python_sdk.egg-info/requires.txt +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform_python_sdk.egg-info/top_level.txt +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/setup.cfg +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/tests/test_base.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/tests/test_command.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/tests/test_init.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/tests/test_localise.py +0 -0
- {fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/tests/test_session.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fusion-platform-python-sdk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.2
|
|
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-2.0.8 → fusion_platform_python_sdk-2.1.2}/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__ = '2.
|
|
15
|
-
__version_date__ = '
|
|
14
|
+
__version__ = '2.1.2'
|
|
15
|
+
__version_date__ = '2026-02-05T14:08:19Z'
|
|
16
16
|
|
|
17
17
|
# Exclude certain sub-modules from documentation.
|
|
18
18
|
# @formatter:off
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/command.py
RENAMED
|
@@ -25,7 +25,7 @@ import uuid
|
|
|
25
25
|
|
|
26
26
|
from dateutil.relativedelta import relativedelta
|
|
27
27
|
import i18n
|
|
28
|
-
from pathos.multiprocessing import
|
|
28
|
+
from pathos.multiprocessing import ThreadPool as Pool
|
|
29
29
|
from prompt_toolkit import print_formatted_text as print, prompt
|
|
30
30
|
from prompt_toolkit.completion import WordCompleter
|
|
31
31
|
from prompt_toolkit.validation import Validator
|
|
@@ -777,7 +777,6 @@ class Command(Base):
|
|
|
777
777
|
executions = [execution]
|
|
778
778
|
|
|
779
779
|
# Do all the downloads in batches. We use small batches so that we do not swamp memory.
|
|
780
|
-
batch_size = 2 * os.cpu_count() # Downloads don't swamp CPU.
|
|
781
780
|
wait = i18n.t('command.wait_for_completion') if wait_for_execution_to_complete else ''
|
|
782
781
|
self.__print(logging.INFO, i18n.t('command.download_executions', wait=wait, executions=len(executions)))
|
|
783
782
|
progress_bar = tqdm(total=len(executions), bar_format=Command.__PROGRESS_BAR_FORMAT, colour=Command.__PROGRESS_BAR_COLOUR_ACTIVE,
|
|
@@ -790,8 +789,11 @@ class Command(Base):
|
|
|
790
789
|
download_components, output_dir, wait_for_execution_to_complete)
|
|
791
790
|
results = []
|
|
792
791
|
|
|
793
|
-
|
|
794
|
-
|
|
792
|
+
# We use a thread pool as it preserves the marshmallow configuration and log level. Using a ProcessPool resulted in fields being labelled as missing
|
|
793
|
+
# when the schema definition allowed for them to be None. When no parameters are supplied ThreadPool will use all available vCPUs which is sufficiently
|
|
794
|
+
# fast.
|
|
795
|
+
with Pool() as pool:
|
|
796
|
+
for i, result in enumerate(pool.imap(partial_download_execution, executions)):
|
|
795
797
|
progress_bar.set_postfix(execution=i + 1)
|
|
796
798
|
progress_bar.update(1)
|
|
797
799
|
results.append(result)
|
|
@@ -1002,12 +1004,15 @@ class Command(Base):
|
|
|
1002
1004
|
|
|
1003
1005
|
# If the service cannot be found, try to find it by its id or SSD id.
|
|
1004
1006
|
if service is None:
|
|
1005
|
-
service = next(
|
|
1007
|
+
service = next(
|
|
1008
|
+
(item for item in organisation.services if (item.name == service_name) or (str(item.id) == service_name) or (str(item.ssd_id) == service_name)),
|
|
1009
|
+
None)
|
|
1006
1010
|
|
|
1007
1011
|
# If the service still cannot be found, then try it as a specific service for the organisation.
|
|
1008
1012
|
if service is None:
|
|
1009
1013
|
try:
|
|
1010
|
-
service = next((item for item in organisation.own_services if
|
|
1014
|
+
service = next((item for item in organisation.own_services if
|
|
1015
|
+
(item.name == service_name) or (str(item.id) == service_name) or (str(item.ssd_id) == service_name)), None)
|
|
1011
1016
|
except RequestError:
|
|
1012
1017
|
# We will get a RequestError if the user is not sufficiently privileged to list the organisation's own services. We therefore ignore this error.
|
|
1013
1018
|
pass
|
|
@@ -1086,17 +1091,17 @@ class Command(Base):
|
|
|
1086
1091
|
groups[execution.group_id].append(execution)
|
|
1087
1092
|
|
|
1088
1093
|
# Calculate the overall progress and for each group.
|
|
1089
|
-
progress = sum([execution.progress for execution in executions]) // len(executions)
|
|
1090
|
-
|
|
1094
|
+
progress = sum([execution.progress for execution in executions]) // len(executions) if len(executions) > 0 else 0
|
|
1095
|
+
group_progress_summary = ''
|
|
1091
1096
|
|
|
1092
1097
|
for i, group in enumerate(groups.values()):
|
|
1093
|
-
|
|
1094
|
-
|
|
1098
|
+
group_progress = sum([execution.progress for execution in group]) // len(group)
|
|
1099
|
+
group_progress_summary += i18n.t('command.log_process_group', group_number=(i + 1), executions=len(group), progress=group_progress)
|
|
1095
1100
|
|
|
1096
1101
|
# Log the process information.
|
|
1097
1102
|
self.__print(logging.INFO,
|
|
1098
1103
|
i18n.t('command.log_process_summary', process=process.name, executions=len(executions), progress=progress, groups=len(groups),
|
|
1099
|
-
group_progress=
|
|
1104
|
+
group_progress=group_progress_summary))
|
|
1100
1105
|
|
|
1101
1106
|
def login(self, deployment, email, organisation_name):
|
|
1102
1107
|
"""
|
|
@@ -1161,7 +1166,7 @@ class Command(Base):
|
|
|
1161
1166
|
arguments = self.__parse_arguments()
|
|
1162
1167
|
|
|
1163
1168
|
# Change the print and logging to the desired level.
|
|
1164
|
-
self._logger.setLevel(logging.
|
|
1169
|
+
self._logger.setLevel(logging.WARNING)
|
|
1165
1170
|
|
|
1166
1171
|
if arguments.debug:
|
|
1167
1172
|
self._logger.setLevel(logging.DEBUG)
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fusion-platform-python-sdk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.2
|
|
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='2.
|
|
22
|
+
version='2.1.2',
|
|
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-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/__main__.py
RENAMED
|
File without changes
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/base.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-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/localise.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/data.md
RENAMED
|
File without changes
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/data.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
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/user.md
RENAMED
|
File without changes
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/fusion_platform/models/user.py
RENAMED
|
File without changes
|
|
File without changes
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/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
|
|
File without changes
|
|
File without changes
|
{fusion_platform_python_sdk-2.0.8 → fusion_platform_python_sdk-2.1.2}/tests/test_localise.py
RENAMED
|
File without changes
|
|
File without changes
|