yellowdog-sdk 9.1.4__py3-none-any.whl → 9.2.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.
@@ -1 +1 @@
1
- __version__ = '9.1.4' # YEL-13378
1
+ __version__ = '9.2.1' # YEL-13449
@@ -36,7 +36,7 @@ class AccountServiceProxy:
36
36
  return self.proxy.post(AddApplicationResponse, request, "applications")
37
37
 
38
38
  def regenerate_application_api_key(self, application_id: str) -> ApiKey:
39
- return self.proxy.post(url="applications/%s/key" % application_id)
39
+ return self.proxy.post(ApiKey, url="applications/%s/key" % application_id)
40
40
 
41
41
  def search_applications(self, search: ApplicationSearch, slice_reference: SliceReference) -> Slice[Application]:
42
42
  return self.proxy.get(
@@ -1,18 +1,24 @@
1
1
  from dataclasses import dataclass
2
+ from typing import Optional
2
3
 
3
4
  from .node_worker_target_type import NodeWorkerTargetType
4
5
 
5
6
 
6
7
  @dataclass
7
8
  class NodeWorkerTarget:
8
- targetCount: float
9
9
  targetType: NodeWorkerTargetType
10
+ targetCount: Optional[float] = None
11
+ customTargetCommand: Optional[str] = None
10
12
 
11
13
  # KEEP
12
14
  @staticmethod
13
15
  def per_node(target_count: int) -> 'NodeWorkerTarget':
14
- return NodeWorkerTarget(target_count, NodeWorkerTargetType.PER_NODE)
16
+ return NodeWorkerTarget(NodeWorkerTargetType.PER_NODE, target_count)
15
17
 
16
18
  @staticmethod
17
19
  def per_vcpus(target_count: float) -> 'NodeWorkerTarget':
18
- return NodeWorkerTarget(target_count, NodeWorkerTargetType.PER_VCPU)
20
+ return NodeWorkerTarget(NodeWorkerTargetType.PER_VCPU, target_count)
21
+
22
+ @staticmethod
23
+ def per_custom_command(custom_command: str) -> 'NodeWorkerTarget':
24
+ return NodeWorkerTarget(NodeWorkerTargetType.CUSTOM, None, custom_command)
@@ -4,6 +4,7 @@ from enum import Enum
4
4
  class NodeWorkerTargetType(Enum):
5
5
  PER_NODE = "PER_NODE"
6
6
  PER_VCPU = "PER_VCPU"
7
+ CUSTOM = "CUSTOM"
7
8
 
8
9
  def __str__(self) -> str:
9
10
  return self.name
@@ -1,13 +1,12 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from abc import ABC, abstractmethod
4
- from typing import List
4
+ from typing import List, Optional
5
5
 
6
6
  from .work_requirement_helper import WorkRequirementHelper
7
7
  from yellowdog_client.common import Closeable, SearchClient
8
8
  from yellowdog_client.common.server_sent_events import SubscriptionEventListener
9
- from yellowdog_client.model import Slice, SliceReference, Task, TaskGroup, TaskSearch, WorkRequirement, \
10
- WorkRequirementSearch, WorkRequirementSummary
9
+ from yellowdog_client.model import Slice, SliceReference, Task, TaskGroup, TaskSearch, WorkRequirement, WorkRequirementSearch, WorkRequirementSummary
11
10
 
12
11
 
13
12
  class WorkClient(ABC, Closeable):
@@ -114,32 +113,31 @@ class WorkClient(ABC, Closeable):
114
113
  pass
115
114
 
116
115
  @abstractmethod
117
- def cancel_work_requirement(self, work_requirement: WorkRequirement, abort: bool = False) -> WorkRequirement:
116
+ def cancel_work_requirement(self, work_requirement: WorkRequirement, abort: Optional[bool] = None) -> WorkRequirement:
118
117
  """
119
118
  Instructs the Scheduler to cancel the supplied work requirement, no further tasks will be executed and all workers shall be released.
120
119
 
121
120
  :param work_requirement: the work requirement to cancel
122
- :param abort: if tasks should be aborted if they have been allocated to a worker
121
+ :param abort: if tasks should be aborted if they have been allocated to a worker
123
122
  :return: the latest state of the work requirement after the cancel instruction was submitted
124
123
  """
125
124
 
126
125
  pass
127
126
 
128
127
  @abstractmethod
129
- def cancel_work_requirement_by_id(self, work_requirement_id: str, abort: bool = False) -> WorkRequirement:
128
+ def cancel_work_requirement_by_id(self, work_requirement_id: str, abort: Optional[bool] = None) -> WorkRequirement:
130
129
  """
131
130
  Instructs the Scheduler to cancel the supplied work requirement, no further tasks will be executed and all workers shall be released.
132
131
 
133
132
  :param work_requirement_id: the ID of the work requirement to cancel
134
- :param abort: if tasks should be aborted if they have been allocated to a worker
133
+ :param abort: if tasks should be aborted if they have been allocated to a worker
135
134
  :return: the latest state of the work requirement after the cancel instruction was submitted
136
135
  """
137
136
 
138
137
  pass
139
138
 
140
139
  @abstractmethod
141
- def add_work_requirement_listener(self, work_requirement: WorkRequirement,
142
- listener: SubscriptionEventListener[WorkRequirement]) -> None:
140
+ def add_work_requirement_listener(self, work_requirement: WorkRequirement, listener: SubscriptionEventListener[WorkRequirement]) -> None:
143
141
  """
144
142
  Adds an event listener to receive notifications of changes for the specified work requirement.
145
143
  The client manages subscriptions to YellowDog Scheduler such that the first listener created for a requirement will cause a Server-Sent Events subscription to be initiated; additional listeners for the same requirement share that subscription.
@@ -151,8 +149,7 @@ class WorkClient(ABC, Closeable):
151
149
  pass
152
150
 
153
151
  @abstractmethod
154
- def add_work_requirement_listener_by_id(self, work_requirement_id: str,
155
- listener: SubscriptionEventListener[WorkRequirement]) -> None:
152
+ def add_work_requirement_listener_by_id(self, work_requirement_id: str, listener: SubscriptionEventListener[WorkRequirement]) -> None:
156
153
  """
157
154
  Adds an event listener to receive notifications of changes for the specified work requirement.
158
155
  The client manages subscriptions to YellowDog Scheduler such that the first listener created for a requirement will cause a Server-Sent Events subscription to be initiated; additional listeners for the same requirement share that subscription.
@@ -197,13 +194,12 @@ class WorkClient(ABC, Closeable):
197
194
  pass
198
195
 
199
196
  @abstractmethod
200
-
201
197
  def find_all_work_requirements(self) -> List[WorkRequirementSummary]:
202
198
  """
203
199
  Returns summaries of all existing work requirements within the system for the requesting user.
204
200
 
205
201
  :return: a list of work requirement summaries
206
- @deprecated use {@link #getWorkRequirements(WorkRequirementSearch)} instead to search tasks.
202
+ @deprecated use #getWorkRequirements(WorkRequirementSearch) instead to search tasks.
207
203
  """
208
204
 
209
205
  pass
@@ -244,8 +240,7 @@ class WorkClient(ABC, Closeable):
244
240
  pass
245
241
 
246
242
  @abstractmethod
247
- def add_tasks_to_task_group_by_name(self, namespace: str, work_requirement_name: str, task_group_name: str,
248
- tasks: List[Task]) -> List[Task]:
243
+ def add_tasks_to_task_group_by_name(self, namespace: str, work_requirement_name: str, task_group_name: str, tasks: List[Task]) -> List[Task]:
249
244
  """
250
245
  Submits NEW tasks to the YellowDog Scheduler service to be added to the specified task group.
251
246
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yellowdog-sdk
3
- Version: 9.1.4
3
+ Version: 9.2.1
4
4
  Summary: SDK for the YellowDog Platform
5
5
  Author-email: YellowDog Limited <support@yellowdog.co>
6
6
  Project-URL: Homepage, https://yellowdog.co
@@ -1,12 +1,12 @@
1
1
  __init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  yellowdog_client/__init__.py,sha256=xHGTw5UbjkeEl_hC8_gJCacfji6462qJWD1nvJdFssE,13162
3
- yellowdog_client/_version.py,sha256=US9w_fiCtXDv8XAOOa8PKRWIKfxVYpZfB3aD9B_aH8w,34
3
+ yellowdog_client/_version.py,sha256=kXbYBKK3fsu2Y5Ia03tc1H0csyeeQXRntlsAePQjSuY,34
4
4
  yellowdog_client/client_collection.py,sha256=VSEzjf6iR1qCQ0YGLyDq_Kgvw8r832QDwTp6-MLB4Vs,388
5
5
  yellowdog_client/platform_client.py,sha256=yCzKsOQKllnfzwP9bG-JGtvOdvY7EaEQzFsgX3ERzVY,7476
6
6
  yellowdog_client/account/__init__.py,sha256=DiLL3uSMyVlAKWsncX0k5Ioc2hw87HQoEkSYO0ro0fg,456
7
7
  yellowdog_client/account/account_client.py,sha256=TRuWPcY4pyk78WXiLU_GOLTSHDhQcpppAGmzFlIPEXw,3398
8
8
  yellowdog_client/account/account_client_impl.py,sha256=DUtybxZJpWkS8iyzidJ-veYb9V0iNmEKzB47TcrzzIc,6021
9
- yellowdog_client/account/account_service_proxy.py,sha256=jHOsXRyNUKnoGYILoN-i1xIOmtpVu4OCK7IkoC8kkGY,5388
9
+ yellowdog_client/account/account_service_proxy.py,sha256=fO1XImrdEhY_uxSQWR8Y7T7z7TQkyfne-RESWy3CuC0,5396
10
10
  yellowdog_client/account/keyring_client.py,sha256=IFogh3LNNtL0cSbvbaEuhJ41UhtJbItyxm0AEnAaFMk,1125
11
11
  yellowdog_client/account/keyring_client_impl.py,sha256=s_IltFtozR7lYdR9XNEZVj885pgJ0DoInv0B24GtblI,1665
12
12
  yellowdog_client/account/keyring_service_proxy.py,sha256=8oK6lK3FxHOIbq--qcKSAd5bqkPGMN023CrX_Q8RKeI,1220
@@ -254,8 +254,8 @@ yellowdog_client/model/node_slot_numbering.py,sha256=qKA4nXwu1iv58rdqaIr9sJhDh_K
254
254
  yellowdog_client/model/node_status.py,sha256=25PUpqyPruzc0Y1Rj7RbAJrMLjNKQWDUwrc_0tP1KJw,832
255
255
  yellowdog_client/model/node_summary.py,sha256=u5X27f0MxyJb6e24Czb0f7aMkLDUlHdtglQdyB6x214,604
256
256
  yellowdog_client/model/node_type.py,sha256=Lh_73zwZz6lKFHyn3chJZmretYuhkhHgzf0H1XNLJ7I,323
257
- yellowdog_client/model/node_worker_target.py,sha256=1PYMboD2Rz7hTOZ7A1vy-iykXniJOqRGwc-Xamm5rys,513
258
- yellowdog_client/model/node_worker_target_type.py,sha256=KpsfvAU0ciW7zl8U0vAcnbUPKFxS7Z1cIpTuBxEMDVM,166
257
+ yellowdog_client/model/node_worker_target.py,sha256=uVcU-02dOZZUSqW43c4hf4FKnuw3iQfxs8DabOEJEm4,777
258
+ yellowdog_client/model/node_worker_target_type.py,sha256=z8H_Sk4aTzSxayGf10X9Gi_sCTPCWhSscChVWyFzyo8,188
259
259
  yellowdog_client/model/node_write_file_action.py,sha256=OUZrBBT0JMCoSejev1sYsXGqXb2xkUOYkcOD7oTTmcg,401
260
260
  yellowdog_client/model/numeric_attribute_constraint.py,sha256=4ijy1MaoDScEi36SnEV_vAq5LixICME6nTXWs6G5QGo,375
261
261
  yellowdog_client/model/numeric_attribute_definition.py,sha256=_wPXsHmxW1mhFrbmbtVHzomS7KDhzRmUa0YAaltGaXE,664
@@ -448,7 +448,7 @@ yellowdog_client/object_store/utils/memory_mapped_file_writter.py,sha256=8l9E_m8
448
448
  yellowdog_client/scheduler/__init__.py,sha256=ZORtc_LUBoTcplpoDhCHZNannI3qjeohghNcoBYU3ts,927
449
449
  yellowdog_client/scheduler/predicated_work_subscription_event_listener.py,sha256=mLfaVRmIMtQbj9u6d8O_B-VaZxOy5l1kuGCfTsS_xPU,2056
450
450
  yellowdog_client/scheduler/predicated_worker_pool_subscription_event_listener.py,sha256=z7tCniTF8WL6HSV7QcMOWFvC9EGSRopBGLODFOQinTA,2080
451
- yellowdog_client/scheduler/work_client.py,sha256=9c2FARQ21JBVsOHDuiYEPs8w_6pM1psYV1G0bUpn43g,13142
451
+ yellowdog_client/scheduler/work_client.py,sha256=_IRRPJLyTI2b8Y65weEEp_o2_GHy_FJAS1OMftuwSso,13035
452
452
  yellowdog_client/scheduler/work_client_impl.py,sha256=33O8T25bV-zHx3R3gSQ047NGuSmpWESn7sCaZmqgLFo,7343
453
453
  yellowdog_client/scheduler/work_requirement_helper.py,sha256=vQMoI9emTMKLLmZSil3IGNUtxUl50MFuITJTv5Okvlo,4167
454
454
  yellowdog_client/scheduler/work_service_proxy.py,sha256=bSg0892B82uAN3zXSUGoSF0BjVzhTuzuZNEMS-wZRIw,2995
@@ -460,8 +460,8 @@ yellowdog_client/usage/__init__.py,sha256=XQwRJqTdxKZa1QUTsxBEL0TqQJeQHGyPklFeqc
460
460
  yellowdog_client/usage/allowances_client.py,sha256=H6n63jXjT4OwuWJgFUXSjSmvGTZz9uspy3kj3upinaA,1337
461
461
  yellowdog_client/usage/allowances_client_impl.py,sha256=nQPnSzJKhL3WvyCn5fmiDkwE84xZryH9YvV5Z1GjU4M,2061
462
462
  yellowdog_client/usage/allowances_service_proxy.py,sha256=uO6LWnpjIzUcZTGdOxPXn7SyYX7NMRqO5KUiHUGr490,1320
463
- yellowdog_sdk-9.1.4.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
464
- yellowdog_sdk-9.1.4.dist-info/METADATA,sha256=9TXYc5OO3HCDKtzDcak9zWRq_o9IzZky2NW6BbuMSCA,3238
465
- yellowdog_sdk-9.1.4.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
466
- yellowdog_sdk-9.1.4.dist-info/top_level.txt,sha256=6PH16DcoqpYHhQ5A0UJOjf0tg-1rTrNC9C2CLqCMuFo,26
467
- yellowdog_sdk-9.1.4.dist-info/RECORD,,
463
+ yellowdog_sdk-9.2.1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
464
+ yellowdog_sdk-9.2.1.dist-info/METADATA,sha256=lgctmkX9IK68IUcQU7V1ijfCiWi_byUB8pvl43COVfU,3238
465
+ yellowdog_sdk-9.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
466
+ yellowdog_sdk-9.2.1.dist-info/top_level.txt,sha256=6PH16DcoqpYHhQ5A0UJOjf0tg-1rTrNC9C2CLqCMuFo,26
467
+ yellowdog_sdk-9.2.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5