fusion-platform-python-sdk 2.2.2__tar.gz → 2.2.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.
Files changed (57) hide show
  1. {fusion_platform_python_sdk-2.2.2/fusion_platform_python_sdk.egg-info → fusion_platform_python_sdk-2.2.5}/PKG-INFO +1 -1
  2. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/__init__.py +2 -2
  3. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/command.py +9 -6
  4. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process.py +11 -11
  5. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/translations.py +15 -9
  6. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5/fusion_platform_python_sdk.egg-info}/PKG-INFO +1 -1
  7. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/setup.py +1 -1
  8. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/LICENSE.txt +0 -0
  9. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/MANIFEST.in +0 -0
  10. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/README.md +0 -0
  11. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/__main__.py +0 -0
  12. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/base.py +0 -0
  13. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/common/__init__.py +0 -0
  14. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/common/raise_thread.py +0 -0
  15. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/common/utilities.py +0 -0
  16. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/detailed_example.py +0 -0
  17. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/documentation.py +0 -0
  18. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/fusion_platform_sdk.pdf +0 -0
  19. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/glasgow.geojson +0 -0
  20. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/lake_district.geojson +0 -0
  21. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/localisations.py +0 -0
  22. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/localise.py +0 -0
  23. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/__init__.py +0 -0
  24. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/credit.md +0 -0
  25. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/credit.py +0 -0
  26. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/data.md +0 -0
  27. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/data.py +0 -0
  28. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/data_file.md +0 -0
  29. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/data_file.py +0 -0
  30. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/fields.py +0 -0
  31. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/model.py +0 -0
  32. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/organisation.md +0 -0
  33. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/organisation.py +0 -0
  34. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process.md +0 -0
  35. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process_execution.md +0 -0
  36. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process_execution.py +0 -0
  37. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process_service_execution.md +0 -0
  38. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process_service_execution.py +0 -0
  39. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process_service_execution_log.md +0 -0
  40. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/process_service_execution_log.py +0 -0
  41. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/service.md +0 -0
  42. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/service.py +0 -0
  43. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/user.md +0 -0
  44. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/models/user.py +0 -0
  45. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/quick_example.py +0 -0
  46. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform/session.py +0 -0
  47. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform_python_sdk.egg-info/SOURCES.txt +0 -0
  48. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform_python_sdk.egg-info/dependency_links.txt +0 -0
  49. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform_python_sdk.egg-info/entry_points.txt +0 -0
  50. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform_python_sdk.egg-info/requires.txt +0 -0
  51. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/fusion_platform_python_sdk.egg-info/top_level.txt +0 -0
  52. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/setup.cfg +0 -0
  53. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/tests/test_base.py +0 -0
  54. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/tests/test_command.py +0 -0
  55. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/tests/test_init.py +0 -0
  56. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/tests/test_localise.py +0 -0
  57. {fusion_platform_python_sdk-2.2.2 → fusion_platform_python_sdk-2.2.5}/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.2.2
3
+ Version: 2.2.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
@@ -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.2.2'
15
- __version_date__ = '2026-04-28T07:42:59Z'
14
+ __version__ = '2.2.5'
15
+ __version_date__ = '2026-09-01T12:45:40Z'
16
16
 
17
17
  # Exclude certain sub-modules from documentation.
18
18
  # @formatter:off
@@ -1264,16 +1264,19 @@ class Command(Base):
1264
1264
  )
1265
1265
 
1266
1266
  # Create the subparsers.
1267
- subparsers = parser.add_subparsers(help=i18n.t('command.subparser'), dest='command')
1267
+ subparsers = parser.add_subparsers(description=i18n.t('command.subparser'), dest='command')
1268
1268
  parser.add_argument(i18n.t('command.version_short'), i18n.t('command.version_long'), help=i18n.t('command.version_help'), action='version',
1269
1269
  version=i18n.t('command.version_content', version=fusion_platform.__version__, version_date=fusion_platform.__version_date__))
1270
1270
 
1271
1271
  subparsers.required = True
1272
- parser_list = subparsers.add_parser(i18n.t('command.list.command'), help=i18n.t('command.list.help'))
1273
- parser_display = subparsers.add_parser(i18n.t('command.display.command'), help=i18n.t('command.display.help'))
1274
- parser_start = subparsers.add_parser(i18n.t('command.start.command'), help=i18n.t('command.start.help'))
1275
- parser_define = subparsers.add_parser(i18n.t('command.define.command'), help=i18n.t('command.define.help'))
1276
- parser_download = subparsers.add_parser(i18n.t('command.download.command'), help=i18n.t('command.download.help'))
1272
+ parser_list = subparsers.add_parser(i18n.t('command.list.command'), help=i18n.t('command.list.help'), description=i18n.t('command.list.description'))
1273
+ parser_display = subparsers.add_parser(i18n.t('command.display.command'), help=i18n.t('command.display.help'),
1274
+ description=i18n.t('command.display.description'))
1275
+ parser_start = subparsers.add_parser(i18n.t('command.start.command'), help=i18n.t('command.start.help'), description=i18n.t('command.start.description'))
1276
+ parser_define = subparsers.add_parser(i18n.t('command.define.command'), help=i18n.t('command.define.help'),
1277
+ description=i18n.t('command.define.description'))
1278
+ parser_download = subparsers.add_parser(i18n.t('command.download.command'), help=i18n.t('command.download.help'),
1279
+ description=i18n.t('command.download.description'))
1277
1280
 
1278
1281
  # Add in the common arguments.
1279
1282
  for subparser in [parser_list, parser_display, parser_start, parser_define, parser_download]:
@@ -588,7 +588,7 @@ class Process(Model):
588
588
  break
589
589
 
590
590
  if found_dispatcher is None:
591
- raise ModelError(i18n.t('models.process.cannot_find_dispatcher'))
591
+ raise ModelError(i18n.t('models.process.cannot_find_dispatcher', dispatcher=name if name is not None else number))
592
592
 
593
593
  # Add the dispatcher to the end of the existing list.
594
594
  dispatchers = list(self._model.get(self.__class__._FIELD_DISPATCHERS, [])) # Convert read-only tuple to list, so we can modify it.
@@ -850,7 +850,7 @@ class Process(Model):
850
850
  break
851
851
 
852
852
  if found_dispatcher is None:
853
- raise ModelError(i18n.t('models.process.cannot_find_dispatcher'))
853
+ raise ModelError(i18n.t('models.process.cannot_find_dispatcher', dispatcher=number))
854
854
 
855
855
  # Remove the dispatcher from the existing list.
856
856
  dispatchers = list(self._model.get(self.__class__._FIELD_DISPATCHERS, [])) # Convert read-only tuple to list, so we can modify it.
@@ -899,7 +899,7 @@ class Process(Model):
899
899
  break
900
900
 
901
901
  if found_dispatcher is None:
902
- raise ModelError(i18n.t('models.process.cannot_find_dispatcher'))
902
+ raise ModelError(i18n.t('models.process.cannot_find_dispatcher', dispatcher=number))
903
903
 
904
904
  # Get the dispatcher so that it can be modified.
905
905
  dispatchers = list(self._model.get(self.__class__._FIELD_DISPATCHERS, [])) # Convert read-only tuple to list, so we can access it.
@@ -921,7 +921,7 @@ class Process(Model):
921
921
  break
922
922
 
923
923
  if found_option is None:
924
- raise ModelError(i18n.t('models.process.cannot_find_option'))
924
+ raise ModelError(i18n.t('models.process.cannot_find_dispatcher_option', option=option_name))
925
925
 
926
926
  # We can now update the option. All options are expressed as strings with the correct format.
927
927
  option_value = Option.get_option_value(found_option, value, coerce_value)
@@ -981,7 +981,7 @@ class Process(Model):
981
981
  break
982
982
 
983
983
  if found_input is None:
984
- raise ModelError(i18n.t('models.process.cannot_find_input'))
984
+ raise ModelError(i18n.t('models.process.cannot_find_input', input=input.input if input is not None else number))
985
985
 
986
986
  # Check that all the files in the data object are ready to be used. Along the way, pick out the first file type.
987
987
  found_file_type = None
@@ -1041,7 +1041,7 @@ class Process(Model):
1041
1041
  break
1042
1042
 
1043
1043
  if found_option is None:
1044
- raise ModelError(i18n.t('models.process.cannot_find_option'))
1044
+ raise ModelError(i18n.t('models.process.cannot_find_option', option=option.name if option is not None else name))
1045
1045
 
1046
1046
  # We can now update the option. All options are expressed as strings with the correct format.
1047
1047
  option_value = Option.get_option_value(found_option, value, coerce_value)
@@ -1113,15 +1113,15 @@ class Process(Model):
1113
1113
  RequestError: if any request fails.
1114
1114
  ModelError: if a model could not be loaded or validated from the Fusion Platform<sup>&reg;</sup>.
1115
1115
  """
1116
+ # 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.
1117
+ if hasattr(self, self.__class__._FIELD_PROCESS_STATUS) and (self.process_status == Process._PROCESS_STATUS_STOP):
1118
+ raise ModelError(i18n.t('models.process.execution_stopped'))
1119
+
1116
1120
  # Wait until we find the next execution.
1117
1121
  while True:
1118
1122
  # Load in the most recent version of the model.
1119
1123
  self.get(organisation_id=self.organisation_id)
1120
1124
 
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
1125
  # Check whether we have the next execution listed in the model. We sort the list to find the most recent.
1126
1126
  self._logger.debug('checking for next execution')
1127
1127
  executions = []
@@ -1143,7 +1143,7 @@ class Process(Model):
1143
1143
 
1144
1144
  # Stop if we have an execution which is beyond the repeat start date.
1145
1145
  if execution is not None:
1146
- self._logger.debug('execution %s found', execution.get(self.__class__._FIELD_ID))
1146
+ self._logger.debug('execution %s found', execution)
1147
1147
  break
1148
1148
 
1149
1149
  # 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.
@@ -80,11 +80,13 @@ i18n.add_translation('command.dispatch_intermediate', 'Dispatch intermediate com
80
80
  i18n.add_translation('command.add_dispatcher', 'Add %{dispatcher} dispatcher?', 'en')
81
81
  i18n.add_translation('command.download.process_help', 'the name of the process, the process id or execution id to download', 'en')
82
82
  i18n.add_translation('command.download.process_long', 'process', 'en')
83
- i18n.add_translation('command.download.help', 'downloads the inputs and/or outputs for each process', 'en')
83
+ i18n.add_translation('command.download.description', 'Downloads the inputs and/or outputs for existing processes.', 'en')
84
+ i18n.add_translation('command.download.help', 'downloads the inputs and/or outputs for existing processes', 'en')
84
85
  i18n.add_translation('command.download.command', 'download', 'en')
85
86
  i18n.add_translation('command.define.process_help', 'the name of the process, the process id or execution id to build the YAML file', 'en')
86
87
  i18n.add_translation('command.define.process_long', 'process', 'en')
87
- i18n.add_translation('command.define.help', 'outputs a YAML file for each existing process', 'en')
88
+ i18n.add_translation('command.define.description', 'Creates new YAML files to define existing processes.', 'en')
89
+ i18n.add_translation('command.define.help', 'creates new YAML files to define existing processes', 'en')
88
90
  i18n.add_translation('command.define.command', 'define', 'en')
89
91
  i18n.add_translation('command.start.no_wait_for_completion_help', 'do not wait for the execution to complete (default %%(default)s)', 'en')
90
92
  i18n.add_translation('command.start.no_wait_for_completion_long', '--no_wait_for_completion', 'en')
@@ -127,15 +129,18 @@ i18n.add_translation('command.start.input_list_long', '--input_list', 'en')
127
129
  i18n.add_translation('command.start.input_list_short', '-l', 'en')
128
130
  i18n.add_translation('command.start.definition_help', 'the names of the service used to start processes or YAML files which defines everything', 'en')
129
131
  i18n.add_translation('command.start.definition_long', 'service_or_yaml', 'en')
130
- i18n.add_translation('command.start.help', 'starts a process', 'en')
132
+ i18n.add_translation('command.start.description', 'Creates and starts new processes.', 'en')
133
+ i18n.add_translation('command.start.help', 'creates and starts new processes', 'en')
131
134
  i18n.add_translation('command.start.command', 'start', 'en')
132
135
  i18n.add_translation('command.display.service_or_process_help', 'the names of the service, id, SSD id, process, process id or associated execution id that are to be displayed', 'en')
133
136
  i18n.add_translation('command.display.service_or_process_long', 'process_or_service', 'en')
134
- i18n.add_translation('command.display.help', 'displays service information or a configured process', 'en')
137
+ i18n.add_translation('command.display.description', 'Displays details of services or existing processes.', 'en')
138
+ i18n.add_translation('command.display.help', 'displays details of services or existing processes', 'en')
135
139
  i18n.add_translation('command.display.command', 'display', 'en')
136
- i18n.add_translation('command.list.help', 'lists configured processes', 'en')
140
+ i18n.add_translation('command.list.description', 'Lists all configured processes.', 'en')
141
+ i18n.add_translation('command.list.help', 'lists all configured processes', 'en')
137
142
  i18n.add_translation('command.list.command', 'list', 'en')
138
- i18n.add_translation('command.subparser', 'displays a service or process, or starts, defines or downloads a process', 'en')
143
+ i18n.add_translation('command.subparser', 'Commands are available to display a service or process, or start, define or download a process:', 'en')
139
144
  i18n.add_translation('command.version_content', '%%(prog)s %{version} (%{version_date})', 'en')
140
145
  i18n.add_translation('command.version_help', 'show the version information and exit', 'en')
141
146
  i18n.add_translation('command.version_long', '--version', 'en')
@@ -306,9 +311,10 @@ i18n.add_translation('models.process.execution_stopped', 'Process execution has
306
311
  i18n.add_translation('models.process.wrong_file_type', 'File type of supplied data object (%{actual}) does not match the file type for the input (%{expected})', 'en')
307
312
  i18n.add_translation('models.process.data_not_ready', 'Data object is not ready to be used in a process', 'en')
308
313
  i18n.add_translation('models.process.option_wrong_type', 'Option value should be of type %{type}', 'en')
309
- i18n.add_translation('models.process.cannot_find_option', 'No such option', 'en')
310
- i18n.add_translation('models.process.cannot_find_input', 'No such input', 'en')
311
- i18n.add_translation('models.process.cannot_find_dispatcher', 'No such dispatcher', 'en')
314
+ i18n.add_translation('models.process.cannot_find_dispatcher_option', 'No such dispatcher option \'%{option}\'', 'en')
315
+ i18n.add_translation('models.process.cannot_find_option', 'No such option \'%{option}\'', 'en')
316
+ i18n.add_translation('models.process.cannot_find_input', 'No such input %{input}', 'en')
317
+ i18n.add_translation('models.process.cannot_find_dispatcher', 'No such dispatcher \'%{dispatcher}\'', 'en')
312
318
  i18n.add_translation('models.process.option_not_specified', 'Option name or object must be provided to set option', 'en')
313
319
  i18n.add_translation('models.process.data_not_specified', 'Data object must be provided to set input', 'en')
314
320
  i18n.add_translation('models.process.input_not_specified', 'Input number or object must be provided to set input', 'en')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fusion-platform-python-sdk
3
- Version: 2.2.2
3
+ Version: 2.2.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='2.2.2',
22
+ version='2.2.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',