pinexq-client 0.7.0.20241113.1__py3-none-any.whl → 0.9.1.20241213.2__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.
@@ -3,4 +3,4 @@ from .enterjma import enter_jma
3
3
  from .tool import Job, ProcessingStep, WorkData
4
4
 
5
5
  # Protocol version the JMA is using
6
- __jma_version__ = [7, 1, 0]
6
+ __jma_version__ = [7, 3, 1]
@@ -1,4 +1,5 @@
1
1
  from .input_dataslot_hco import *
2
+ from .output_dataslot_hco import *
2
3
  from .entrypoint_hco import *
3
4
  from .info_hco import *
4
5
  from .job_hco import *
@@ -1,5 +1,5 @@
1
1
  from datetime import datetime
2
- from typing import Self, List
2
+ from typing import Self, List, TYPE_CHECKING
3
3
 
4
4
  import httpx
5
5
  from pydantic import BaseModel, ConfigDict
@@ -9,8 +9,6 @@ from pinexq_client.core.hco.action_with_parameters_hco import ActionWithParamete
9
9
  from pinexq_client.core.hco.hco_base import Hco, Property
10
10
  from pinexq_client.core.hco.link_hco import LinkHco
11
11
  from pinexq_client.core.hco.unavailable import UnavailableAction, UnavailableLink
12
- from pinexq_client.job_management.hcos import InputDataSlotHco
13
- from pinexq_client.job_management.hcos.output_dataslot_hco import OutputDataSlotHco
14
12
  from pinexq_client.job_management.hcos.processing_step_hco import ProcessingStepLink
15
13
  from pinexq_client.job_management.known_relations import Relations
16
14
  from pinexq_client.job_management.model import SetJobErrorStateParameters
@@ -18,6 +16,10 @@ from pinexq_client.job_management.model.open_api_generated import JobStates, Pro
18
16
  SelectProcessingParameters, SetJobTagsParameters
19
17
  from pinexq_client.job_management.model.sirenentities import JobEntity, InputDataSlotEntity, OutputDataSlotEntity
20
18
 
19
+ if TYPE_CHECKING:
20
+ from pinexq_client.job_management.hcos.input_dataslot_hco import InputDataSlotHco
21
+ from pinexq_client.job_management.hcos.output_dataslot_hco import OutputDataSlotHco
22
+
21
23
 
22
24
  class JobRenameAction(ActionWithParametersHco[RenameJobParameters]):
23
25
  def execute(self, parameters: RenameJobParameters):
@@ -136,8 +138,8 @@ class JobHco(Hco[JobEntity]):
136
138
  edit_tags_action: JobEditTagsAction | UnavailableAction
137
139
  set_to_error_state_action: JobSetToErrorStateAction | UnavailableAction
138
140
 
139
- input_dataslots: List[InputDataSlotHco]
140
- output_dataslots: List[OutputDataSlotHco]
141
+ input_dataslots: List["InputDataSlotHco"]
142
+ output_dataslots: List["OutputDataSlotHco"]
141
143
 
142
144
  @classmethod
143
145
  def from_entity(cls, entity: JobEntity, client: httpx.Client) -> Self:
@@ -183,6 +185,7 @@ class JobHco(Hco[JobEntity]):
183
185
  return instance
184
186
 
185
187
  def _extract_input_dataslots(self):
188
+ from pinexq_client.job_management.hcos.input_dataslot_hco import InputDataSlotHco
186
189
  self.input_dataslots = []
187
190
  input_dataslots = self._entity.find_all_entities_with_relation(Relations.INPUT_DATASLOT, InputDataSlotEntity)
188
191
  for input_dataslot in input_dataslots:
@@ -190,6 +193,7 @@ class JobHco(Hco[JobEntity]):
190
193
  self.input_dataslots.append(input_dataslot_hco)
191
194
 
192
195
  def _extract_output_dataslots(self):
196
+ from pinexq_client.job_management.hcos.output_dataslot_hco import OutputDataSlotHco
193
197
  self.output_dataslots = []
194
198
  output_dataslots = self._entity.find_all_entities_with_relation(Relations.OUTPUT_DATASLOT, OutputDataSlotEntity)
195
199
  for output_dataslot in output_dataslots:
@@ -13,103 +13,103 @@ from pinexq_client.core.hco.link_hco import LinkHco
13
13
  from pinexq_client.core.hco.unavailable import UnavailableAction
14
14
  from pinexq_client.core.hco.upload_action_hco import UploadAction, UploadParameters
15
15
  from pinexq_client.job_management.known_relations import Relations
16
- from pinexq_client.job_management.model import EditProcessingStepParameters
17
16
  from pinexq_client.job_management.model.open_api_generated import DataSpecificationHto, \
18
- SetProcessingStepTagsParameters
17
+ SetProcessingStepTagsParameters, EditProcessingStepParameters
19
18
  from pinexq_client.job_management.model.sirenentities import ProcessingStepEntity
20
19
 
21
20
 
22
21
  class ProcessingStepLink(LinkHco):
23
- def navigate(self) -> 'ProcessingStepHco':
24
- return ProcessingStepHco.from_entity(self._navigate_internal(ProcessingStepEntity), self._client)
22
+ def navigate(self) -> 'ProcessingStepHco':
23
+ return ProcessingStepHco.from_entity(self._navigate_internal(ProcessingStepEntity), self._client)
25
24
 
26
25
 
27
26
  class ProcessingStepEditTagsAction(ActionWithParametersHco[SetProcessingStepTagsParameters]):
28
- def execute(self, parameters: SetProcessingStepTagsParameters):
29
- self._execute(parameters)
27
+ def execute(self, parameters: SetProcessingStepTagsParameters):
28
+ self._execute(parameters)
30
29
 
31
- def default_parameters(self) -> SetProcessingStepTagsParameters:
32
- # todo check why we have to manually set tags
33
- return self._get_default_parameters(SetProcessingStepTagsParameters, SetProcessingStepTagsParameters(tags=[]))
30
+ def default_parameters(self) -> SetProcessingStepTagsParameters:
31
+ # todo check why we have to manually set tags
32
+ return self._get_default_parameters(SetProcessingStepTagsParameters, SetProcessingStepTagsParameters(tags=[]))
34
33
 
35
34
 
36
35
  class ProcessingStepEditPropertiesAction(ActionWithParametersHco[EditProcessingStepParameters]):
37
- def execute(self, parameters: EditProcessingStepParameters):
38
- self._execute(parameters)
36
+ def execute(self, parameters: EditProcessingStepParameters):
37
+ self._execute(parameters)
39
38
 
40
- def default_parameters(self) -> EditProcessingStepParameters:
41
- return self._get_default_parameters(EditProcessingStepParameters, EditProcessingStepParameters())
39
+ def default_parameters(self) -> EditProcessingStepParameters:
40
+ return self._get_default_parameters(EditProcessingStepParameters,
41
+ EditProcessingStepParameters())
42
42
 
43
43
 
44
44
  class GenericProcessingConfigureParameters(BaseModel):
45
- """Generic parameter model, that can be set with any dictionary"""
46
- model_config = ConfigDict(extra='allow')
45
+ """Generic parameter model, that can be set with any dictionary"""
46
+ model_config = ConfigDict(extra='allow')
47
47
 
48
48
 
49
49
  class ConfigureDefaultParametersAction(ActionWithParametersHco[GenericProcessingConfigureParameters]):
50
- def execute(self, parameters: GenericProcessingConfigureParameters):
51
- self._execute(parameters)
50
+ def execute(self, parameters: GenericProcessingConfigureParameters):
51
+ self._execute(parameters)
52
52
 
53
- def default_parameters(self) -> GenericProcessingConfigureParameters:
54
- return self._get_default_parameters(GenericProcessingConfigureParameters,
55
- GenericProcessingConfigureParameters())
53
+ def default_parameters(self) -> GenericProcessingConfigureParameters:
54
+ return self._get_default_parameters(GenericProcessingConfigureParameters,
55
+ GenericProcessingConfigureParameters())
56
56
 
57
57
 
58
58
  class ClearDefaultParametersAction(ActionHco):
59
- def execute(self):
60
- self._execute_internal()
59
+ def execute(self):
60
+ self._execute_internal()
61
61
 
62
62
 
63
63
  class UploadConfigurationAction(UploadAction):
64
- def execute(self, parameters: UploadParameters):
65
- upload_json(self._client, self._action, parameters.json_, parameters.filename)
64
+ def execute(self, parameters: UploadParameters):
65
+ upload_json(self._client, self._action, parameters.json_, parameters.filename)
66
66
 
67
67
 
68
68
  class ProcessingStepHco(Hco[ProcessingStepEntity]):
69
- title: str = Property()
70
- version: str | None = Property()
71
- function_name: str | None = Property()
72
- short_description: str | None = Property()
73
- long_description: str | None = Property()
74
- tags: list[str] | None = Property()
75
- has_parameters: bool | None = Property()
76
- is_public: bool | None = Property()
77
- is_configured: bool | None = Property()
78
- created_at: datetime | None = Property()
79
- last_modified_at: datetime | None = Property()
80
- parameter_schema: str | None = Property()
81
- default_parameters: str | None = Property()
82
- return_schema: str | None = Property()
83
- error_schema: str | None = Property()
84
- input_data_slot_specification: List[DataSpecificationHto] | None = Property()
85
- output_data_slot_specification: List[DataSpecificationHto] | None = Property()
86
- edit_tags_action: ProcessingStepEditTagsAction | UnavailableAction
87
- edit_properties_action: ProcessingStepEditPropertiesAction | UnavailableAction
88
- configure_default_parameters_action: ConfigureDefaultParametersAction | UnavailableAction
89
- clear_default_parameters_action: ClearDefaultParametersAction | UnavailableAction
90
- upload_configuration_action: UploadConfigurationAction | None
91
-
92
- self_link: ProcessingStepLink
93
- download_link: DownloadLinkHco
94
-
95
- @classmethod
96
- def from_entity(cls, entity: ProcessingStepEntity, client: httpx.Client) -> Self:
97
- instance = cls(client, entity)
98
- Hco.check_classes(instance._entity.class_, ["ProcessingStep"])
99
-
100
- instance.self_link = ProcessingStepLink.from_entity(instance._client, instance._entity, Relations.SELF)
101
- instance.download_link = DownloadLinkHco.from_entity(instance._client, instance._entity, Relations.DOWNLOAD)
102
-
103
- # todo tests
104
-
105
- instance.edit_tags_action = ProcessingStepEditTagsAction.from_entity_optional(
106
- client, instance._entity, "EditTags")
107
- instance.edit_properties_action = ProcessingStepEditPropertiesAction.from_entity_optional(
108
- client, instance._entity, "EditProperties")
109
- instance.configure_default_parameters_action = ConfigureDefaultParametersAction.from_entity_optional(
110
- client, instance._entity, "ConfigureDefaultParameters")
111
- instance.clear_default_parameters_action = ClearDefaultParametersAction.from_entity_optional(
112
- client, instance._entity, "ClearDefaultParameters")
113
- instance.upload_configuration_action = UploadConfigurationAction.from_entity_optional(
114
- client, instance._entity, "Upload")
115
- return instance
69
+ title: str = Property()
70
+ version: str | None = Property()
71
+ function_name: str | None = Property()
72
+ short_description: str | None = Property()
73
+ long_description: str | None = Property()
74
+ tags: list[str] | None = Property()
75
+ has_parameters: bool | None = Property()
76
+ is_public: bool | None = Property()
77
+ is_configured: bool | None = Property()
78
+ created_at: datetime | None = Property()
79
+ last_modified_at: datetime | None = Property()
80
+ parameter_schema: str | None = Property()
81
+ default_parameters: str | None = Property()
82
+ return_schema: str | None = Property()
83
+ error_schema: str | None = Property()
84
+ input_data_slot_specification: List[DataSpecificationHto] | None = Property()
85
+ output_data_slot_specification: List[DataSpecificationHto] | None = Property()
86
+ edit_tags_action: ProcessingStepEditTagsAction | UnavailableAction
87
+ edit_properties_action: ProcessingStepEditPropertiesAction | UnavailableAction
88
+ configure_default_parameters_action: ConfigureDefaultParametersAction | UnavailableAction
89
+ clear_default_parameters_action: ClearDefaultParametersAction | UnavailableAction
90
+ upload_configuration_action: UploadConfigurationAction | None
91
+
92
+ self_link: ProcessingStepLink
93
+ download_link: DownloadLinkHco
94
+
95
+ @classmethod
96
+ def from_entity(cls, entity: ProcessingStepEntity, client: httpx.Client) -> Self:
97
+ instance = cls(client, entity)
98
+ Hco.check_classes(instance._entity.class_, ["ProcessingStep"])
99
+
100
+ instance.self_link = ProcessingStepLink.from_entity(instance._client, instance._entity, Relations.SELF)
101
+ instance.download_link = DownloadLinkHco.from_entity(instance._client, instance._entity, Relations.DOWNLOAD)
102
+
103
+ # todo tests
104
+
105
+ instance.edit_tags_action = ProcessingStepEditTagsAction.from_entity_optional(
106
+ client, instance._entity, "EditTags")
107
+ instance.edit_properties_action = ProcessingStepEditPropertiesAction.from_entity_optional(
108
+ client, instance._entity, "EditProperties")
109
+ instance.configure_default_parameters_action = ConfigureDefaultParametersAction.from_entity_optional(
110
+ client, instance._entity, "ConfigureDefaultParameters")
111
+ instance.clear_default_parameters_action = ClearDefaultParametersAction.from_entity_optional(
112
+ client, instance._entity, "ClearDefaultParameters")
113
+ instance.upload_configuration_action = UploadConfigurationAction.from_entity_optional(
114
+ client, instance._entity, "Upload")
115
+ return instance
@@ -8,121 +8,129 @@ from pinexq_client.core.hco.action_with_parameters_hco import ActionWithParamete
8
8
  from pinexq_client.core.hco.download_link_hco import DownloadLinkHco
9
9
  from pinexq_client.core.hco.hco_base import Hco, Property
10
10
  from pinexq_client.core.hco.link_hco import LinkHco
11
- from pinexq_client.core.hco.unavailable import UnavailableAction
11
+ from pinexq_client.core.hco.unavailable import UnavailableAction, UnavailableLink
12
+ from pinexq_client.job_management.hcos.processing_step_hco import ProcessingStepLink
13
+ from pinexq_client.job_management.hcos.job_hco import JobLink
12
14
  from pinexq_client.job_management.known_relations import Relations
13
15
  from pinexq_client.job_management.model.open_api_generated import (
14
- SetNameWorkDataParameters,
15
- SetCommentWorkDataParameters,
16
- SetTagsWorkDataParameters,
17
- WorkDataKind
16
+ SetNameWorkDataParameters,
17
+ SetCommentWorkDataParameters,
18
+ SetTagsWorkDataParameters,
19
+ WorkDataKind
18
20
  )
19
21
  from pinexq_client.job_management.model.sirenentities import WorkDataEntity
20
22
 
21
23
 
22
24
  class WorkDataLink(LinkHco):
23
- def navigate(self) -> 'WorkDataHco':
24
- return WorkDataHco.from_entity(self._navigate_internal(WorkDataEntity), self._client)
25
+ def navigate(self) -> 'WorkDataHco':
26
+ return WorkDataHco.from_entity(self._navigate_internal(WorkDataEntity), self._client)
25
27
 
26
28
 
27
29
  class WorkDataDeleteAction(ActionHco):
28
- def execute(self):
29
- self._execute_internal()
30
+ def execute(self):
31
+ self._execute_internal()
30
32
 
31
33
 
32
34
  class WorkDataRenameAction(ActionWithParametersHco[SetNameWorkDataParameters]):
33
- def execute(self, parameters: SetNameWorkDataParameters):
34
- self._execute(parameters)
35
+ def execute(self, parameters: SetNameWorkDataParameters):
36
+ self._execute(parameters)
35
37
 
36
- def default_parameters(self) -> SetNameWorkDataParameters:
37
- return self._get_default_parameters(SetNameWorkDataParameters, SetNameWorkDataParameters())
38
+ def default_parameters(self) -> SetNameWorkDataParameters:
39
+ return self._get_default_parameters(SetNameWorkDataParameters, SetNameWorkDataParameters())
38
40
 
39
41
 
40
42
  class WorkDataEditCommentAction(ActionWithParametersHco[SetCommentWorkDataParameters]):
41
- def execute(self, parameters: SetCommentWorkDataParameters):
42
- self._execute(parameters)
43
+ def execute(self, parameters: SetCommentWorkDataParameters):
44
+ self._execute(parameters)
43
45
 
44
- def default_parameters(self) -> SetCommentWorkDataParameters:
45
- return self._get_default_parameters(SetCommentWorkDataParameters, SetCommentWorkDataParameters())
46
+ def default_parameters(self) -> SetCommentWorkDataParameters:
47
+ return self._get_default_parameters(SetCommentWorkDataParameters, SetCommentWorkDataParameters())
46
48
 
47
49
 
48
50
  class WorkDataEditTagsAction(ActionWithParametersHco[SetTagsWorkDataParameters]):
49
- def execute(self, parameters: SetTagsWorkDataParameters):
50
- self._execute(parameters)
51
+ def execute(self, parameters: SetTagsWorkDataParameters):
52
+ self._execute(parameters)
51
53
 
52
- def default_parameters(self) -> SetTagsWorkDataParameters:
53
- # todo check why we have to manually set tags
54
- return self._get_default_parameters(SetTagsWorkDataParameters, SetTagsWorkDataParameters(tags=[]))
54
+ def default_parameters(self) -> SetTagsWorkDataParameters:
55
+ # todo check why we have to manually set tags
56
+ return self._get_default_parameters(SetTagsWorkDataParameters, SetTagsWorkDataParameters(tags=[]))
55
57
 
56
58
 
57
59
  class WorkDataAllowDeletionAction(ActionHco):
58
- def execute(self):
59
- self._execute_internal()
60
+ def execute(self):
61
+ self._execute_internal()
60
62
 
61
63
 
62
64
  class WorkDataDisallowAction(ActionHco):
63
- def execute(self):
64
- self._execute_internal()
65
+ def execute(self):
66
+ self._execute_internal()
65
67
 
66
68
 
67
69
  class WorkDataHideAction(ActionHco):
68
- def execute(self):
69
- self._execute_internal()
70
+ def execute(self):
71
+ self._execute_internal()
70
72
 
71
73
 
72
74
  class WorkDataUnHideAction(ActionHco):
73
- def execute(self):
74
- self._execute_internal()
75
+ def execute(self):
76
+ self._execute_internal()
75
77
 
76
78
 
77
79
  class WorkDataHco(Hco[WorkDataEntity]):
78
- name: str | None = Property()
79
- created_at: datetime | None = Property()
80
- size_in_bytes: int | None = Property()
81
- tags: list[str] | None = Property()
82
- media_type: str | None = Property()
83
- kind: WorkDataKind | None = Property()
84
- comments: str | None = Property()
85
- is_deletable: bool | None = Property()
86
- hidden: bool | None = Property()
87
-
88
- delete_action: WorkDataDeleteAction | UnavailableAction
89
- hide_action: WorkDataHideAction | UnavailableAction
90
- unhide_action: WorkDataUnHideAction | UnavailableAction
91
- allow_deletion_action: WorkDataAllowDeletionAction | UnavailableAction
92
- disallow_deletion_action: WorkDataDisallowAction | UnavailableAction
93
- rename_action: WorkDataRenameAction | UnavailableAction
94
- edit_comment_action: WorkDataEditCommentAction | UnavailableAction
95
- edit_tags_action: WorkDataEditTagsAction | UnavailableAction
96
-
97
- self_link: WorkDataLink
98
- download_link: DownloadLinkHco
99
-
100
- @classmethod
101
- def from_entity(cls, entity: WorkDataEntity, client: httpx.Client) -> Self:
102
- instance = cls(client, entity)
103
- Hco.check_classes(instance._entity.class_, ["WorkData"])
104
-
105
- # actions
106
- instance.hide_action = WorkDataHideAction.from_entity_optional(
107
- client, instance._entity, "Hide")
108
- instance.unhide_action = WorkDataUnHideAction.from_entity_optional(
109
- client, instance._entity, "UnHide")
110
- instance.delete_action = WorkDataDeleteAction.from_entity_optional(
111
- client, instance._entity, "Delete")
112
- instance.rename_action = WorkDataRenameAction.from_entity_optional(
113
- client, instance._entity, "Rename")
114
- instance.edit_comment_action = WorkDataEditCommentAction.from_entity_optional(
115
- client, instance._entity, "EditComment")
116
- instance.edit_tags_action = WorkDataEditTagsAction.from_entity_optional(
117
- client, instance._entity, "EditTags")
118
- instance.allow_deletion_action = WorkDataAllowDeletionAction.from_entity_optional(
119
- client, instance._entity, "AllowDeletion")
120
- instance.disallow_deletion_action = WorkDataDisallowAction.from_entity_optional(
121
- client, instance._entity, "DisallowDeletion")
122
-
123
- # links
124
- instance.self_link = WorkDataLink.from_entity(
125
- instance._client, instance._entity, Relations.SELF)
126
- instance.download_link = DownloadLinkHco.from_entity(
127
- instance._client, instance._entity, Relations.DOWNLOAD)
128
- return instance
80
+ name: str | None = Property()
81
+ created_at: datetime | None = Property()
82
+ size_in_bytes: int | None = Property()
83
+ tags: list[str] | None = Property()
84
+ media_type: str | None = Property()
85
+ kind: WorkDataKind | None = Property()
86
+ comments: str | None = Property()
87
+ is_deletable: bool | None = Property()
88
+ hidden: bool | None = Property()
89
+
90
+ delete_action: WorkDataDeleteAction | UnavailableAction
91
+ hide_action: WorkDataHideAction | UnavailableAction
92
+ unhide_action: WorkDataUnHideAction | UnavailableAction
93
+ allow_deletion_action: WorkDataAllowDeletionAction | UnavailableAction
94
+ disallow_deletion_action: WorkDataDisallowAction | UnavailableAction
95
+ rename_action: WorkDataRenameAction | UnavailableAction
96
+ edit_comment_action: WorkDataEditCommentAction | UnavailableAction
97
+ edit_tags_action: WorkDataEditTagsAction | UnavailableAction
98
+
99
+ self_link: WorkDataLink
100
+ download_link: DownloadLinkHco
101
+ producer_job_link: JobLink | UnavailableLink
102
+ producer_processing_step_link: ProcessingStepLink | UnavailableLink
103
+
104
+ @classmethod
105
+ def from_entity(cls, entity: WorkDataEntity, client: httpx.Client) -> Self:
106
+ instance = cls(client, entity)
107
+ Hco.check_classes(instance._entity.class_, ["WorkData"])
108
+
109
+ # actions
110
+ instance.hide_action = WorkDataHideAction.from_entity_optional(
111
+ client, instance._entity, "Hide")
112
+ instance.unhide_action = WorkDataUnHideAction.from_entity_optional(
113
+ client, instance._entity, "UnHide")
114
+ instance.delete_action = WorkDataDeleteAction.from_entity_optional(
115
+ client, instance._entity, "Delete")
116
+ instance.rename_action = WorkDataRenameAction.from_entity_optional(
117
+ client, instance._entity, "Rename")
118
+ instance.edit_comment_action = WorkDataEditCommentAction.from_entity_optional(
119
+ client, instance._entity, "EditComment")
120
+ instance.edit_tags_action = WorkDataEditTagsAction.from_entity_optional(
121
+ client, instance._entity, "EditTags")
122
+ instance.allow_deletion_action = WorkDataAllowDeletionAction.from_entity_optional(
123
+ client, instance._entity, "AllowDeletion")
124
+ instance.disallow_deletion_action = WorkDataDisallowAction.from_entity_optional(
125
+ client, instance._entity, "DisallowDeletion")
126
+
127
+ # links
128
+ instance.self_link = WorkDataLink.from_entity(
129
+ instance._client, instance._entity, Relations.SELF)
130
+ instance.download_link = DownloadLinkHco.from_entity(
131
+ instance._client, instance._entity, Relations.DOWNLOAD)
132
+ instance.producer_job_link = JobLink.from_entity_optional(
133
+ instance._client, instance._entity, Relations.PRODUCED_BY_JOB)
134
+ instance.producer_processing_step_link = ProcessingStepLink.from_entity_optional(
135
+ instance._client, instance._entity, Relations.PRODUCED_BY_PROCESSING_STEP)
136
+ return instance
@@ -21,6 +21,10 @@ class Relations(StrEnum):
21
21
  INPUT_DATASLOT = "InputDataSlot"
22
22
  OUTPUT_DATASLOT = "OutputDataSlot"
23
23
 
24
+ # workdata
25
+ PRODUCED_BY_JOB = "ProducedByJob"
26
+ PRODUCED_BY_PROCESSING_STEP = "ProducedByProcessingStep"
27
+
24
28
  # dataslots
25
29
  SELECTED = "Selected"
26
30
  ASSIGNED = "Assigned"
@@ -1,13 +1,14 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: openapi.json
3
- # timestamp: 2024-11-04T09:06:44+00:00
3
+ # timestamp: 2024-12-12T14:18:14+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
+ from datetime import datetime
7
8
  from enum import Enum
8
9
  from typing import Any, List
9
10
 
10
- from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, constr
11
+ from pydantic import BaseModel, ConfigDict, Field, constr
11
12
 
12
13
 
13
14
  class AdminJobQueryResultHtoOpenApiProperties(BaseModel):
@@ -94,8 +95,9 @@ class EditProcessingStepParameters(BaseModel):
94
95
  populate_by_name=True,
95
96
  )
96
97
  title: constr(min_length=1) = Field(..., alias='Title')
98
+ is_public: bool = Field(..., alias='IsPublic')
97
99
  function_name: constr(min_length=1) = Field(..., alias='FunctionName')
98
- is_public: bool | None = Field(None, alias='IsPublic')
100
+ version: constr(min_length=1) = Field(..., alias='Version')
99
101
 
100
102
 
101
103
  class EntryPointHtoOpenApiProperties(BaseModel):
@@ -255,8 +257,8 @@ class ProcessingStepHtoOpenApiProperties(BaseModel):
255
257
  is_public: bool | None = Field(None, alias='IsPublic')
256
258
  tags: List[str] | None = Field(None, alias='Tags')
257
259
  is_configured: bool | None = Field(None, alias='IsConfigured')
258
- created_at: AwareDatetime | None = Field(None, alias='CreatedAt')
259
- last_modified_at: AwareDatetime | None = Field(None, alias='LastModifiedAt')
260
+ created_at: datetime | None = Field(None, alias='CreatedAt')
261
+ last_modified_at: datetime | None = Field(None, alias='LastModifiedAt')
260
262
  parameter_schema: str | None = Field(None, alias='ParameterSchema')
261
263
  default_parameters: str | None = Field(None, alias='DefaultParameters')
262
264
  return_schema: str | None = Field(None, alias='ReturnSchema')
@@ -310,6 +312,7 @@ class ProcessingView(BaseModel):
310
312
  title: str | None = Field(None, alias='Title')
311
313
  description: str | None = Field(None, alias='Description')
312
314
  function_name: str | None = Field(None, alias='FunctionName')
315
+ version: str | None = Field(None, alias='Version')
313
316
  number_of_input_data_slots: int | None = Field(None, alias='NumberOfInputDataSlots')
314
317
  number_of_output_data_slots: int | None = Field(
315
318
  None, alias='NumberOfOutputDataSlots'
@@ -489,17 +492,18 @@ class AdminJobFilterParameter(BaseModel):
489
492
  extra='allow',
490
493
  populate_by_name=True,
491
494
  )
492
- processing_step_url: str | None = Field(None, alias='ProcessingStepUrl')
495
+ work_data_url: str | None = Field(None, alias='WorkDataUrl')
493
496
  name: str | None = Field(None, alias='Name')
494
497
  state: JobStates | None = Field(None, alias='State')
495
498
  show_hidden: bool | None = Field(None, alias='ShowHidden')
496
- parent_job_url: str | None = Field(None, alias='ParentJobUrl')
497
- created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
498
- created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
499
+ processing_step_url: str | None = Field(None, alias='ProcessingStepUrl')
500
+ created_before: datetime | None = Field(None, alias='CreatedBefore')
501
+ created_after: datetime | None = Field(None, alias='CreatedAfter')
499
502
  tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
500
503
  tags_by_or: List[str] | None = Field(None, alias='TagsByOr')
501
- user_url: str | None = Field(None, alias='UserUrl')
504
+ parent_job_url: str | None = Field(None, alias='ParentJobUrl')
502
505
  is_sub_job: bool | None = Field(None, alias='IsSubJob')
506
+ user_url: str | None = Field(None, alias='UserUrl')
503
507
 
504
508
 
505
509
  class AdminJobQueryResultHtoOpenApi(BaseModel):
@@ -550,16 +554,20 @@ class AdminWorkDataFilterParameter(BaseModel):
550
554
  extra='allow',
551
555
  populate_by_name=True,
552
556
  )
553
- user_url: str | None = Field(None, alias='UserUrl')
557
+ producer_processing_step_url: str | None = Field(
558
+ None, alias='ProducerProcessingStepUrl'
559
+ )
554
560
  name_contains: str | None = Field(None, alias='NameContains')
561
+ user_url: str | None = Field(None, alias='UserUrl')
555
562
  show_hidden: bool | None = Field(None, alias='ShowHidden')
556
563
  media_type_contains: str | None = Field(None, alias='MediaTypeContains')
557
564
  tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
558
565
  tags_by_or: List[str] | None = Field(None, alias='TagsByOr')
559
566
  is_kind: WorkDataKind | None = Field(None, alias='IsKind')
560
- created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
561
- created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
567
+ created_before: datetime | None = Field(None, alias='CreatedBefore')
568
+ created_after: datetime | None = Field(None, alias='CreatedAfter')
562
569
  is_deletable: bool | None = Field(None, alias='IsDeletable')
570
+ is_used: bool | None = Field(None, alias='IsUsed')
563
571
 
564
572
 
565
573
  class AdminWorkDataQueryParameters(BaseModel):
@@ -620,13 +628,14 @@ class JobFilterParameter(BaseModel):
620
628
  state: JobStates | None = Field(None, alias='State')
621
629
  name: str | None = Field(None, alias='Name')
622
630
  show_hidden: bool | None = Field(None, alias='ShowHidden')
623
- processing_step_url: str | None = Field(None, alias='ProcessingStepUrl')
624
- created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
625
- created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
631
+ work_data_url: str | None = Field(None, alias='WorkDataUrl')
632
+ created_before: datetime | None = Field(None, alias='CreatedBefore')
633
+ created_after: datetime | None = Field(None, alias='CreatedAfter')
626
634
  tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
627
635
  tags_by_or: List[str] | None = Field(None, alias='TagsByOr')
628
- parent_job_url: str | None = Field(None, alias='ParentJobUrl')
636
+ processing_step_url: str | None = Field(None, alias='ProcessingStepUrl')
629
637
  is_sub_job: bool | None = Field(None, alias='IsSubJob')
638
+ parent_job_url: str | None = Field(None, alias='ParentJobUrl')
630
639
 
631
640
 
632
641
  class JobHtoOpenApiProperties(BaseModel):
@@ -639,8 +648,8 @@ class JobHtoOpenApiProperties(BaseModel):
639
648
  tags: List[str] | None = Field(None, alias='Tags')
640
649
  hidden: bool | None = Field(None, alias='Hidden')
641
650
  output_is_deletable: bool | None = Field(None, alias='OutputIsDeletable')
642
- created_at: AwareDatetime | None = Field(None, alias='CreatedAt')
643
- completed_at: AwareDatetime | None = Field(None, alias='CompletedAt')
651
+ created_at: datetime | None = Field(None, alias='CreatedAt')
652
+ completed_at: datetime | None = Field(None, alias='CompletedAt')
644
653
  error_description: str | None = Field(None, alias='ErrorDescription')
645
654
  processing: ProcessingView | None = Field(None, alias='Processing')
646
655
  result: str | None = Field(None, alias='Result')
@@ -777,14 +786,18 @@ class WorkDataFilterParameter(BaseModel):
777
786
  populate_by_name=True,
778
787
  )
779
788
  name_contains: str | None = Field(None, alias='NameContains')
789
+ producer_processing_step_url: str | None = Field(
790
+ None, alias='ProducerProcessingStepUrl'
791
+ )
780
792
  show_hidden: bool | None = Field(None, alias='ShowHidden')
781
793
  media_type_contains: str | None = Field(None, alias='MediaTypeContains')
782
794
  tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
783
795
  tags_by_or: List[str] | None = Field(None, alias='TagsByOr')
784
796
  is_kind: WorkDataKind | None = Field(None, alias='IsKind')
785
- created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
786
- created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
797
+ created_before: datetime | None = Field(None, alias='CreatedBefore')
798
+ created_after: datetime | None = Field(None, alias='CreatedAfter')
787
799
  is_deletable: bool | None = Field(None, alias='IsDeletable')
800
+ is_used: bool | None = Field(None, alias='IsUsed')
788
801
 
789
802
 
790
803
  class WorkDataHtoOpenApiProperties(BaseModel):
@@ -793,7 +806,7 @@ class WorkDataHtoOpenApiProperties(BaseModel):
793
806
  populate_by_name=True,
794
807
  )
795
808
  name: str | None = Field(None, alias='Name')
796
- created_at: AwareDatetime | None = Field(None, alias='CreatedAt')
809
+ created_at: datetime | None = Field(None, alias='CreatedAt')
797
810
  size_in_bytes: int | None = Field(None, alias='SizeInBytes')
798
811
  tags: List[str] | None = Field(None, alias='Tags')
799
812
  media_type: str | None = Field(None, alias='MediaType')
@@ -78,13 +78,14 @@ class ProcessingStepUsedTagsEntity(Entity):
78
78
  class JobUsedTagsEntity(Entity):
79
79
  properties: JobUsedTagsHtoOpenApiProperties | None = None
80
80
 
81
-
81
+ # this needs to be added since the openapi.spec does not have this object.
82
82
  class InputDataSlotHtoProperties(BaseModel):
83
83
  model_config = ConfigDict(
84
- extra="forbid",
84
+ extra="allow",
85
85
  populate_by_name=True,
86
86
  )
87
87
  is_configured: bool | None = Field(None, alias="IsConfigured")
88
+ name: str = Field("", alias="Name")
88
89
  title: str | None = Field(None, alias="Title")
89
90
  description: str | None = Field(None, alias="Description")
90
91
  media_type: str | None = Field(None, alias="MediaType")
@@ -93,12 +94,13 @@ class InputDataSlotHtoProperties(BaseModel):
93
94
  class InputDataSlotEntity(Entity):
94
95
  properties: InputDataSlotHtoProperties | None = None
95
96
 
96
-
97
+ # this needs to be added since the openapi.spec does not have this object.
97
98
  class OutputDataSlotHtoProperties(BaseModel):
98
99
  model_config = ConfigDict(
99
- extra="forbid",
100
+ extra="allow",
100
101
  populate_by_name=True,
101
102
  )
103
+ name: str = Field("", alias="Name")
102
104
  title: str | None = Field(None, alias="Title")
103
105
  description: str | None = Field(None, alias="Description")
104
106
  media_type: str | None = Field(None, alias="MediaType")
@@ -13,9 +13,8 @@ from pinexq_client.job_management.hcos.processingsteproot_hco import ProcessingS
13
13
  from pinexq_client.job_management.known_relations import Relations
14
14
  from pinexq_client.job_management.model import (
15
15
  CreateProcessingStepParameters,
16
- EditProcessingStepParameters,
17
16
  SetProcessingStepTagsParameters, ProcessingStepQueryParameters, ProcessingStepFilterParameter,
18
- FunctionNameMatchTypes,
17
+ FunctionNameMatchTypes, EditProcessingStepParameters,
19
18
  )
20
19
 
21
20
 
@@ -127,7 +126,8 @@ class ProcessingStep:
127
126
  return ProcessingStep.from_hco(processing_step_hco)
128
127
 
129
128
  @staticmethod
130
- def _query_processing_steps(client: httpx.Client, step_name: str, version: Optional[str] = None) -> ProcessingStepQueryResultHco:
129
+ def _query_processing_steps(client: httpx.Client, step_name: str,
130
+ version: Optional[str] = None) -> ProcessingStepQueryResultHco:
131
131
  """
132
132
  Helper function to query processing steps based on name and optional version.
133
133
 
@@ -198,8 +198,9 @@ class ProcessingStep:
198
198
  self,
199
199
  *,
200
200
  new_title: str | None = None,
201
+ is_public: bool | None = None,
201
202
  new_function_name: str | None = None,
202
- is_public: bool | None = None
203
+ new_version: str | None = None,
203
204
  ) -> Self:
204
205
  """Edit processing step properties.
205
206
 
@@ -208,8 +209,9 @@ class ProcessingStep:
208
209
  self._raise_if_no_hco()
209
210
  self.processing_step_hco.edit_properties_action.execute(EditProcessingStepParameters(
210
211
  title=new_title,
212
+ is_public=is_public,
211
213
  function_name=new_function_name,
212
- is_public=is_public
214
+ version=new_version
213
215
  ))
214
216
  self.refresh()
215
217
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pinexq-client
3
- Version: 0.7.0.20241113.1
3
+ Version: 0.9.1.20241213.2
4
4
  Summary: A hypermedia-based client for the DataCybernetics PinexQ platform.
5
5
  Author-Email: =?utf-8?q?Sebastian_H=C3=B6fer?= <hoefer@data-cybernetics.com>, Mathias Reichardt <reichardt@data-cybernetics.com>, Jasim Ahmed <ahmed@data-cybernetics.com>, Pratik Poudel <poudel@data-cybernetics.com>
6
6
  Maintainer-Email: Mathias Reichardt <reichardt@data-cybernetics.com>, =?utf-8?q?Sebastian_H=C3=B6fer?= <hoefer@data-cybernetics.com>, Carsten Blank <blank@data-cybernetics.com>
@@ -1,7 +1,7 @@
1
- pinexq_client-0.7.0.20241113.1.dist-info/METADATA,sha256=5aTcxNIUNdX1Szxha37WAKXXSbG_jia6h84xiw2CEy8,3278
2
- pinexq_client-0.7.0.20241113.1.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- pinexq_client-0.7.0.20241113.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- pinexq_client-0.7.0.20241113.1.dist-info/licenses/LICENSE,sha256=3oz3tAhM7kOgRukkRe7wmh5T_HihZY77ZtJDJm91ZN8,1072
1
+ pinexq_client-0.9.1.20241213.2.dist-info/METADATA,sha256=n8wRo7jlsecTcmt6Zz8XxcGWDNSA1nA6BCxjQ0lGl9M,3278
2
+ pinexq_client-0.9.1.20241213.2.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ pinexq_client-0.9.1.20241213.2.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ pinexq_client-0.9.1.20241213.2.dist-info/licenses/LICENSE,sha256=3oz3tAhM7kOgRukkRe7wmh5T_HihZY77ZtJDJm91ZN8,1072
5
5
  pinexq_client/core/__init__.py,sha256=8SVD_PRgJtpUCOtVjdR6fRrv6KPNk7HD6UQrn0FKR04,235
6
6
  pinexq_client/core/base_relations.py,sha256=oIUS58pkbMDdqm-3YOdsenhL1smtzeAk4fp7-U595MY,162
7
7
  pinexq_client/core/enterapi.py,sha256=sL9TmF1L5LaDJnre1l_tiHDUo9vTbZ8cvPSov3Q1UTs,671
@@ -21,33 +21,33 @@ pinexq_client/core/model/error.py,sha256=ZDbUlwsj7d8XPMolSSLTFwgs3RBLvOvgmlEtoBu
21
21
  pinexq_client/core/model/sirenmodels.py,sha256=vGRQlhM2cSa2caxQel91Jr48KWqM-vMYX32iaQCzIds,5547
22
22
  pinexq_client/core/polling.py,sha256=Z6VXn-PCGk4XX-4tQWZG59qJyCIS0eIrpPUORQDIGrs,1077
23
23
  pinexq_client/core/sirenaccess.py,sha256=qopQKDfL1enJFb0Ja8UgsLMVOa0oBGy7PonhlV7YVBY,6950
24
- pinexq_client/job_management/__init__.py,sha256=pZ4G2mi6jqfKnUtcf9Mvrb0IpkmEvG2JDVXuYLyInnY,164
24
+ pinexq_client/job_management/__init__.py,sha256=QnwKpZJSQG9VYdkVbT84jx86u0vnH7-XJa5SZnDgiA4,164
25
25
  pinexq_client/job_management/enterjma.py,sha256=Ivl_jVPw_gaLyU5nKbywM-bbVGpn0MoCrZ0DMbJYf3s,1411
26
- pinexq_client/job_management/hcos/__init__.py,sha256=vMIdxGHBsVcKYKrVkCzD4a_VaheKSNxCimospFn5N88,396
26
+ pinexq_client/job_management/hcos/__init__.py,sha256=sjRsC3FDCfTLtfUM7j-6wic26ELlYdPNDjrOPLFiKjE,431
27
27
  pinexq_client/job_management/hcos/entrypoint_hco.py,sha256=qodjAwO_MtawUuhmaYjhGXHV-uW1k94V9gKRYZRkhn4,2234
28
28
  pinexq_client/job_management/hcos/info_hco.py,sha256=zWjR63SCEO_sUcZ9ha_aIoC_qUzAWLf50Xu4AHddAn8,1328
29
29
  pinexq_client/job_management/hcos/input_dataslot_hco.py,sha256=SDflhyW8kjpcTUfKAXnJxNR-etPzAHfoTqlYUcJZrxs,3442
30
- pinexq_client/job_management/hcos/job_hco.py,sha256=CwF0eD07pd88iZPQUb_10iDtotiemy48BJ5exYN5gRc,8649
30
+ pinexq_client/job_management/hcos/job_hco.py,sha256=dmobl1SFa4FCfZuig6lSAfd177E44wvRliaTbNGG0oc,8896
31
31
  pinexq_client/job_management/hcos/job_query_result_hco.py,sha256=I0G8YIlYDhTahLz8n06L8BywlcsMGNWUEsmEr4Sk0GU,3315
32
32
  pinexq_client/job_management/hcos/job_used_tags_hco.py,sha256=nys6E97NNXATdnvX6KZ46JR9qEb2lnqol9ZvJVEiNpQ,944
33
33
  pinexq_client/job_management/hcos/jobsroot_hco.py,sha256=P8C5CaIEq_bkh6YgJBuQEp45Cc4fHuU5lYuWNdgtISY,3853
34
34
  pinexq_client/job_management/hcos/output_dataslot_hco.py,sha256=zxpo-fI9eHcp_pMKcf2l-gRoPHX1RzQO53auHMRB_T8,1549
35
- pinexq_client/job_management/hcos/processing_step_hco.py,sha256=MykmFssysIc8fIUoPyNOLEGLGQNoC4zFgjIAIjf0v7U,5190
35
+ pinexq_client/job_management/hcos/processing_step_hco.py,sha256=ll4uGQInAs8mdJCvuvyk8K7mxPNK6lSpDzPBza3mCo0,5506
36
36
  pinexq_client/job_management/hcos/processing_step_used_tags_hco.py,sha256=90-2IWlYTcYX62NzmAPnmcUCwMDhmMZyBrNs_G3yigs,1067
37
37
  pinexq_client/job_management/hcos/processingstep_query_result_hco.py,sha256=YcCgigKvOIggILixgaEbmnM23FlkjCgxnhZC2Eh98dY,3817
38
38
  pinexq_client/job_management/hcos/processingsteproot_hco.py,sha256=gQBGMWEKX5kq_HwC7-eEjjfAm6oYTuIxGX5kKw_GKUM,3684
39
39
  pinexq_client/job_management/hcos/user_hco.py,sha256=z6USe-4nYzBfOoEx3n9_UbgomMTimg4EIa_XeVBj01A,1095
40
- pinexq_client/job_management/hcos/workdata_hco.py,sha256=lyqUQ93oNOIOS3J9V0BKNq7opoHdTQTTCcpJTubEbVU,4734
40
+ pinexq_client/job_management/hcos/workdata_hco.py,sha256=utKgdvwJdtR5oFSdM0PQpjpFmH39X1RAvfF-2a1g3U8,5707
41
41
  pinexq_client/job_management/hcos/workdata_query_result_hco.py,sha256=yxEnu_COMxP3mt553JZD13jjPyqSp3DJjgd8es5Nq_E,3520
42
42
  pinexq_client/job_management/hcos/workdata_used_tags_query_result_hco.py,sha256=qB1iQpwD63579dq3tUF4DBB_rZRMqJ80y1ysf-41aOo,1087
43
43
  pinexq_client/job_management/hcos/workdataroot_hco.py,sha256=LdEPW2JJTqAWi-6zj-40lfREhthcDL6nPXQk_nfMtCA,3936
44
- pinexq_client/job_management/known_relations.py,sha256=UlOF-sua8SyOPNNKzT_j6JVG8T-aewHIzn7S2ajXBhI,593
44
+ pinexq_client/job_management/known_relations.py,sha256=f3-7RagAfeSFv9b54l5zxnLKbVQjQQHzYsM4W2QHf0Y,708
45
45
  pinexq_client/job_management/model/__init__.py,sha256=ApHhNfjx4bPuz10sQnyBA2zajYbU7loDTZSKC5H_jBY,34
46
- pinexq_client/job_management/model/open_api_generated.py,sha256=Bcdy60VZtRPFXj05z6NjWeopAZsBo48QkVBdxwqScmI,30946
47
- pinexq_client/job_management/model/sirenentities.py,sha256=OInvxHpC6mnnYQjOMM2xAw7uLtvWwj9E2EQSRJe2jDo,3202
46
+ pinexq_client/job_management/model/open_api_generated.py,sha256=r4WLKQtPG2TL1rdGbXq1IFaVIPBtWSs-iF2G0e5OO2k,31463
47
+ pinexq_client/job_management/model/sirenentities.py,sha256=y08lxr6xV3kQVMjgtTjM8uq9LhDzvJ-nXWbnwawLw6I,3428
48
48
  pinexq_client/job_management/tool/__init__.py,sha256=58CRDcP8ifSx9eA2uyTLEg0_fX3FUuNUogY_lirx9AY,96
49
49
  pinexq_client/job_management/tool/job.py,sha256=_4HKeOAXsVx9f3DR-2E2Oyr3RqGqEb3Am4D1HwFh9JI,24795
50
50
  pinexq_client/job_management/tool/job_group.py,sha256=JyBKqtKAMpVXwdGaGKzh5IJOHgMk8zhK9b54jfvEHkk,4817
51
- pinexq_client/job_management/tool/processing_step.py,sha256=dM4IcNymFl9d7nbxWliFE7gLLxG4RFQ8B4w14lfF2Mc,10180
51
+ pinexq_client/job_management/tool/processing_step.py,sha256=OOm36tV_N9RnJKh9WBZo_Xbmg1kb5JKh0NtNfECrNpM,10286
52
52
  pinexq_client/job_management/tool/workdata.py,sha256=wRy_yfFZUJDh-hoGUuAbQaRGtPysDmEOhLwD84Fgz04,5510
53
- pinexq_client-0.7.0.20241113.1.dist-info/RECORD,,
53
+ pinexq_client-0.9.1.20241213.2.dist-info/RECORD,,