logs-py 3.0.9__py3-none-any.whl → 3.0.11__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.
Potentially problematic release.
This version of logs-py might be problematic. Click here for more details.
- LOGS/Entities/Dataset.py +8 -0
- LOGS/Entities/DatatrackNumericMatrix.py +16 -4
- LOGS/Entities/ProjectPersonPermission.py +26 -3
- LOGS/Entities/__init__.py +1 -0
- {logs_py-3.0.9.dist-info → logs_py-3.0.11.dist-info}/METADATA +1 -1
- {logs_py-3.0.9.dist-info → logs_py-3.0.11.dist-info}/RECORD +8 -8
- {logs_py-3.0.9.dist-info → logs_py-3.0.11.dist-info}/WHEEL +0 -0
- {logs_py-3.0.9.dist-info → logs_py-3.0.11.dist-info}/top_level.txt +0 -0
LOGS/Entities/Dataset.py
CHANGED
|
@@ -430,6 +430,14 @@ class Dataset(
|
|
|
430
430
|
|
|
431
431
|
return self._requestReport(exportId, p)
|
|
432
432
|
|
|
433
|
+
def getTrackById(self, trackId: str) -> Optional[Track]:
|
|
434
|
+
if not self._tracks:
|
|
435
|
+
return None
|
|
436
|
+
for track in self._tracks:
|
|
437
|
+
if track.id == trackId:
|
|
438
|
+
return track
|
|
439
|
+
return None
|
|
440
|
+
|
|
433
441
|
@property
|
|
434
442
|
def format(self) -> Optional["FormatMinimal"]:
|
|
435
443
|
return self._format
|
|
@@ -41,24 +41,36 @@ class DatatrackNumericMatrix(Datatrack):
|
|
|
41
41
|
self.min[1] + index[1] * (self.max[1] - self.min[1]) / self.size[1],
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
-
def getIndex(
|
|
44
|
+
def getIndex(
|
|
45
|
+
self, coord: Tuple[float, float], keepInBounds: bool = False
|
|
46
|
+
) -> Tuple[int, int]:
|
|
45
47
|
if self._incomplete:
|
|
46
48
|
raise EntityIncompleteException(self)
|
|
47
49
|
if self.min is None or self.max is None or self.size is None:
|
|
48
50
|
raise ValueError("Datatrack has no min, max or size defined.")
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
index = (
|
|
51
53
|
int((coord[0] - self.min[0]) * self.size[0] / (self.max[0] - self.min[0])),
|
|
52
54
|
int((coord[1] - self.min[1]) * self.size[1] / (self.max[1] - self.min[1])),
|
|
53
55
|
)
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
if keepInBounds:
|
|
58
|
+
index = (
|
|
59
|
+
max(0, min(index[0], self.size[0] - 1)),
|
|
60
|
+
max(0, min(index[1], self.size[1] - 1)),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
return index
|
|
64
|
+
|
|
65
|
+
def getValueFromCoordinate(
|
|
66
|
+
self, coord: Tuple[float, float], keepInBounds: bool = True
|
|
67
|
+
):
|
|
56
68
|
if self._incomplete:
|
|
57
69
|
raise EntityIncompleteException(self)
|
|
58
70
|
if self._data is None:
|
|
59
71
|
return None
|
|
60
72
|
|
|
61
|
-
return self.getValueFromIndex(self.getIndex(coord))
|
|
73
|
+
return self.getValueFromIndex(self.getIndex(coord, keepInBounds=keepInBounds))
|
|
62
74
|
|
|
63
75
|
def getValueFromIndex(self, index: Tuple[int, int]):
|
|
64
76
|
if self._incomplete:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Optional
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Callable, Optional, Tuple
|
|
2
2
|
|
|
3
3
|
from LOGS.Auxiliary.MinimalModelGenerator import MinimalFromSingle
|
|
4
4
|
from LOGS.Entity.SerializableContent import SerializableContent
|
|
@@ -16,6 +16,17 @@ class ProjectPersonPermission(SerializableContent):
|
|
|
16
16
|
_add: Optional[bool] = None
|
|
17
17
|
_read: Optional[bool] = None
|
|
18
18
|
|
|
19
|
+
def _fromRef(
|
|
20
|
+
self,
|
|
21
|
+
ref,
|
|
22
|
+
selfClass,
|
|
23
|
+
convertOtherType: Tuple[type, Callable[[Any], Any]] | None = None,
|
|
24
|
+
):
|
|
25
|
+
if isinstance(ref, dict) and "read" in ref:
|
|
26
|
+
self._read = ref["read"]
|
|
27
|
+
del ref["read"]
|
|
28
|
+
return super()._fromRef(ref, selfClass, convertOtherType)
|
|
29
|
+
|
|
19
30
|
@property
|
|
20
31
|
def person(self) -> Optional["PersonMinimal"]:
|
|
21
32
|
return self._person
|
|
@@ -39,6 +50,9 @@ class ProjectPersonPermission(SerializableContent):
|
|
|
39
50
|
@administer.setter
|
|
40
51
|
def administer(self, value):
|
|
41
52
|
self._administer = self.checkAndConvertNullable(value, bool, "administer")
|
|
53
|
+
if self._administer:
|
|
54
|
+
self._edit = True
|
|
55
|
+
self._add = True
|
|
42
56
|
|
|
43
57
|
@property
|
|
44
58
|
def edit(self) -> Optional[bool]:
|
|
@@ -47,6 +61,10 @@ class ProjectPersonPermission(SerializableContent):
|
|
|
47
61
|
@edit.setter
|
|
48
62
|
def edit(self, value):
|
|
49
63
|
self._edit = self.checkAndConvertNullable(value, bool, "edit")
|
|
64
|
+
if self._edit:
|
|
65
|
+
self._add = True
|
|
66
|
+
else:
|
|
67
|
+
self._administer = False
|
|
50
68
|
|
|
51
69
|
@property
|
|
52
70
|
def add(self) -> Optional[bool]:
|
|
@@ -55,11 +73,16 @@ class ProjectPersonPermission(SerializableContent):
|
|
|
55
73
|
@add.setter
|
|
56
74
|
def add(self, value):
|
|
57
75
|
self._add = self.checkAndConvertNullable(value, bool, "add")
|
|
76
|
+
if not self._add:
|
|
77
|
+
self._edit = False
|
|
78
|
+
self._administer = False
|
|
58
79
|
|
|
59
80
|
@property
|
|
60
81
|
def read(self) -> Optional[bool]:
|
|
61
82
|
return self._read
|
|
62
83
|
|
|
63
84
|
@read.setter
|
|
64
|
-
def read(self,
|
|
65
|
-
|
|
85
|
+
def read(self, _):
|
|
86
|
+
raise Exception(
|
|
87
|
+
"Every person added to a project has automatically read permissions."
|
|
88
|
+
)
|
LOGS/Entities/__init__.py
CHANGED
|
@@ -98,6 +98,7 @@ from .PersonRequestParameter import *
|
|
|
98
98
|
from .Persons import *
|
|
99
99
|
from .Project import *
|
|
100
100
|
from .ProjectMinimal import *
|
|
101
|
+
from .ProjectPersonPermission import *
|
|
101
102
|
from .ProjectRelations import *
|
|
102
103
|
from .ProjectRequestParameter import *
|
|
103
104
|
from .Projects import *
|
|
@@ -53,7 +53,7 @@ LOGS/Entities/DataSourceRelations.py,sha256=eIszpHjZqz6v4WyhaPNu8efSzedsJLNrYR9b
|
|
|
53
53
|
LOGS/Entities/DataSourceRequestParameter.py,sha256=zAfC61NvVt4XO3HhIy1PLViN3AEBJo7Q6Fa_EtyqNvA,1610
|
|
54
54
|
LOGS/Entities/DataSourceStatus.py,sha256=LIMesU020i1clMiTxvO3hAoESf4B1-fXsDGMMtWLdsM,427
|
|
55
55
|
LOGS/Entities/DataSources.py,sha256=UU5ey98_vX4WQknyWITMy-dPOV-wgjblXxu5uXpnVso,481
|
|
56
|
-
LOGS/Entities/Dataset.py,sha256=
|
|
56
|
+
LOGS/Entities/Dataset.py,sha256=VFPccmTCEsMH-WKd-MyqA9bbGl4CeZxNNzMZ9lHClOM,27758
|
|
57
57
|
LOGS/Entities/DatasetCreator.py,sha256=GJ2e0pcYt5ziVqREViBM_uq45K3rm3FG_3NqIOjrO3Y,3253
|
|
58
58
|
LOGS/Entities/DatasetInfo.py,sha256=GVs9dxE2ufMfiuhgKXDcN-GEi2VrZPM1TMBLwtsfMU0,4972
|
|
59
59
|
LOGS/Entities/DatasetMatchTypes.py,sha256=6C60F0GcioNyfRWIIh2XGQJokZxFdBZY9UpKv1y3M7w,4363
|
|
@@ -69,7 +69,7 @@ LOGS/Entities/DatatrackFormattedTable.py,sha256=B4KwRYzjwe4hjT3VOTucBJdBrO2awClI
|
|
|
69
69
|
LOGS/Entities/DatatrackGeneric.py,sha256=wcaD3EK8RRxf5H7zrUM_iXl-g3P7Fbs1ce4LSlQG8ug,816
|
|
70
70
|
LOGS/Entities/DatatrackImage.py,sha256=r_r0VKA7VgrIn7w21555VyVfkwPPHPCTi1WwAVLPb1w,616
|
|
71
71
|
LOGS/Entities/DatatrackNumericArray.py,sha256=BLlGftpapXhLBpot_Wpt50JXiutG55zVB13yafGPGj4,795
|
|
72
|
-
LOGS/Entities/DatatrackNumericMatrix.py,sha256=
|
|
72
|
+
LOGS/Entities/DatatrackNumericMatrix.py,sha256=J4lrNQ5TAuEIRZ8U7Kyyn3TSVMm4qBOGwe4nye_qVQE,3129
|
|
73
73
|
LOGS/Entities/Entities.py,sha256=jq1T_t6xtjcMdTJtr1JJqt45zFWIPiNEVEi-sC2Unz0,2614
|
|
74
74
|
LOGS/Entities/EntitiesRequestParameter.py,sha256=3JdfvtYOfgzpe7RD5Q_-V6wa3iK_gHFHL5Soer0cqvE,358
|
|
75
75
|
LOGS/Entities/EntityOriginWriteModelWithId.py,sha256=5H_KkeLnkRnZXCUnmO2ZqwuGRrgfQGa_coWPU6O86Uk,465
|
|
@@ -150,7 +150,7 @@ LOGS/Entities/PersonRequestParameter.py,sha256=x40tZWowl5jvHlUrMok_H8FIC0miC5ai3
|
|
|
150
150
|
LOGS/Entities/Persons.py,sha256=cj4SKaJZvitaIe7Fd1M9_qqNdAEEG38iuMPNiKPDPUA,413
|
|
151
151
|
LOGS/Entities/Project.py,sha256=oySJq4IQLTAnqMm4xXSnkEKnCu1chJtJBnr_t_fLYbU,3136
|
|
152
152
|
LOGS/Entities/ProjectMinimal.py,sha256=Xw8wnA2iSixEkVaisY_b4Z3Ujudum3MG6tBUfbiAk0s,246
|
|
153
|
-
LOGS/Entities/ProjectPersonPermission.py,sha256=
|
|
153
|
+
LOGS/Entities/ProjectPersonPermission.py,sha256=9CE6wdNjOLsRqK659kbhh3n57XSqM2ZoQGu2tmprtKk,2530
|
|
154
154
|
LOGS/Entities/ProjectRelations.py,sha256=xHHx7B_TbJ5Qz9-bbtjZMPN5YnJyMCTchV2lfJeKYm0,1758
|
|
155
155
|
LOGS/Entities/ProjectRequestParameter.py,sha256=nPrhuYi95N6vrwVk2JgZ-i2PJlZYriLxuNVKbHx3ktQ,1892
|
|
156
156
|
LOGS/Entities/Projects.py,sha256=8xvaHUrH8Y8g8WOcRN0Sa7BXH1QJnPB39SrfP3GpXXE,425
|
|
@@ -178,7 +178,7 @@ LOGS/Entities/TrackXY.py,sha256=klLXkgK9hkXdSIiTPbpGxnWoBf-fymOxJ4BJtcc97Cc,1332
|
|
|
178
178
|
LOGS/Entities/TrackXYComplex.py,sha256=Ts8UusoZY81P8OX4gWgHfSEKiUflT3cr8oUoqFXuc0I,1698
|
|
179
179
|
LOGS/Entities/TrackXYComplexData.py,sha256=xWd3_jdXa347Gh53NYIMo66nFirA60Zd2KxaPs4KHaY,1368
|
|
180
180
|
LOGS/Entities/TrackXYData.py,sha256=6AbwG2qa2HN858ROLaLpzkuIlwsb8tN8wznaiKplRdo,819
|
|
181
|
-
LOGS/Entities/__init__.py,sha256=
|
|
181
|
+
LOGS/Entities/__init__.py,sha256=CxPw9F8WKDAn1z514YIJ_tZoq3oPHhC9TodDP7Kuz2g,3800
|
|
182
182
|
LOGS/Entities/FormattedTable/DatatypeFormattedTable.py,sha256=M5rL0UZdXfylHANrTXKqAnnrML_rEUeMMBFyQEIyto4,3588
|
|
183
183
|
LOGS/Entities/FormattedTable/DatatypeFormattedTableCell.py,sha256=1nBVgWqRecnUWHFwiO0oAqgChYtNSE3VQBxIAjPRjWk,2792
|
|
184
184
|
LOGS/Entities/FormattedTable/DatatypeFormattedTableSettings.py,sha256=Eox_JyXtm6g29lt5kG_RBwD45ioWTg7F_5T36oZbPpY,308
|
|
@@ -254,7 +254,7 @@ LOGS/Parameters/ParameterElement.py,sha256=fr6AlO_flKRygZZFx1OILP4P-2lV2Tx4PAe6W
|
|
|
254
254
|
LOGS/Parameters/ParameterList.py,sha256=ijukB1__iKI5cefmOIIWz0wKaPz9Cx8KpD7Y7Gz2Pn0,1478
|
|
255
255
|
LOGS/Parameters/ParameterTable.py,sha256=7Lew4DPgWmKcpV1T-1Pvt00kEI05FB383QqO-LHAjds,1758
|
|
256
256
|
LOGS/Parameters/__init__.py,sha256=KpMSuBPx964v2YMZ1BqVp8vjrgSpuiW9KYBm-aejRuc,312
|
|
257
|
-
logs_py-3.0.
|
|
258
|
-
logs_py-3.0.
|
|
259
|
-
logs_py-3.0.
|
|
260
|
-
logs_py-3.0.
|
|
257
|
+
logs_py-3.0.11.dist-info/METADATA,sha256=rfFUyOF8Zoe-_HWzxneZvP9pMQQqZtOM2JlthzQqcHU,2340
|
|
258
|
+
logs_py-3.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
259
|
+
logs_py-3.0.11.dist-info/top_level.txt,sha256=Ckn2LiAmGaR7k3tdEnKAc04z_uboMD4gLreYghRNdCs,5
|
|
260
|
+
logs_py-3.0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|