polyaxon 2.2.0.post1__py3-none-any.whl → 2.2.0rc0__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.
polyaxon/_client/mixin.py DELETED
@@ -1,39 +0,0 @@
1
- from polyaxon import settings
2
- from polyaxon._client.client import PolyaxonClient
3
- from polyaxon._schemas.client import ClientConfig
4
- from polyaxon._utils.fqn_utils import split_owner_team_space
5
-
6
-
7
- class ClientMixin:
8
- @property
9
- def client(self):
10
- if self._client:
11
- return self._client
12
- self._client = PolyaxonClient()
13
- return self._client
14
-
15
- def reset_client(self, **kwargs):
16
- if not settings.CLIENT_CONFIG.in_cluster:
17
- self._client = PolyaxonClient(
18
- ClientConfig.patch_from(settings.CLIENT_CONFIG, **kwargs)
19
- )
20
-
21
- @property
22
- def owner(self) -> str:
23
- return self._owner
24
-
25
- @property
26
- def team(self):
27
- return self._team
28
-
29
- @property
30
- def project(self) -> str:
31
- return self._project
32
-
33
- def set_project(self, project: str):
34
- self._project = project
35
-
36
- def set_owner(self, owner: str):
37
- owner, team = split_owner_team_space(owner)
38
- self._owner = owner
39
- self._team = team