pinexq-client 0.7.0.20241113.1__py3-none-any.whl → 0.9.0.20241203.1__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.
- pinexq_client/job_management/__init__.py +1 -1
- pinexq_client/job_management/hcos/__init__.py +1 -0
- pinexq_client/job_management/hcos/job_hco.py +9 -5
- pinexq_client/job_management/hcos/processing_step_hco.py +71 -71
- pinexq_client/job_management/hcos/workdata_hco.py +89 -81
- pinexq_client/job_management/known_relations.py +4 -0
- pinexq_client/job_management/model/open_api_generated.py +19 -8
- pinexq_client/job_management/tool/processing_step.py +7 -5
- {pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/METADATA +1 -1
- {pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/RECORD +13 -13
- {pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/WHEEL +0 -0
- {pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/entry_points.txt +0 -0
- {pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
-
|
|
17
|
+
SetProcessingStepTagsParameters, EditProcessingStepParameters
|
|
19
18
|
from pinexq_client.job_management.model.sirenentities import ProcessingStepEntity
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
class ProcessingStepLink(LinkHco):
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
29
|
-
|
|
27
|
+
def execute(self, parameters: SetProcessingStepTagsParameters):
|
|
28
|
+
self._execute(parameters)
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
38
|
-
|
|
36
|
+
def execute(self, parameters: EditProcessingStepParameters):
|
|
37
|
+
self._execute(parameters)
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
51
|
-
|
|
50
|
+
def execute(self, parameters: GenericProcessingConfigureParameters):
|
|
51
|
+
self._execute(parameters)
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
60
|
-
|
|
59
|
+
def execute(self):
|
|
60
|
+
self._execute_internal()
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
class UploadConfigurationAction(UploadAction):
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
24
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
+
def execute(self):
|
|
31
|
+
self._execute_internal()
|
|
30
32
|
|
|
31
33
|
|
|
32
34
|
class WorkDataRenameAction(ActionWithParametersHco[SetNameWorkDataParameters]):
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
def execute(self, parameters: SetNameWorkDataParameters):
|
|
36
|
+
self._execute(parameters)
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
+
def execute(self, parameters: SetCommentWorkDataParameters):
|
|
44
|
+
self._execute(parameters)
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
+
def execute(self, parameters: SetTagsWorkDataParameters):
|
|
52
|
+
self._execute(parameters)
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
+
def execute(self):
|
|
61
|
+
self._execute_internal()
|
|
60
62
|
|
|
61
63
|
|
|
62
64
|
class WorkDataDisallowAction(ActionHco):
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
def execute(self):
|
|
66
|
+
self._execute_internal()
|
|
65
67
|
|
|
66
68
|
|
|
67
69
|
class WorkDataHideAction(ActionHco):
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
def execute(self):
|
|
71
|
+
self._execute_internal()
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
class WorkDataUnHideAction(ActionHco):
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
def execute(self):
|
|
76
|
+
self._execute_internal()
|
|
75
77
|
|
|
76
78
|
|
|
77
79
|
class WorkDataHco(Hco[WorkDataEntity]):
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: openapi.json
|
|
3
|
-
# timestamp: 2024-11-
|
|
3
|
+
# timestamp: 2024-11-27T15:40:27+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -94,8 +94,9 @@ class EditProcessingStepParameters(BaseModel):
|
|
|
94
94
|
populate_by_name=True,
|
|
95
95
|
)
|
|
96
96
|
title: constr(min_length=1) = Field(..., alias='Title')
|
|
97
|
+
is_public: bool = Field(..., alias='IsPublic')
|
|
97
98
|
function_name: constr(min_length=1) = Field(..., alias='FunctionName')
|
|
98
|
-
|
|
99
|
+
version: constr(min_length=1) = Field(..., alias='Version')
|
|
99
100
|
|
|
100
101
|
|
|
101
102
|
class EntryPointHtoOpenApiProperties(BaseModel):
|
|
@@ -489,17 +490,18 @@ class AdminJobFilterParameter(BaseModel):
|
|
|
489
490
|
extra='allow',
|
|
490
491
|
populate_by_name=True,
|
|
491
492
|
)
|
|
492
|
-
|
|
493
|
+
work_data_url: str | None = Field(None, alias='WorkDataUrl')
|
|
493
494
|
name: str | None = Field(None, alias='Name')
|
|
494
495
|
state: JobStates | None = Field(None, alias='State')
|
|
495
496
|
show_hidden: bool | None = Field(None, alias='ShowHidden')
|
|
496
|
-
|
|
497
|
+
processing_step_url: str | None = Field(None, alias='ProcessingStepUrl')
|
|
497
498
|
created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
|
|
498
499
|
created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
|
|
499
500
|
tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
|
|
500
501
|
tags_by_or: List[str] | None = Field(None, alias='TagsByOr')
|
|
501
|
-
|
|
502
|
+
parent_job_url: str | None = Field(None, alias='ParentJobUrl')
|
|
502
503
|
is_sub_job: bool | None = Field(None, alias='IsSubJob')
|
|
504
|
+
user_url: str | None = Field(None, alias='UserUrl')
|
|
503
505
|
|
|
504
506
|
|
|
505
507
|
class AdminJobQueryResultHtoOpenApi(BaseModel):
|
|
@@ -550,8 +552,11 @@ class AdminWorkDataFilterParameter(BaseModel):
|
|
|
550
552
|
extra='allow',
|
|
551
553
|
populate_by_name=True,
|
|
552
554
|
)
|
|
553
|
-
|
|
555
|
+
producer_processing_step_url: str | None = Field(
|
|
556
|
+
None, alias='ProducerProcessingStepUrl'
|
|
557
|
+
)
|
|
554
558
|
name_contains: str | None = Field(None, alias='NameContains')
|
|
559
|
+
user_url: str | None = Field(None, alias='UserUrl')
|
|
555
560
|
show_hidden: bool | None = Field(None, alias='ShowHidden')
|
|
556
561
|
media_type_contains: str | None = Field(None, alias='MediaTypeContains')
|
|
557
562
|
tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
|
|
@@ -560,6 +565,7 @@ class AdminWorkDataFilterParameter(BaseModel):
|
|
|
560
565
|
created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
|
|
561
566
|
created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
|
|
562
567
|
is_deletable: bool | None = Field(None, alias='IsDeletable')
|
|
568
|
+
is_used: bool | None = Field(None, alias='IsUsed')
|
|
563
569
|
|
|
564
570
|
|
|
565
571
|
class AdminWorkDataQueryParameters(BaseModel):
|
|
@@ -620,13 +626,14 @@ class JobFilterParameter(BaseModel):
|
|
|
620
626
|
state: JobStates | None = Field(None, alias='State')
|
|
621
627
|
name: str | None = Field(None, alias='Name')
|
|
622
628
|
show_hidden: bool | None = Field(None, alias='ShowHidden')
|
|
623
|
-
|
|
629
|
+
work_data_url: str | None = Field(None, alias='WorkDataUrl')
|
|
624
630
|
created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
|
|
625
631
|
created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
|
|
626
632
|
tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
|
|
627
633
|
tags_by_or: List[str] | None = Field(None, alias='TagsByOr')
|
|
628
|
-
|
|
634
|
+
processing_step_url: str | None = Field(None, alias='ProcessingStepUrl')
|
|
629
635
|
is_sub_job: bool | None = Field(None, alias='IsSubJob')
|
|
636
|
+
parent_job_url: str | None = Field(None, alias='ParentJobUrl')
|
|
630
637
|
|
|
631
638
|
|
|
632
639
|
class JobHtoOpenApiProperties(BaseModel):
|
|
@@ -777,6 +784,9 @@ class WorkDataFilterParameter(BaseModel):
|
|
|
777
784
|
populate_by_name=True,
|
|
778
785
|
)
|
|
779
786
|
name_contains: str | None = Field(None, alias='NameContains')
|
|
787
|
+
producer_processing_step_url: str | None = Field(
|
|
788
|
+
None, alias='ProducerProcessingStepUrl'
|
|
789
|
+
)
|
|
780
790
|
show_hidden: bool | None = Field(None, alias='ShowHidden')
|
|
781
791
|
media_type_contains: str | None = Field(None, alias='MediaTypeContains')
|
|
782
792
|
tags_by_and: List[str] | None = Field(None, alias='TagsByAnd')
|
|
@@ -785,6 +795,7 @@ class WorkDataFilterParameter(BaseModel):
|
|
|
785
795
|
created_before: AwareDatetime | None = Field(None, alias='CreatedBefore')
|
|
786
796
|
created_after: AwareDatetime | None = Field(None, alias='CreatedAfter')
|
|
787
797
|
is_deletable: bool | None = Field(None, alias='IsDeletable')
|
|
798
|
+
is_used: bool | None = Field(None, alias='IsUsed')
|
|
788
799
|
|
|
789
800
|
|
|
790
801
|
class WorkDataHtoOpenApiProperties(BaseModel):
|
|
@@ -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,
|
|
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
|
-
|
|
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
|
-
|
|
214
|
+
version=new_version
|
|
213
215
|
))
|
|
214
216
|
self.refresh()
|
|
215
217
|
return self
|
{pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pinexq-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0.20241203.1
|
|
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>
|
{pinexq_client-0.7.0.20241113.1.dist-info → pinexq_client-0.9.0.20241203.1.dist-info}/RECORD
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
pinexq_client-0.
|
|
2
|
-
pinexq_client-0.
|
|
3
|
-
pinexq_client-0.
|
|
4
|
-
pinexq_client-0.
|
|
1
|
+
pinexq_client-0.9.0.20241203.1.dist-info/METADATA,sha256=YJLPPrztDSpMg_ewegmfvz1wfB_WAfuSxJ6EM4TPGyo,3278
|
|
2
|
+
pinexq_client-0.9.0.20241203.1.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
|
3
|
+
pinexq_client-0.9.0.20241203.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
pinexq_client-0.9.0.20241203.1.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=
|
|
24
|
+
pinexq_client/job_management/__init__.py,sha256=r-Hgjon5a7uvuj1x3rSf3btMjG28xcQqnvaVEsEksw8,164
|
|
25
25
|
pinexq_client/job_management/enterjma.py,sha256=Ivl_jVPw_gaLyU5nKbywM-bbVGpn0MoCrZ0DMbJYf3s,1411
|
|
26
|
-
pinexq_client/job_management/hcos/__init__.py,sha256=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
46
|
+
pinexq_client/job_management/model/open_api_generated.py,sha256=BxSGNyJDbr6x-LKCELGg3Mctn0TZasKYEQ2aOHLFqjo,31458
|
|
47
47
|
pinexq_client/job_management/model/sirenentities.py,sha256=OInvxHpC6mnnYQjOMM2xAw7uLtvWwj9E2EQSRJe2jDo,3202
|
|
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=
|
|
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.
|
|
53
|
+
pinexq_client-0.9.0.20241203.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|