pinexq-client 0.10.5rc1__py3-none-any.whl → 1.0.0__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.
Files changed (58) hide show
  1. {pinexq_client → pinexq/client}/core/api_event_manager.py +3 -4
  2. {pinexq_client → pinexq/client}/core/enterapi.py +6 -4
  3. {pinexq_client → pinexq/client}/core/exceptions.py +2 -2
  4. {pinexq_client → pinexq/client}/core/hco/action_hco.py +3 -3
  5. {pinexq_client → pinexq/client}/core/hco/action_with_parameters_hco.py +4 -4
  6. {pinexq_client → pinexq/client}/core/hco/download_link_hco.py +2 -2
  7. {pinexq_client → pinexq/client}/core/hco/hco_base.py +1 -1
  8. {pinexq_client → pinexq/client}/core/hco/link_hco.py +6 -8
  9. pinexq/client/core/hco/unavailable.py +36 -0
  10. {pinexq_client → pinexq/client}/core/hco/upload_action_hco.py +4 -5
  11. {pinexq_client → pinexq/client}/job_management/__init__.py +1 -1
  12. {pinexq_client → pinexq/client}/job_management/enterjma.py +11 -9
  13. {pinexq_client → pinexq/client}/job_management/hcos/entrypoint_hco.py +9 -9
  14. {pinexq_client → pinexq/client}/job_management/hcos/info_hco.py +5 -5
  15. pinexq/client/job_management/hcos/input_dataslot_hco.py +88 -0
  16. {pinexq_client → pinexq/client}/job_management/hcos/job_hco.py +22 -16
  17. pinexq/client/job_management/hcos/job_query_result_hco.py +89 -0
  18. {pinexq_client → pinexq/client}/job_management/hcos/job_used_tags_hco.py +5 -5
  19. {pinexq_client → pinexq/client}/job_management/hcos/jobsroot_hco.py +13 -16
  20. {pinexq_client → pinexq/client}/job_management/hcos/output_dataslot_hco.py +6 -9
  21. {pinexq_client → pinexq/client}/job_management/hcos/processing_step_hco.py +22 -14
  22. {pinexq_client → pinexq/client}/job_management/hcos/processing_step_used_tags_hco.py +5 -5
  23. pinexq/client/job_management/hcos/processingstep_query_result_hco.py +91 -0
  24. {pinexq_client → pinexq/client}/job_management/hcos/processingsteproot_hco.py +14 -15
  25. {pinexq_client → pinexq/client}/job_management/hcos/user_hco.py +4 -4
  26. {pinexq_client → pinexq/client}/job_management/hcos/workdata_hco.py +15 -15
  27. pinexq/client/job_management/hcos/workdata_query_result_hco.py +91 -0
  28. {pinexq_client → pinexq/client}/job_management/hcos/workdata_used_tags_query_result_hco.py +5 -5
  29. {pinexq_client → pinexq/client}/job_management/hcos/workdataroot_hco.py +16 -14
  30. {pinexq_client → pinexq/client}/job_management/model/open_api_generated.py +6 -3
  31. {pinexq_client → pinexq/client}/job_management/model/sirenentities.py +14 -12
  32. {pinexq_client → pinexq/client}/job_management/tool/job.py +20 -25
  33. {pinexq_client → pinexq/client}/job_management/tool/job_group.py +6 -7
  34. {pinexq_client → pinexq/client}/job_management/tool/processing_step.py +26 -15
  35. {pinexq_client → pinexq/client}/job_management/tool/workdata.py +7 -8
  36. {pinexq_client-0.10.5rc1.dist-info → pinexq_client-1.0.0.dist-info}/METADATA +10 -10
  37. pinexq_client-1.0.0.dist-info/RECORD +52 -0
  38. {pinexq_client-0.10.5rc1.dist-info → pinexq_client-1.0.0.dist-info}/WHEEL +2 -2
  39. pinexq_client/core/hco/unavailable.py +0 -36
  40. pinexq_client/job_management/hcos/input_dataslot_hco.py +0 -86
  41. pinexq_client/job_management/hcos/job_query_result_hco.py +0 -89
  42. pinexq_client/job_management/hcos/processingstep_query_result_hco.py +0 -94
  43. pinexq_client/job_management/hcos/workdata_query_result_hco.py +0 -91
  44. pinexq_client-0.10.5rc1.dist-info/RECORD +0 -52
  45. {pinexq_client → pinexq/client}/core/__init__.py +0 -0
  46. {pinexq_client → pinexq/client}/core/base_relations.py +0 -0
  47. {pinexq_client → pinexq/client}/core/hco/__init__.py +0 -0
  48. {pinexq_client → pinexq/client}/core/http_headers.py +0 -0
  49. {pinexq_client → pinexq/client}/core/media_types.py +0 -0
  50. {pinexq_client → pinexq/client}/core/model/__init__.py +0 -0
  51. {pinexq_client → pinexq/client}/core/model/error.py +0 -0
  52. {pinexq_client → pinexq/client}/core/model/sirenmodels.py +0 -0
  53. {pinexq_client → pinexq/client}/core/polling.py +0 -0
  54. {pinexq_client → pinexq/client}/core/sirenaccess.py +0 -0
  55. {pinexq_client → pinexq/client}/job_management/hcos/__init__.py +0 -0
  56. {pinexq_client → pinexq/client}/job_management/known_relations.py +0 -0
  57. {pinexq_client → pinexq/client}/job_management/model/__init__.py +0 -0
  58. {pinexq_client → pinexq/client}/job_management/tool/__init__.py +0 -0
@@ -0,0 +1,52 @@
1
+ pinexq/client/core/__init__.py,sha256=zO9vUuAl6AEokL-SqQO3Jl1qrxFBZPA2kH99VNZugEU,598
2
+ pinexq/client/core/api_event_manager.py,sha256=CK7A1V1m_54MgW18qUhzxorEqJvDzYFJtKfVlnrMXEw,5335
3
+ pinexq/client/core/base_relations.py,sha256=oIUS58pkbMDdqm-3YOdsenhL1smtzeAk4fp7-U595MY,162
4
+ pinexq/client/core/enterapi.py,sha256=B-YMvJTqhgFkw6pNMXJNiTZbjHNP-avWq9c2njaGeXI,679
5
+ pinexq/client/core/exceptions.py,sha256=9zQU4Hgm6PDI_78RlLDvlaeo_Oa2TXT8HyPN4Qg4_Iw,2210
6
+ pinexq/client/core/hco/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ pinexq/client/core/hco/action_hco.py,sha256=0nlT4JDZh3pPrXejNdRYxqpnq1VVDLLUbLnq6bwZhpQ,2492
8
+ pinexq/client/core/hco/action_with_parameters_hco.py,sha256=IrOrtrvi_xXelYTSoqYjVXEwTwbKxMGGKkQjsoNSCTI,3246
9
+ pinexq/client/core/hco/download_link_hco.py,sha256=8gZtK-Yxj3O2bLeALkkUQRTPsJwUn-X5V6b8Vs8mXxk,1302
10
+ pinexq/client/core/hco/hco_base.py,sha256=zyT4YYcD2uquhV4McwqlWM7fwmnW2jQIg4YtarG0tjA,3518
11
+ pinexq/client/core/hco/link_hco.py,sha256=7hMIpTzVhD-jcWief2Nwrn-Fy6PK_Soraqk1fCCvqx8,3755
12
+ pinexq/client/core/hco/unavailable.py,sha256=-79mASXmzcX53LL9dZ4RUi-lBTvQU2KDQdz9xHNatek,1004
13
+ pinexq/client/core/hco/upload_action_hco.py,sha256=pIShhlx12jRUamWr3q14v64z-lQoJaYLyxiaj-Z6JFY,4634
14
+ pinexq/client/core/http_headers.py,sha256=tY4h3DKVDMkjw9DLFn57HdEnwR1NAixMF8Yjgy3gjQY,183
15
+ pinexq/client/core/media_types.py,sha256=GhrTEXqIb4vAM9Bl-i3WybYiL3T_Uy1Eu6hvLN7Oexc,745
16
+ pinexq/client/core/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ pinexq/client/core/model/error.py,sha256=ZDbUlwsj7d8XPMolSSLTFwgs3RBLvOvgmlEtoBuon5Y,418
18
+ pinexq/client/core/model/sirenmodels.py,sha256=vGRQlhM2cSa2caxQel91Jr48KWqM-vMYX32iaQCzIds,5547
19
+ pinexq/client/core/polling.py,sha256=nNEDONEkB3Gu5WUMm2u9RFG1OIclnixaiy7l_U2Z4No,1146
20
+ pinexq/client/core/sirenaccess.py,sha256=F7eZI5Pz79el0D30SYNGsiS2qWaAZF_jrCrUy-q2GgY,6992
21
+ pinexq/client/job_management/__init__.py,sha256=9oipbDOkUAGt2qUCraheklny69n3yvLAUxrMcRTF4OM,598
22
+ pinexq/client/job_management/enterjma.py,sha256=N_jNM2UhQmWL8e-xBrTHbjZzP7WkX98MyFuKsYgD-XQ,3252
23
+ pinexq/client/job_management/hcos/__init__.py,sha256=TZgs5kuBk3lSBxPfn5ehgbdUgzPy2jn1PC3Ea6VQY-k,584
24
+ pinexq/client/job_management/hcos/entrypoint_hco.py,sha256=omFPggY7XGRWI5ogR85I7BHUi5o6OBnLyMggYh76JEg,2204
25
+ pinexq/client/job_management/hcos/info_hco.py,sha256=iJRjPfb1p4EXqSJA0xSRPxwEpAjquwEOuxHcUICQioI,2013
26
+ pinexq/client/job_management/hcos/input_dataslot_hco.py,sha256=CBw-FND7aUOUquXi3u09KK-BidZ3ChrmLy1pE-jmdvI,3590
27
+ pinexq/client/job_management/hcos/job_hco.py,sha256=dw4S_4bHtZafEgU6moiidkqyakCpOqqKnTTmWU2Ubiw,8764
28
+ pinexq/client/job_management/hcos/job_query_result_hco.py,sha256=52fIrEKS7mVzEt8Ugg1_xP7O2NptCy_v-v6F5h8CXDE,3795
29
+ pinexq/client/job_management/hcos/job_used_tags_hco.py,sha256=BGNGOQE33zW8AhYG8tVn1O4nExetBrKCXzCPfe73W1w,1603
30
+ pinexq/client/job_management/hcos/jobsroot_hco.py,sha256=sKapT6tO7-q0P2bwpoPAH8kIugwYOJeB4IF7nQBFdJI,4716
31
+ pinexq/client/job_management/hcos/output_dataslot_hco.py,sha256=nwS5bY5bCZtvFWgDELCUlTxpa6qdDCD1LM2LoDlmNuM,1475
32
+ pinexq/client/job_management/hcos/processing_step_hco.py,sha256=fxzBeHAdud2PxU8xVOYOZXgA-YUN9_g1nBgA_b3tb2Y,12195
33
+ pinexq/client/job_management/hcos/processing_step_used_tags_hco.py,sha256=zsed5d04FpZNacZW9l4x-kflWpl1_thGAJfIsWO0co0,1844
34
+ pinexq/client/job_management/hcos/processingstep_query_result_hco.py,sha256=1TMTfxEucryTPzQl4UZcgJb8Ro-9j9lqo2OMlM_hV6Q,4132
35
+ pinexq/client/job_management/hcos/processingsteproot_hco.py,sha256=O9e9Vj4cAc5qiT7RYEXsRLggKIfN8n4eUr-847cZRvk,4041
36
+ pinexq/client/job_management/hcos/user_hco.py,sha256=qihX1lRbedj37shrzYTjdQPgL_giuSRCLhoUqtq1chs,1019
37
+ pinexq/client/job_management/hcos/workdata_hco.py,sha256=_7iKuMr7nKosYPFFgqxdflgwY3NZ-xeZIgpwdfp9yW8,6968
38
+ pinexq/client/job_management/hcos/workdata_query_result_hco.py,sha256=wgFm5SmgSnj9KbvxkPFYYBWnLANQRkf9IdoA-Yvfohs,3766
39
+ pinexq/client/job_management/hcos/workdata_used_tags_query_result_hco.py,sha256=uIDB7admcEe81lhWBp0KOuM2Ric7caD7Em6r41Rm9ps,1888
40
+ pinexq/client/job_management/hcos/workdataroot_hco.py,sha256=WRAFihgbyxJBrGKEhAzQwds57G_WndoS0EAW1AZ38tU,4221
41
+ pinexq/client/job_management/known_relations.py,sha256=do-u2wjb6u_HK2-y604f2gs3rk9O19MTIZpvbkfTSpA,905
42
+ pinexq/client/job_management/model/__init__.py,sha256=iuAKRXdW_Mxo0i3HsBfEzhJJZUKkNe3qs4gLW-ge1PU,63
43
+ pinexq/client/job_management/model/open_api_generated.py,sha256=ONCwkochTvF275POWb0KOHyZkq4x5gW4WmOI5DYA5mo,40771
44
+ pinexq/client/job_management/model/sirenentities.py,sha256=E29Z2MSAYIO1RYvOW_rDpzUHZUMNMioQd_-k_S4KnbQ,3958
45
+ pinexq/client/job_management/tool/__init__.py,sha256=zPobd-hQyANHzC0-TjJG91z9XrewvE54ZJ6VViymW5M,128
46
+ pinexq/client/job_management/tool/job.py,sha256=w81-WVVjrdg4wNaQ1yoCqJLIvvcLAhCYi-gX4at70WY,34688
47
+ pinexq/client/job_management/tool/job_group.py,sha256=ZFUHTk6j3oZOD52D6SOsREdBm5hVn9iUhLykrN_Ghes,11117
48
+ pinexq/client/job_management/tool/processing_step.py,sha256=vlByzSHNY-f_QwP3O__qKCBuI7QhQiY-G0pkhUC7aJ4,15595
49
+ pinexq/client/job_management/tool/workdata.py,sha256=eDzinv70fa76xP0LjugGzicl8GxkQ6Ozq8rz-c4k5IU,6080
50
+ pinexq_client-1.0.0.dist-info/WHEEL,sha256=XV0cjMrO7zXhVAIyyc8aFf1VjZ33Fen4IiJk5zFlC3g,80
51
+ pinexq_client-1.0.0.dist-info/METADATA,sha256=hTEtC7tMU2-Ig-nRLurKhLd38P1eE5rsGax0193zZa4,3459
52
+ pinexq_client-1.0.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.22
2
+ Generator: uv 0.9.26
3
3
  Root-Is-Purelib: true
4
- Tag: py3-none-any
4
+ Tag: py3-none-any
@@ -1,36 +0,0 @@
1
- from abc import ABC, ABCMeta, abstractmethod
2
-
3
- from pinexq_client.core import NotAvailableException
4
-
5
-
6
- class HypermediaAvailability(ABC):
7
- def __bool__(self) -> bool:
8
- return self.is_available()
9
-
10
- @staticmethod
11
- @abstractmethod
12
- def is_available() -> bool:
13
- ...
14
-
15
- class UnavailableAction(HypermediaAvailability):
16
- """This class is used to represent an action that is not available. It is used to avoid None
17
- checks in the code."""
18
-
19
- def execute(self, *args, **kwargs):
20
- raise NotAvailableException(f"Error while executing action: action is not available")
21
-
22
- @staticmethod
23
- def is_available() -> bool:
24
- return False
25
-
26
-
27
- class UnavailableLink(HypermediaAvailability):
28
- """This class is used to represent a link that is not available. It is used to avoid None
29
- checks in the code."""
30
-
31
- def navigate(self):
32
- raise NotAvailableException(f"Error while navigating: link is not available")
33
-
34
- @staticmethod
35
- def is_available() -> bool:
36
- return False
@@ -1,86 +0,0 @@
1
- from typing import Self
2
-
3
- import httpx
4
-
5
- from pinexq_client.core import Link, MediaTypes
6
- from pinexq_client.core.hco.action_hco import ActionHco
7
- from pinexq_client.core.hco.action_with_parameters_hco import ActionWithParametersHco
8
- from pinexq_client.core.hco.hco_base import Hco, Property
9
- from pinexq_client.core.hco.link_hco import LinkHco
10
- from pinexq_client.core.hco.unavailable import UnavailableAction
11
- from pinexq_client.core.hco.upload_action_hco import UploadAction, UploadParameters
12
- from pinexq_client.job_management.hcos.workdata_hco import WorkDataLink, WorkDataHco
13
- from pinexq_client.job_management.known_relations import Relations
14
- from pinexq_client.job_management.model.open_api_generated import SelectWorkDataForDataSlotParameters, \
15
- SelectWorkDataCollectionForDataSlotParameters
16
- from pinexq_client.job_management.model.sirenentities import InputDataSlotEntity, WorkDataEntity
17
-
18
-
19
- class InputDataSlotLink(LinkHco):
20
- def navigate(self) -> 'InputDataSlotHco':
21
- return InputDataSlotHco.from_entity(self._navigate_internal(InputDataSlotEntity), self._client)
22
-
23
-
24
- class InputDataSlotSelectWorkDataAction(ActionWithParametersHco[SelectWorkDataForDataSlotParameters]):
25
- def execute(self, parameters: SelectWorkDataForDataSlotParameters):
26
- self._execute(parameters)
27
-
28
-
29
- class InputDataSlotSelectWorkDataCollectionAction(
30
- ActionWithParametersHco[SelectWorkDataCollectionForDataSlotParameters]):
31
- def execute(self, parameters: SelectWorkDataCollectionForDataSlotParameters):
32
- self._execute(parameters)
33
-
34
-
35
- class InputDataSlotUploadWorkDataAction(UploadAction):
36
- def execute(self, parameters: UploadParameters) -> WorkDataLink:
37
- url = self._upload(parameters)
38
- link = Link.from_url(url, [str(Relations.CREATED_RESSOURCE)], "Uploaded workdata", MediaTypes.SIREN)
39
- return WorkDataLink.from_link(self._client, link)
40
-
41
-
42
- class InputDataSlotClearDataAction(ActionHco):
43
- def execute(self):
44
- self._execute_internal()
45
-
46
-
47
- class InputDataSlotHco(Hco[InputDataSlotEntity]):
48
-
49
- title: str | None = Property()
50
- description: str | None = Property()
51
- name: str | None = Property()
52
- media_type: str | None = Property()
53
- selected_workdatas: list[WorkDataHco]
54
- is_configured: bool | None = Property()
55
-
56
- select_workdata_action: InputDataSlotSelectWorkDataAction | UnavailableAction
57
- select_workdata_collection_action: InputDataSlotSelectWorkDataCollectionAction | UnavailableAction
58
- clear_workdata_action: InputDataSlotClearDataAction | UnavailableAction
59
-
60
- @classmethod
61
- def from_entity(cls, entity: InputDataSlotEntity, client: httpx.Client) -> Self:
62
- instance = cls(client, entity)
63
- Hco.check_classes(instance._entity.class_, ["InputDataSlot"])
64
-
65
- # actions
66
- instance.select_workdata_action = InputDataSlotSelectWorkDataAction.from_entity_optional(
67
- client, instance._entity, "SelectWorkData")
68
- instance.select_workdata_collection_action = InputDataSlotSelectWorkDataCollectionAction.from_entity_optional(
69
- client, instance._entity, "SelectWorkDataCollection")
70
- instance.clear_workdata_action = InputDataSlotClearDataAction.from_entity_optional(
71
- client, instance._entity, "Clear")
72
-
73
- instance._extract_workdata()
74
-
75
- return instance
76
-
77
- def _extract_workdata(self):
78
- self.selected_workdatas = []
79
-
80
- workdatas: list[WorkDataEntity] = self._entity.find_all_entities_with_relation(Relations.SELECTED,
81
- WorkDataEntity)
82
- if not workdatas:
83
- return
84
-
85
- self.selected_workdatas = [WorkDataHco.from_entity(workdata, self._client)
86
- for workdata in workdatas]
@@ -1,89 +0,0 @@
1
- from typing import List, Iterator, Self
2
-
3
- import httpx
4
-
5
- from pinexq_client.core.hco.hco_base import Hco, Property
6
- from pinexq_client.core.hco.link_hco import LinkHco
7
- from pinexq_client.core.hco.unavailable import UnavailableLink
8
- from pinexq_client.job_management.hcos.job_hco import JobHco
9
- from pinexq_client.job_management.known_relations import Relations
10
- from pinexq_client.job_management.model.sirenentities import JobQueryResultEntity, JobEntity
11
-
12
-
13
- class JobQueryResultPaginationLink(LinkHco):
14
- def navigate(self) -> 'JobQueryResultHco':
15
- return JobQueryResultHco.from_entity(self._client, self._navigate_internal(JobQueryResultEntity))
16
-
17
-
18
- class JobQueryResultLink(LinkHco):
19
- def navigate(self) -> 'JobQueryResultHco':
20
- return JobQueryResultHco.from_entity(self._client, self._navigate_internal(JobQueryResultEntity))
21
-
22
-
23
- class JobQueryResultHco(Hco[JobQueryResultEntity]):
24
- self_link: JobQueryResultLink
25
- all_link: JobQueryResultPaginationLink | UnavailableLink
26
- first_link: JobQueryResultPaginationLink | UnavailableLink
27
- last_link: JobQueryResultPaginationLink | UnavailableLink
28
- next_link: JobQueryResultPaginationLink | UnavailableLink
29
- previous_link: JobQueryResultPaginationLink | UnavailableLink
30
-
31
- total_entities: int = Property()
32
- current_entities_count: int = Property()
33
- jobs: List[JobHco]
34
- remaining_tags: List[str] | None = Property()
35
-
36
- @classmethod
37
- def from_entity(cls, client: httpx.Client, entity: JobQueryResultEntity) -> 'JobQueryResultHco':
38
- instance = cls(client, entity)
39
-
40
- Hco.check_classes(instance._entity.class_, ["JobQueryResult"])
41
-
42
- # pagination links
43
- instance.self_link = JobQueryResultLink.from_entity(instance._client, instance._entity, Relations.SELF)
44
- instance.all_link = JobQueryResultPaginationLink.from_entity_optional(instance._client, instance._entity,
45
- Relations.ALL)
46
- instance.first_link = JobQueryResultPaginationLink.from_entity_optional(instance._client, instance._entity,
47
- Relations.FIRST)
48
- instance.last_link = JobQueryResultPaginationLink.from_entity_optional(instance._client, instance._entity,
49
- Relations.LAST)
50
- instance.next_link = JobQueryResultPaginationLink.from_entity_optional(instance._client, instance._entity,
51
- Relations.NEXT)
52
- instance.previous_link = JobQueryResultPaginationLink.from_entity_optional(instance._client, instance._entity,
53
- Relations.PREVIOUS)
54
-
55
- # entities
56
- instance._extract_jobs()
57
-
58
- return instance
59
-
60
- def _extract_jobs(self):
61
- self.jobs = []
62
- jobs = self._entity.find_all_entities_with_relation(Relations.ITEM, JobEntity)
63
- for job in jobs:
64
- job_hco: JobHco = JobHco.from_entity(job, self._client)
65
- self.jobs.append(job_hco)
66
-
67
- def iter(self) -> Iterator[Self]:
68
- """
69
- Returns an Iterator of `JobQueryResultHco` so that all pages can be processed in a loop.
70
-
71
- Returns:
72
- An iterator of `JobQueryResultHco` objects
73
- """
74
- result = self
75
- while result is not None:
76
- yield result
77
- if isinstance(result.next_link, UnavailableLink):
78
- return
79
- result = result.next_link.navigate()
80
-
81
- def iter_flat(self) -> Iterator[JobHco]:
82
- """
83
- Returns an Iterator of `JobHco` so that all jobs can be processed in a loop.
84
-
85
- Returns:
86
- An iterator of `JobHco` objects
87
- """
88
- for page in self.iter():
89
- yield from page.jobs
@@ -1,94 +0,0 @@
1
- from typing import Self, List, Iterator
2
-
3
- import httpx
4
-
5
- from pinexq_client.core.hco.hco_base import Hco, Property
6
- from pinexq_client.core.hco.link_hco import LinkHco
7
- from pinexq_client.core.hco.unavailable import UnavailableLink
8
- from pinexq_client.job_management.hcos.processing_step_hco import ProcessingStepHco
9
- from pinexq_client.job_management.known_relations import Relations
10
- from pinexq_client.job_management.model.sirenentities import (
11
- ProcessingStepQueryResultEntity,
12
- ProcessingStepEntity
13
- )
14
-
15
-
16
- class ProcessingStepQueryResultPaginationLink(LinkHco):
17
- def navigate(self) -> 'ProcessingStepQueryResultHco':
18
- return ProcessingStepQueryResultHco.from_entity(self._navigate_internal(ProcessingStepQueryResultEntity),
19
- self._client)
20
-
21
-
22
- class ProcessingStepQueryResultLink(LinkHco):
23
- def navigate(self) -> 'ProcessingStepQueryResultHco':
24
- return ProcessingStepQueryResultHco.from_entity(self._navigate_internal(ProcessingStepQueryResultEntity),
25
- self._client)
26
-
27
-
28
- class ProcessingStepQueryResultHco(Hco[ProcessingStepQueryResultEntity]):
29
- total_entities: int = Property()
30
- current_entities_count: int = Property()
31
- processing_steps: list[ProcessingStepHco]
32
- remaining_tags: List[str] | None = Property()
33
-
34
- self_link: ProcessingStepQueryResultLink
35
- all_link: ProcessingStepQueryResultPaginationLink | UnavailableLink
36
- first_link: ProcessingStepQueryResultPaginationLink | UnavailableLink
37
- last_link: ProcessingStepQueryResultPaginationLink | UnavailableLink
38
- next_link: ProcessingStepQueryResultPaginationLink | UnavailableLink
39
- previous_link: ProcessingStepQueryResultPaginationLink | UnavailableLink
40
-
41
- @classmethod
42
- def from_entity(cls, entity: ProcessingStepQueryResultEntity, client: httpx.Client) -> Self:
43
- instance = cls(client, entity)
44
-
45
- Hco.check_classes(instance._entity.class_, ["ProcessingStepQueryResult"])
46
-
47
- # pagination links
48
- instance.self_link = ProcessingStepQueryResultLink.from_entity(
49
- instance._client, instance._entity, Relations.SELF)
50
- instance.all_link = ProcessingStepQueryResultPaginationLink.from_entity_optional(
51
- instance._client, instance._entity, Relations.ALL)
52
- instance.first_link = ProcessingStepQueryResultPaginationLink.from_entity_optional(
53
- instance._client, instance._entity, Relations.FIRST)
54
- instance.last_link = ProcessingStepQueryResultPaginationLink.from_entity_optional(
55
- instance._client, instance._entity, Relations.LAST)
56
- instance.next_link = ProcessingStepQueryResultPaginationLink.from_entity_optional(
57
- instance._client, instance._entity, Relations.NEXT)
58
- instance.previous_link = ProcessingStepQueryResultPaginationLink.from_entity_optional(
59
- instance._client, instance._entity, Relations.PREVIOUS)
60
-
61
- instance._extract_processing_steps()
62
-
63
- return instance
64
-
65
- def _extract_processing_steps(self):
66
- self.processing_steps = []
67
- processing_steps = self._entity.find_all_entities_with_relation(Relations.ITEM, ProcessingStepEntity)
68
- for processing_step in processing_steps:
69
- processing_step_hco: ProcessingStepHco = ProcessingStepHco.from_entity(processing_step, self._client)
70
- self.processing_steps.append(processing_step_hco)
71
-
72
- def iter(self) -> Iterator[Self]:
73
- """
74
- Returns an Iterator of `ProcessingStepQueryResultHco` objects so that all pages can be processed in a loop.
75
-
76
- Returns:
77
- An iterator of `ProcessingStepQueryResultHco` objects
78
- """
79
- result = self
80
- while result is not None:
81
- yield result
82
- if isinstance(result.next_link, UnavailableLink):
83
- return
84
- result = result.next_link.navigate()
85
-
86
- def iter_flat(self) -> Iterator[ProcessingStepHco]:
87
- """
88
- Returns an Iterator of `ProcessingStepHco` objects so that all processing steps can be processed in a loop.
89
-
90
- Returns:
91
- An iterator of `ProcessingStepHco` objects
92
- """
93
- for page in self.iter():
94
- yield from page.processing_steps
@@ -1,91 +0,0 @@
1
- from typing import Self, List, Iterator
2
-
3
- import httpx
4
-
5
- from pinexq_client.core.hco.hco_base import Hco, Property
6
- from pinexq_client.core.hco.link_hco import LinkHco
7
- from pinexq_client.core.hco.unavailable import UnavailableLink
8
- from pinexq_client.job_management.hcos.workdata_hco import WorkDataHco
9
- from pinexq_client.job_management.known_relations import Relations
10
- from pinexq_client.job_management.model.sirenentities import WorkDataQueryResultEntity, WorkDataEntity
11
-
12
-
13
- class WorkDataQueryResultPaginationLink(LinkHco):
14
- def navigate(self) -> 'WorkDataQueryResultHco':
15
- return WorkDataQueryResultHco.from_entity(self._navigate_internal(WorkDataQueryResultEntity), self._client)
16
-
17
-
18
- class WorkDataQueryResultLink(LinkHco):
19
- def navigate(self) -> 'WorkDataQueryResultHco':
20
- return WorkDataQueryResultHco.from_entity(self._navigate_internal(WorkDataQueryResultEntity), self._client)
21
-
22
-
23
- class WorkDataQueryResultHco(Hco[WorkDataQueryResultEntity]):
24
- workdata_query_action: WorkDataQueryResultEntity
25
-
26
- total_entities: int = Property()
27
- current_entities_count: int = Property()
28
- workdatas: list[WorkDataHco]
29
- remaining_tags: List[str] | None = Property()
30
-
31
- self_link: WorkDataQueryResultLink
32
- all_link: WorkDataQueryResultPaginationLink | UnavailableLink
33
- first_link: WorkDataQueryResultPaginationLink | UnavailableLink
34
- last_link: WorkDataQueryResultPaginationLink | UnavailableLink
35
- next_link: WorkDataQueryResultPaginationLink | UnavailableLink
36
- previous_link: WorkDataQueryResultPaginationLink | UnavailableLink
37
-
38
- @classmethod
39
- def from_entity(cls, entity: WorkDataQueryResultEntity, client: httpx.Client) -> Self:
40
- instance = cls(client, entity)
41
-
42
- Hco.check_classes(instance._entity.class_, ["WorkDataQueryResult"])
43
-
44
- # pagination links
45
- instance.self_link = WorkDataQueryResultLink.from_entity(
46
- instance._client, instance._entity, Relations.SELF)
47
- instance.all_link = WorkDataQueryResultPaginationLink.from_entity_optional(
48
- instance._client, instance._entity, Relations.ALL)
49
- instance.first_link = WorkDataQueryResultPaginationLink.from_entity_optional(
50
- instance._client, instance._entity, Relations.FIRST)
51
- instance.last_link = WorkDataQueryResultPaginationLink.from_entity_optional(
52
- instance._client, instance._entity, Relations.LAST)
53
- instance.next_link = WorkDataQueryResultPaginationLink.from_entity_optional(
54
- instance._client, instance._entity, Relations.NEXT)
55
- instance.previous_link = WorkDataQueryResultPaginationLink.from_entity_optional(
56
- instance._client, instance._entity, Relations.PREVIOUS)
57
-
58
- # entities
59
-
60
- instance._extract_workdatas()
61
-
62
- return instance
63
-
64
- def _extract_workdatas(self):
65
- self.workdatas = []
66
- workdatas = self._entity.find_all_entities_with_relation(Relations.ITEM, WorkDataEntity)
67
- for workdata in workdatas:
68
- workdata_hco: WorkDataHco = WorkDataHco.from_entity(workdata, self._client)
69
- self.workdatas.append(workdata_hco)
70
-
71
- def iter(self) -> Iterator[Self]:
72
- """
73
- Returns an Iterator of `WorkDataQueryResultHco` so that all pages can be processed in a loop.
74
- Returns:
75
- An iterator of `WorkDataQueryResultHco` objects
76
- """
77
- result = self
78
- while result is not None:
79
- yield result
80
- if isinstance(result.next_link, UnavailableLink):
81
- return
82
- result = result.next_link.navigate()
83
-
84
- def iter_flat(self) -> Iterator[WorkDataHco]:
85
- """
86
- Returns an Iterator of the `WorkDataHco` so that all WorkDatas can be processed in a loop.
87
- Returns:
88
- An iterator of `WorkDataHco` objects
89
- """
90
- for page in self.iter():
91
- yield from page.workdatas
@@ -1,52 +0,0 @@
1
- pinexq_client/core/__init__.py,sha256=zO9vUuAl6AEokL-SqQO3Jl1qrxFBZPA2kH99VNZugEU,598
2
- pinexq_client/core/api_event_manager.py,sha256=2V_y8T-e1ebnPcr0M9XGI1DYq3FTw0M_GrNmaNwfSVw,5348
3
- pinexq_client/core/base_relations.py,sha256=oIUS58pkbMDdqm-3YOdsenhL1smtzeAk4fp7-U595MY,162
4
- pinexq_client/core/enterapi.py,sha256=eB4F2_t3lCbMgKhy-M-Sf_u9MhuJMO7OGh-GB-4Cc-8,731
5
- pinexq_client/core/exceptions.py,sha256=NqB3y1ufjOfG3kv7Rz4ppXqJRAugt2zlgxkto2nIVQU,2228
6
- pinexq_client/core/hco/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pinexq_client/core/hco/action_hco.py,sha256=byPFuO3cQlc2MY20FMfJ4RvPUKrsVPtonmcT5CZU1A4,2542
8
- pinexq_client/core/hco/action_with_parameters_hco.py,sha256=qvtoqTfDHddxB0ALanWXNDobSpazCmK2_ulTuvax2A4,3280
9
- pinexq_client/core/hco/download_link_hco.py,sha256=_ijLtRfzy0qKG_QXpsWBZ8FJfp60o5Lw7QVv4_EpgPY,1335
10
- pinexq_client/core/hco/hco_base.py,sha256=u37c9bmjX_Ug49XgCHWdtrj7jrYIVQHkYllQQoijLGw,3534
11
- pinexq_client/core/hco/link_hco.py,sha256=XUk8anEu4hJET0ytKooB7-2Ntuzfes1rQziYXRE6D40,3845
12
- pinexq_client/core/hco/unavailable.py,sha256=CBJN_YnQRPPTwYr-3MIXQIgYXIDLw9ozIM2TNo0uewY,942
13
- pinexq_client/core/hco/upload_action_hco.py,sha256=oOGw0Z_nx67CbqJ-QkQJbffdXajBgKmBAfSfFtyq8wk,4690
14
- pinexq_client/core/http_headers.py,sha256=tY4h3DKVDMkjw9DLFn57HdEnwR1NAixMF8Yjgy3gjQY,183
15
- pinexq_client/core/media_types.py,sha256=GhrTEXqIb4vAM9Bl-i3WybYiL3T_Uy1Eu6hvLN7Oexc,745
16
- pinexq_client/core/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- pinexq_client/core/model/error.py,sha256=ZDbUlwsj7d8XPMolSSLTFwgs3RBLvOvgmlEtoBuon5Y,418
18
- pinexq_client/core/model/sirenmodels.py,sha256=vGRQlhM2cSa2caxQel91Jr48KWqM-vMYX32iaQCzIds,5547
19
- pinexq_client/core/polling.py,sha256=nNEDONEkB3Gu5WUMm2u9RFG1OIclnixaiy7l_U2Z4No,1146
20
- pinexq_client/core/sirenaccess.py,sha256=F7eZI5Pz79el0D30SYNGsiS2qWaAZF_jrCrUy-q2GgY,6992
21
- pinexq_client/job_management/__init__.py,sha256=mZOGFYzI4mvKc4I11nHuPPoaPhz0QkJC8eAVyZoiNes,598
22
- pinexq_client/job_management/enterjma.py,sha256=A9Uo9QSJAuAm9oHAhs0BIpEat77cRuWZvJ5zEOijhPs,3386
23
- pinexq_client/job_management/hcos/__init__.py,sha256=TZgs5kuBk3lSBxPfn5ehgbdUgzPy2jn1PC3Ea6VQY-k,584
24
- pinexq_client/job_management/hcos/entrypoint_hco.py,sha256=yeGw-tirgJf4MYziGnFQFfYaOOovrUf3kkb1U_wgN4k,2423
25
- pinexq_client/job_management/hcos/info_hco.py,sha256=9PZfx3SCuZiAvXsCsRR7XMfae18kd0Z1C_FLUyxiN_M,2122
26
- pinexq_client/job_management/hcos/input_dataslot_hco.py,sha256=QTTn0L1czLfu3HNMsCUCYihHDQBSUMicL-lFV9wtLD4,3474
27
- pinexq_client/job_management/hcos/job_hco.py,sha256=8Lq5RABq7XUp3Z6jhYegPgVPfm591-38eC8CCLes0KQ,8934
28
- pinexq_client/job_management/hcos/job_query_result_hco.py,sha256=I0G8YIlYDhTahLz8n06L8BywlcsMGNWUEsmEr4Sk0GU,3315
29
- pinexq_client/job_management/hcos/job_used_tags_hco.py,sha256=JKbZerZRway_HU6ujXiBjgP9TlLho1WD0syTmivsZpk,1706
30
- pinexq_client/job_management/hcos/jobsroot_hco.py,sha256=8ba2vFmTeVcW0GZrtUfyrxWt-OCTtKeGOc-NeCq1Rrg,4971
31
- pinexq_client/job_management/hcos/output_dataslot_hco.py,sha256=xIU5AsJT6zPqaR39gKOi_9N_VwdiUUPjvaXXMyA7HUU,1583
32
- pinexq_client/job_management/hcos/processing_step_hco.py,sha256=SyFDSvM7nmkvoA3oEdrRVFFcUPvZm5zY0YoanYOLrCg,12407
33
- pinexq_client/job_management/hcos/processing_step_used_tags_hco.py,sha256=K4Ub5FVK5ge8CtUeit9D23MPjQTMTC-X75dS9561oyw,1947
34
- pinexq_client/job_management/hcos/processingstep_query_result_hco.py,sha256=YcCgigKvOIggILixgaEbmnM23FlkjCgxnhZC2Eh98dY,3817
35
- pinexq_client/job_management/hcos/processingsteproot_hco.py,sha256=u2iXoDmujuXL3z-zL-u7MRht4czdiNwG9rWS0uj3diY,4295
36
- pinexq_client/job_management/hcos/user_hco.py,sha256=6GZrNeUZSZxwOiyCylkfl-pqDa1RL7Lc9Lg3vf0EuYc,1095
37
- pinexq_client/job_management/hcos/workdata_hco.py,sha256=QI1m_IUWVBesCft9UR1svCRsWDz16moY7XMhWvfFGcE,7206
38
- pinexq_client/job_management/hcos/workdata_query_result_hco.py,sha256=yxEnu_COMxP3mt553JZD13jjPyqSp3DJjgd8es5Nq_E,3520
39
- pinexq_client/job_management/hcos/workdata_used_tags_query_result_hco.py,sha256=oMHyG4NLOOPljzIE5324vVfo4zoGiNsQnT_HEuRi-nY,1991
40
- pinexq_client/job_management/hcos/workdataroot_hco.py,sha256=92Q3J8q28XRL7cw1Ac5F_hl_Y5ZNaZ2gThYLbTIrka0,4441
41
- pinexq_client/job_management/known_relations.py,sha256=do-u2wjb6u_HK2-y604f2gs3rk9O19MTIZpvbkfTSpA,905
42
- pinexq_client/job_management/model/__init__.py,sha256=iuAKRXdW_Mxo0i3HsBfEzhJJZUKkNe3qs4gLW-ge1PU,63
43
- pinexq_client/job_management/model/open_api_generated.py,sha256=nXIX64VwGTZQxDmlB4YNYSfMNTFsmW3anAmR2sMWhYA,40601
44
- pinexq_client/job_management/model/sirenentities.py,sha256=75ivnSU5OSuocITfluJ5o4o0CZldgtaP5PZqj4LhjJc,3950
45
- pinexq_client/job_management/tool/__init__.py,sha256=zPobd-hQyANHzC0-TjJG91z9XrewvE54ZJ6VViymW5M,128
46
- pinexq_client/job_management/tool/job.py,sha256=YOnNXk_tUSTjmHPcTwn_jYskjoqDg183tRHqG63HCuI,35037
47
- pinexq_client/job_management/tool/job_group.py,sha256=olwnPNqfT32XtLKJOzoq7j_Hb6NovUxy6YRJtQgLsW0,11221
48
- pinexq_client/job_management/tool/processing_step.py,sha256=AI290f0zXHu381PJr9CS0VXo-PsSk2m5ri7WXV3scE8,15851
49
- pinexq_client/job_management/tool/workdata.py,sha256=E1Qt945tocXiSZuQo2IbTnlgW2VRnq2ODEFQ96lXTDI,6270
50
- pinexq_client-0.10.5rc1.dist-info/WHEEL,sha256=KSLUh82mDPEPk0Bx0ScXlWL64bc8KmzIPNcpQZFV-6E,79
51
- pinexq_client-0.10.5rc1.dist-info/METADATA,sha256=cILJKlfrGB8hHBcu3_YBINKV2icOzVnz75xWRPG2cKI,3518
52
- pinexq_client-0.10.5rc1.dist-info/RECORD,,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes