pinexq-client 0.5.0.20241018.1__py3-none-any.whl → 0.5.0.20241030.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.
@@ -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__ = [6, 2, 4]
6
+ __jma_version__ = [7, 0, 0]
@@ -10,15 +10,15 @@ from pinexq_client.core.hco.link_hco import LinkHco
10
10
  from pinexq_client.core.hco.unavailable import UnavailableAction, UnavailableLink
11
11
  from pinexq_client.job_management.hcos.job_hco import JobLink
12
12
  from pinexq_client.job_management.hcos.job_query_result_hco import (
13
- JobQueryResultHco,
14
- JobQueryResultLink
13
+ JobQueryResultHco,
14
+ JobQueryResultLink
15
15
  )
16
16
  from pinexq_client.job_management.hcos.job_used_tags_hco import JobUsedTagsLink
17
17
  from pinexq_client.job_management.known_relations import Relations
18
18
  from pinexq_client.job_management.model.open_api_generated import (
19
- CreateJobParameters,
20
- JobQueryParameters,
21
- CreateSubJobParameters, SetJobsErrorStateParameters
19
+ CreateJobParameters,
20
+ JobQueryParameters,
21
+ CreateSubJobParameters
22
22
  )
23
23
  from pinexq_client.job_management.model.sirenentities import JobsRootEntity
24
24
 
@@ -54,23 +54,11 @@ class JobQueryAction(ActionWithParametersHco):
54
54
  return self._get_default_parameters(JobQueryParameters, JobQueryParameters())
55
55
 
56
56
 
57
- class JobSetToErrorStateAction(ActionWithParametersHco[SetJobsErrorStateParameters]):
58
- def execute(self, parameters: SetJobsErrorStateParameters):
59
- self._execute(parameters)
60
-
61
- def default_parameters(self) -> SetJobsErrorStateParameters:
62
- return self._get_default_parameters(SetJobsErrorStateParameters, SetJobsErrorStateParameters(
63
- message='Manually set to error state by admin',
64
- created_this_many_hours_ago=0,
65
- ))
66
-
67
-
68
57
  class JobsRootHco(Hco[JobsRootEntity]):
69
58
  create_job_action: CreateJobAction | UnavailableAction
70
59
  job_query_action: JobQueryAction | UnavailableAction
71
60
  create_subjob_action: CreateSubJobAction | UnavailableAction
72
61
  used_tags_link: JobUsedTagsLink | UnavailableLink
73
- set_jobs_to_error_state: JobSetToErrorStateAction | UnavailableAction
74
62
 
75
63
  self_link: 'JobsRootLink'
76
64
 
@@ -86,8 +74,6 @@ class JobsRootHco(Hco[JobsRootEntity]):
86
74
  instance.used_tags_link = JobUsedTagsLink.from_entity_optional(
87
75
  instance._client, instance._entity, Relations.USED_TAGS)
88
76
  instance.self_link = JobsRootLink.from_entity(instance._client, instance._entity, Relations.SELF)
89
- instance.set_jobs_to_error_state = JobSetToErrorStateAction.from_entity_optional(instance._client, instance._entity,
90
- "SetJobsToErrorState")
91
77
 
92
78
  return instance
93
79
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: openapi.json
3
- # timestamp: 2024-10-18T08:23:13+00:00
3
+ # timestamp: 2024-10-28T09:17:20+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -372,15 +372,6 @@ class SetJobTagsParameters(BaseModel):
372
372
  tags: List[str] = Field(..., alias='Tags')
373
373
 
374
374
 
375
- class SetJobsErrorStateParameters(BaseModel):
376
- model_config = ConfigDict(
377
- extra='allow',
378
- populate_by_name=True,
379
- )
380
- message: constr(min_length=1) = Field(..., alias='Message')
381
- created_before: AwareDatetime = Field(..., alias='CreatedBefore')
382
-
383
-
384
375
  class SetNameWorkDataParameters(BaseModel):
385
376
  model_config = ConfigDict(
386
377
  extra='allow',
@@ -125,17 +125,29 @@ class JobGroup:
125
125
  """
126
126
  return [job for job in self._jobs if job.get_state() == JobStates.error]
127
127
 
128
- def remove(self, job_name: str) -> Self:
128
+ def remove(self, jobs: Job | list[Job]) -> Self:
129
129
  """
130
- Removes all jobs from the group whose name matches the provided name
130
+ Removes given job(s) from the group
131
131
 
132
132
  Args:
133
- job_name:
134
- The name of the job(s) to be removed
133
+ jobs:
134
+ The Job instance(s) to be removed
135
135
  Returns:
136
136
  This `JobGroup` object
137
137
  """
138
- self._jobs = [job for job in self._jobs if job.get_name() != job_name]
138
+
139
+ def remove_by_url(job_url: str):
140
+ for existing_job in self._jobs:
141
+ if existing_job.self_link().get_url() == job_url:
142
+ self._jobs.remove(existing_job)
143
+ break
144
+
145
+ if isinstance(jobs, list):
146
+ for job in jobs:
147
+ remove_by_url(str(job.self_link().get_url()))
148
+ else:
149
+ remove_by_url(str(jobs.self_link().get_url()))
150
+
139
151
  return self
140
152
 
141
153
  def clear(self) -> Self:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pinexq-client
3
- Version: 0.5.0.20241018.1
3
+ Version: 0.5.0.20241030.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>
@@ -1,7 +1,7 @@
1
- pinexq_client-0.5.0.20241018.1.dist-info/METADATA,sha256=iPZaVcmKxfXwSxywFo5dj9iyfOnBo_igmxoWRHo-PJU,3278
2
- pinexq_client-0.5.0.20241018.1.dist-info/WHEEL,sha256=pM0IBB6ZwH3nkEPhtcp50KvKNX-07jYtnb1g1m6Z4Co,90
3
- pinexq_client-0.5.0.20241018.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- pinexq_client-0.5.0.20241018.1.dist-info/licenses/LICENSE,sha256=3oz3tAhM7kOgRukkRe7wmh5T_HihZY77ZtJDJm91ZN8,1072
1
+ pinexq_client-0.5.0.20241030.1.dist-info/METADATA,sha256=KinUo0StjaqqHggN1Wq4WIpxQnqdKUIQPUtjpeQMTBQ,3278
2
+ pinexq_client-0.5.0.20241030.1.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ pinexq_client-0.5.0.20241030.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ pinexq_client-0.5.0.20241030.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,7 +21,7 @@ pinexq_client/core/model/error.py,sha256=MZHma9zCxcTCUp21KZeD22EXK0xhcrKWDQVTEk7
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=moZQz2ujFsl8_WP_jfl8eM6lOzTHD6CK0dXBD8Wrg2g,6939
24
- pinexq_client/job_management/__init__.py,sha256=kvOmgq1qw5ksPm9tbEg1p1XiiZRrwsdKBEgDR_qsk08,164
24
+ pinexq_client/job_management/__init__.py,sha256=UcBfBCxxj858ePyl9kFQmUGU6YedgBPaXparMI7V7fk,164
25
25
  pinexq_client/job_management/enterjma.py,sha256=Ivl_jVPw_gaLyU5nKbywM-bbVGpn0MoCrZ0DMbJYf3s,1411
26
26
  pinexq_client/job_management/hcos/__init__.py,sha256=vMIdxGHBsVcKYKrVkCzD4a_VaheKSNxCimospFn5N88,396
27
27
  pinexq_client/job_management/hcos/entrypoint_hco.py,sha256=qodjAwO_MtawUuhmaYjhGXHV-uW1k94V9gKRYZRkhn4,2234
@@ -30,7 +30,7 @@ pinexq_client/job_management/hcos/input_dataslot_hco.py,sha256=SDflhyW8kjpcTUfKA
30
30
  pinexq_client/job_management/hcos/job_hco.py,sha256=CwF0eD07pd88iZPQUb_10iDtotiemy48BJ5exYN5gRc,8649
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
- pinexq_client/job_management/hcos/jobsroot_hco.py,sha256=_mHEw_gVvWDZ_LcD7T6zLajl-TrmS1x4ULrBk6AmknY,4637
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
35
  pinexq_client/job_management/hcos/processing_step_hco.py,sha256=MykmFssysIc8fIUoPyNOLEGLGQNoC4zFgjIAIjf0v7U,5190
36
36
  pinexq_client/job_management/hcos/processing_step_used_tags_hco.py,sha256=90-2IWlYTcYX62NzmAPnmcUCwMDhmMZyBrNs_G3yigs,1067
@@ -43,11 +43,11 @@ pinexq_client/job_management/hcos/workdata_used_tags_query_result_hco.py,sha256=
43
43
  pinexq_client/job_management/hcos/workdataroot_hco.py,sha256=LdEPW2JJTqAWi-6zj-40lfREhthcDL6nPXQk_nfMtCA,3936
44
44
  pinexq_client/job_management/known_relations.py,sha256=UlOF-sua8SyOPNNKzT_j6JVG8T-aewHIzn7S2ajXBhI,593
45
45
  pinexq_client/job_management/model/__init__.py,sha256=ApHhNfjx4bPuz10sQnyBA2zajYbU7loDTZSKC5H_jBY,34
46
- pinexq_client/job_management/model/open_api_generated.py,sha256=-7TWWzqSeaNld3w_a5sSQWAGZvqY6Oq5c-b_RkL9RrE,31137
46
+ pinexq_client/job_management/model/open_api_generated.py,sha256=uofaSjihzqg0B9CRtjs8Lz5MzlTwcecleYGT457ZCS0,30864
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=aUa03aZ8rYPJA1SPAbCmdYS65G1s2xIPC9kEhzEnw08,22427
50
- pinexq_client/job_management/tool/job_group.py,sha256=4zW_SEbQMLVNqu_zLUP57epkypBbRc5gxjPLp_FZgZo,4515
50
+ pinexq_client/job_management/tool/job_group.py,sha256=ticUSWw1Pgf1NOX5rqvSvod6nRL0tW7X-waQTgw9bWk,4835
51
51
  pinexq_client/job_management/tool/processing_step.py,sha256=0qq64JOESPFAgpUpmM9hWndh21BnCB95EExd21ZHYOg,9730
52
52
  pinexq_client/job_management/tool/workdata.py,sha256=8DwvzcjefKL-wBuCxy9ziaUC7gTf0TMXAa1WoCmHvZM,4903
53
- pinexq_client-0.5.0.20241018.1.dist-info/RECORD,,
53
+ pinexq_client-0.5.0.20241030.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.2)
2
+ Generator: pdm-backend (2.4.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any