logs-py 2.9.6__py3-none-any.whl → 3.0.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.

Potentially problematic release.


This version of logs-py might be problematic. Click here for more details.

Files changed (147) hide show
  1. LOGS/Auxiliary/DateTimeConverter.py +11 -1
  2. LOGS/Auxiliary/Exceptions.py +40 -4
  3. LOGS/Auxiliary/LOGSErrorResponse.py +4 -1
  4. LOGS/Auxiliary/MinimalModelGenerator.py +88 -28
  5. LOGS/Auxiliary/Tools.py +11 -0
  6. LOGS/Converter/Conversion.py +248 -0
  7. LOGS/Converter/Converter.py +96 -0
  8. LOGS/Converter/ConverterParameter.py +88 -0
  9. LOGS/Converter/ExportParamters.py +89 -0
  10. LOGS/Converter/__init__.py +13 -0
  11. LOGS/Entities/Bridge.py +6 -3
  12. LOGS/Entities/CustomField.py +96 -91
  13. LOGS/Entities/CustomFieldModels.py +57 -0
  14. LOGS/Entities/CustomFieldRelations.py +10 -0
  15. LOGS/Entities/CustomFieldRequestParameter.py +43 -15
  16. LOGS/Entities/CustomFieldValue.py +88 -0
  17. LOGS/Entities/CustomFieldValueConverter.py +66 -0
  18. LOGS/Entities/CustomType.py +187 -0
  19. LOGS/Entities/CustomTypeEntityType.py +11 -0
  20. LOGS/Entities/CustomTypeMinimal.py +8 -0
  21. LOGS/Entities/CustomTypeRelations.py +59 -0
  22. LOGS/Entities/CustomTypeRequestParameter.py +61 -0
  23. LOGS/Entities/CustomTypeSection.py +39 -0
  24. LOGS/Entities/CustomTypes.py +12 -0
  25. LOGS/Entities/DataSource.py +28 -14
  26. LOGS/Entities/Dataset.py +274 -136
  27. LOGS/Entities/DatasetCreator.py +23 -72
  28. LOGS/Entities/DatasetInfo.py +23 -2
  29. LOGS/Entities/DatasetModels.py +31 -0
  30. LOGS/Entities/DatasetRequestParameter.py +45 -32
  31. LOGS/Entities/Datatrack.py +74 -30
  32. LOGS/Entities/DatatrackFormattedTable.py +25 -0
  33. LOGS/Entities/DatatrackGeneric.py +34 -0
  34. LOGS/Entities/DatatrackImage.py +25 -0
  35. LOGS/Entities/DatatrackNumericArray.py +9 -39
  36. LOGS/Entities/DatatrackNumericMatrix.py +86 -0
  37. LOGS/Entities/DocumentRequestParameter.py +2 -2
  38. LOGS/Entities/EntitiesRequestParameter.py +2 -2
  39. LOGS/Entities/Experiment.py +3 -3
  40. LOGS/Entities/FileExcludePattern.py +8 -0
  41. LOGS/Entities/FormatFormat.py +22 -1
  42. LOGS/Entities/FormatFormatRequestParameter.py +2 -1
  43. LOGS/Entities/FormatFormats.py +1 -1
  44. LOGS/Entities/FormattedTable/DatatypeFormattedTable.py +135 -0
  45. LOGS/Entities/FormattedTable/DatatypeFormattedTableCell.py +108 -0
  46. LOGS/Entities/FormattedTable/DatatypeFormattedTableSettings.py +11 -0
  47. LOGS/Entities/FormattedTable/__init__.py +9 -0
  48. LOGS/Entities/ILiterarTypedEntity.py +19 -0
  49. LOGS/Entities/Instrument.py +3 -3
  50. LOGS/Entities/Inventories.py +12 -0
  51. LOGS/Entities/Inventory.py +95 -0
  52. LOGS/Entities/InventoryMinimal.py +20 -0
  53. LOGS/Entities/InventoryRelations.py +23 -0
  54. LOGS/Entities/InventoryRequestParameter.py +53 -0
  55. LOGS/Entities/LabNotebook.py +37 -0
  56. LOGS/Entities/LabNotebookEntry.py +47 -24
  57. LOGS/Entities/LabNotebookEntryContent/BasicAttribute.py +15 -0
  58. LOGS/Entities/LabNotebookEntryContent/EntityAttribute.py +85 -0
  59. LOGS/Entities/LabNotebookEntryContent/EntryContentBlockquote.py +13 -0
  60. LOGS/Entities/LabNotebookEntryContent/EntryContentBulletList.py +17 -0
  61. LOGS/Entities/LabNotebookEntryContent/EntryContentCallout.py +40 -0
  62. LOGS/Entities/LabNotebookEntryContent/EntryContentContentPlaceholderNode.py +31 -0
  63. LOGS/Entities/LabNotebookEntryContent/EntryContentConverter.py +207 -0
  64. LOGS/Entities/LabNotebookEntryContent/EntryContentDocument.py +8 -0
  65. LOGS/Entities/LabNotebookEntryContent/EntryContentEntity.py +13 -0
  66. LOGS/Entities/LabNotebookEntryContent/EntryContentEntityMention.py +31 -0
  67. LOGS/Entities/LabNotebookEntryContent/EntryContentHeading.py +33 -0
  68. LOGS/Entities/LabNotebookEntryContent/EntryContentHorizontalRule.py +12 -0
  69. LOGS/Entities/LabNotebookEntryContent/EntryContentItem.py +37 -0
  70. LOGS/Entities/LabNotebookEntryContent/EntryContentListItem.py +49 -0
  71. LOGS/Entities/LabNotebookEntryContent/EntryContentOrderedList.py +31 -0
  72. LOGS/Entities/LabNotebookEntryContent/EntryContentParagraph.py +13 -0
  73. LOGS/Entities/LabNotebookEntryContent/EntryContentTable.py +17 -0
  74. LOGS/Entities/LabNotebookEntryContent/EntryContentTableCell.py +40 -0
  75. LOGS/Entities/LabNotebookEntryContent/EntryContentTableRow.py +8 -0
  76. LOGS/Entities/LabNotebookEntryContent/EntryContentTaskList.py +17 -0
  77. LOGS/Entities/LabNotebookEntryContent/EntryContentTaskListItem.py +31 -0
  78. LOGS/Entities/LabNotebookEntryContent/EntryContentText.py +33 -0
  79. LOGS/Entities/LabNotebookEntryContent/IEntryContentWithAttribute.py +23 -0
  80. LOGS/Entities/LabNotebookEntryContent/IEntryContentWithContent.py +38 -0
  81. LOGS/Entities/LabNotebookEntryContent/IEntryContentWithTextAttribute.py +16 -0
  82. LOGS/Entities/LabNotebookEntryContent/TextAttribute.py +46 -0
  83. LOGS/Entities/LabNotebookEntryContent/TextMarkAtributes.py +64 -0
  84. LOGS/Entities/LabNotebookEntryContent/TextMarkConverter.py +45 -0
  85. LOGS/Entities/LabNotebookEntryContent/TextMarks.py +71 -0
  86. LOGS/Entities/LabNotebookEntryContent/__init__.py +34 -0
  87. LOGS/Entities/LabNotebookEntryRequestParameter.py +2 -0
  88. LOGS/Entities/LabNotebookExperiment.py +52 -0
  89. LOGS/Entities/LabNotebookExperimentMinimal.py +8 -0
  90. LOGS/Entities/LabNotebookExperimentRequestParameter.py +49 -0
  91. LOGS/Entities/LabNotebookExperiments.py +16 -0
  92. LOGS/Entities/LabNotebookMinimal.py +19 -0
  93. LOGS/Entities/LabNotebookModels.py +14 -0
  94. LOGS/Entities/LabNotebookRequestParameter.py +43 -0
  95. LOGS/Entities/LabNotebooks.py +12 -0
  96. LOGS/Entities/Method.py +3 -3
  97. LOGS/Entities/ParserLog.py +4 -0
  98. LOGS/Entities/Person.py +2 -2
  99. LOGS/Entities/PersonRequestParameter.py +1 -0
  100. LOGS/Entities/Project.py +7 -7
  101. LOGS/Entities/{ProjectUserPermission.py → ProjectPersonPermission.py} +14 -4
  102. LOGS/Entities/Role.py +3 -3
  103. LOGS/Entities/RunState.py +1 -0
  104. LOGS/Entities/Sample.py +36 -57
  105. LOGS/Entities/SampleRequestParameter.py +30 -15
  106. LOGS/Entities/Track.py +8 -4
  107. LOGS/Entities/TrackData.py +11 -0
  108. LOGS/Entities/TrackImage.py +21 -0
  109. LOGS/Entities/TrackImageData.py +20 -0
  110. LOGS/Entities/TrackMatrix.py +28 -0
  111. LOGS/Entities/TrackMatrixData.py +22 -0
  112. LOGS/Entities/TrackTable.py +21 -0
  113. LOGS/Entities/TrackTableData.py +22 -0
  114. LOGS/Entities/TrackXY.py +5 -1
  115. LOGS/Entities/TrackXYComplex.py +1 -1
  116. LOGS/Entities/__init__.py +26 -7
  117. LOGS/Entity/ConnectedEntity.py +39 -1
  118. LOGS/Entity/Entity.py +9 -14
  119. LOGS/Entity/SerializeableContent.py +62 -5
  120. LOGS/Interfaces/IHierarchyType.py +63 -0
  121. LOGS/Interfaces/IPermissionedEntity.py +29 -5
  122. LOGS/Interfaces/IProjectBased.py +1 -1
  123. LOGS/Interfaces/ITypedEntity.py +69 -12
  124. LOGS/Interfaces/IVersionedEntity.py +39 -0
  125. LOGS/LOGS.py +137 -46
  126. LOGS/LOGSConnection.py +52 -24
  127. LOGS/LOGSOptions.py +8 -0
  128. LOGS/Parameters/Color.py +92 -0
  129. LOGS/Parameters/ParameterBase.py +55 -0
  130. LOGS/Parameters/ParameterConverter.py +24 -0
  131. LOGS/Parameters/ParameterElement.py +99 -0
  132. LOGS/Parameters/ParameterList.py +52 -0
  133. LOGS/Parameters/ParameterTable.py +64 -0
  134. LOGS/Parameters/__init__.py +13 -0
  135. LOGS/__init__.py +1 -0
  136. {logs_py-2.9.6.dist-info → logs_py-3.0.1.dist-info}/METADATA +2 -1
  137. logs_py-3.0.1.dist-info/RECORD +263 -0
  138. LOGS/Entities/CustomFieldEnums.py +0 -25
  139. LOGS/Entities/DatasetType.py +0 -7
  140. LOGS/Entities/DatasetTypeMinimal.py +0 -8
  141. LOGS/Entities/SampleType.py +0 -34
  142. LOGS/Entities/SampleTypeMinimal.py +0 -8
  143. LOGS/Entities/SampleTypeRequestParameter.py +0 -8
  144. LOGS/Entities/SampleTypes.py +0 -12
  145. logs_py-2.9.6.dist-info/RECORD +0 -183
  146. {logs_py-2.9.6.dist-info → logs_py-3.0.1.dist-info}/WHEEL +0 -0
  147. {logs_py-2.9.6.dist-info → logs_py-3.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,49 @@
1
+ from typing import Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
4
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
5
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
6
+ IEntryContentWithAttribute,
7
+ )
8
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
9
+ IEntryContentWithContent,
10
+ )
11
+
12
+
13
+ class ListItemAttribute(BasicAttribute):
14
+ _order: Optional[int] = None
15
+ _closed: Optional[bool] = False
16
+ _nested: Optional[bool] = False
17
+
18
+ @property
19
+ def closed(self) -> Optional[bool]:
20
+ return self._closed
21
+
22
+ @closed.setter
23
+ def closed(self, value):
24
+ self._closed = self.checkAndConvertNullable(value, bool, "closed")
25
+
26
+ @property
27
+ def nested(self) -> Optional[bool]:
28
+ return self._nested
29
+
30
+ @nested.setter
31
+ def nested(self, value):
32
+ self._nested = self.checkAndConvertNullable(value, bool, "nested")
33
+
34
+ @property
35
+ def order(self) -> Optional[int]:
36
+ return self._order
37
+
38
+ @order.setter
39
+ def order(self, value):
40
+ self._order = self.checkAndConvertNullable(value, int, "order")
41
+
42
+
43
+ class EntryContentListItem(
44
+ EntryContentItem,
45
+ IEntryContentWithContent,
46
+ IEntryContentWithAttribute[ListItemAttribute],
47
+ ):
48
+ _attrType = ListItemAttribute
49
+ _type = "listItem"
@@ -0,0 +1,31 @@
1
+ from typing import Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
4
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
5
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
6
+ IEntryContentWithAttribute,
7
+ )
8
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
9
+ IEntryContentWithContent,
10
+ )
11
+
12
+
13
+ class OrderedListAttribute(BasicAttribute):
14
+ _order: Optional[int] = None
15
+
16
+ @property
17
+ def order(self) -> Optional[int]:
18
+ return self._order
19
+
20
+ @order.setter
21
+ def order(self, value):
22
+ self._order = self.checkAndConvertNullable(value, int, "order")
23
+
24
+
25
+ class EntryContentOrderedList(
26
+ EntryContentItem,
27
+ IEntryContentWithContent,
28
+ IEntryContentWithAttribute[OrderedListAttribute],
29
+ ):
30
+ _attrType = OrderedListAttribute
31
+ _type = "orderedList"
@@ -0,0 +1,13 @@
1
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
2
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
3
+ IEntryContentWithContent,
4
+ )
5
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithTextAttribute import (
6
+ IEntryContentWithTextAttribute,
7
+ )
8
+
9
+
10
+ class EntryContentParagraph(
11
+ EntryContentItem, IEntryContentWithContent, IEntryContentWithTextAttribute
12
+ ):
13
+ _type = "paragraph"
@@ -0,0 +1,17 @@
1
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
2
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
3
+ IEntryContentWithAttribute,
4
+ )
5
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
6
+ IEntryContentWithContent,
7
+ )
8
+ from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
9
+
10
+
11
+ class EntryContentTable(
12
+ EntryContentItem,
13
+ IEntryContentWithContent,
14
+ IEntryContentWithAttribute[BasicAttribute],
15
+ ):
16
+ _attrType = BasicAttribute
17
+ _type = "table"
@@ -0,0 +1,40 @@
1
+ from typing import Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
4
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
5
+ IEntryContentWithAttribute,
6
+ )
7
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
8
+ IEntryContentWithContent,
9
+ )
10
+ from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
11
+
12
+
13
+ class TableCellAttribute(BasicAttribute):
14
+ _colspan: Optional[int] = None
15
+ _rowspan: Optional[int] = None
16
+
17
+ @property
18
+ def colspan(self) -> Optional[int]:
19
+ return self._colspan
20
+
21
+ @colspan.setter
22
+ def colspan(self, value):
23
+ self._colspan = self.checkAndConvertNullable(value, int, "colspan")
24
+
25
+ @property
26
+ def rowspan(self) -> Optional[int]:
27
+ return self._rowspan
28
+
29
+ @rowspan.setter
30
+ def rowspan(self, value):
31
+ self._rowspan = self.checkAndConvertNullable(value, int, "rowspan")
32
+
33
+
34
+ class EntryContentTableCell(
35
+ EntryContentItem,
36
+ IEntryContentWithContent,
37
+ IEntryContentWithAttribute[TableCellAttribute],
38
+ ):
39
+ _attrType = TableCellAttribute
40
+ _type = "tableCell"
@@ -0,0 +1,8 @@
1
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
2
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
3
+ IEntryContentWithContent,
4
+ )
5
+
6
+
7
+ class EntryContentTableRow(EntryContentItem, IEntryContentWithContent):
8
+ _type = "tableRow"
@@ -0,0 +1,17 @@
1
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
2
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
3
+ IEntryContentWithAttribute,
4
+ )
5
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
6
+ IEntryContentWithContent,
7
+ )
8
+ from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
9
+
10
+
11
+ class EntryContentTaskList(
12
+ EntryContentItem,
13
+ IEntryContentWithContent,
14
+ IEntryContentWithAttribute[BasicAttribute],
15
+ ):
16
+ _attrType = BasicAttribute
17
+ _type = "taskList"
@@ -0,0 +1,31 @@
1
+ from typing import Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
4
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
5
+ IEntryContentWithAttribute,
6
+ )
7
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithContent import (
8
+ IEntryContentWithContent,
9
+ )
10
+ from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import BasicAttribute
11
+
12
+
13
+ class TaskListItemAttribute(BasicAttribute):
14
+ _checked: Optional[bool] = False
15
+
16
+ @property
17
+ def checked(self) -> Optional[bool]:
18
+ return self._checked
19
+
20
+ @checked.setter
21
+ def checked(self, value):
22
+ self._checked = self.checkAndConvertNullable(value, bool, "checked")
23
+
24
+
25
+ class EntryContentTaskListItem(
26
+ EntryContentItem,
27
+ IEntryContentWithContent,
28
+ IEntryContentWithAttribute[TaskListItemAttribute],
29
+ ):
30
+ _attrType = TaskListItemAttribute
31
+ _type = "taskListItem"
@@ -0,0 +1,33 @@
1
+ from typing import List, Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
4
+ from LOGS.Entities.LabNotebookEntryContent.TextMarkConverter import TextMarkConverter
5
+ from LOGS.Entities.LabNotebookEntryContent.TextMarks import IEntryContentWithAttribute
6
+
7
+
8
+ class EntryContentText(EntryContentItem):
9
+ _type = "text"
10
+
11
+ _text: Optional[str] = None
12
+ _marks: Optional[List[IEntryContentWithAttribute]] = None
13
+
14
+ @property
15
+ def text(self) -> Optional[str]:
16
+ return self._text
17
+
18
+ @text.setter
19
+ def text(self, value):
20
+ self._text = self.checkAndConvertNullable(value, str, "text")
21
+
22
+ @property
23
+ def marks(self) -> Optional[List[IEntryContentWithAttribute]]:
24
+ return self._marks
25
+
26
+ @marks.setter
27
+ def marks(self, value):
28
+ self._marks = self.checkListAndConvertNullable(
29
+ value,
30
+ IEntryContentWithAttribute,
31
+ "marks",
32
+ converter=TextMarkConverter.convert,
33
+ )
@@ -0,0 +1,23 @@
1
+ from typing import Generic, Optional, Type, TypeVar
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
4
+ from LOGS.Entity.SerializeableContent import SerializeableContent
5
+
6
+ _T = TypeVar("_T", bound=BasicAttribute)
7
+
8
+
9
+ class IEntryContentWithAttribute(Generic[_T], SerializeableContent):
10
+ _attrType: Optional[Type] = None
11
+ _attrs: Optional[_T] = None
12
+
13
+ @property
14
+ def attrs(self) -> Optional[_T]:
15
+ return self._attrs
16
+
17
+ @attrs.setter
18
+ def attrs(self, value):
19
+ if not self._attrType:
20
+ raise Exception(
21
+ f"Field attrType must be defined for class '{type(self).__name__}'"
22
+ )
23
+ self._attrs = self.checkAndConvertNullable(value, self._attrType, "attrs")
@@ -0,0 +1,38 @@
1
+ from typing import List, Optional, Tuple, Type, TypeVar, Union, cast
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentConverter import (
4
+ EntryContentConverter,
5
+ )
6
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
7
+ from LOGS.Entity.SerializeableContent import SerializeableContent
8
+
9
+ _T = TypeVar("_T", bound=EntryContentItem)
10
+
11
+
12
+ class IEntryContentWithContent(SerializeableContent):
13
+ _content: List[EntryContentItem] = cast(List[EntryContentItem], None)
14
+
15
+ def listContentItems(
16
+ self, types: Optional[Union[Type[_T], Tuple[Type[_T], ...]]] = None
17
+ ) -> List[_T]:
18
+ items = []
19
+ for item in self.content:
20
+ if not types or isinstance(item, types):
21
+ items.append(item)
22
+ if isinstance(item, IEntryContentWithContent):
23
+ items.extend(item.listContentItems(types))
24
+
25
+ return items
26
+
27
+ def append(self, item: _T) -> _T:
28
+ raise NotImplementedError()
29
+
30
+ @property
31
+ def content(self) -> List[EntryContentItem]:
32
+ if self._content is None:
33
+ self._content = []
34
+ return self._content
35
+
36
+ @content.setter
37
+ def content(self, value):
38
+ self._content = EntryContentConverter.convertList(value, fieldName="content")
@@ -0,0 +1,16 @@
1
+ from typing import Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.TextAttribute import TextAttribute
4
+ from LOGS.Entity.SerializeableContent import SerializeableContent
5
+
6
+
7
+ class IEntryContentWithTextAttribute(SerializeableContent):
8
+ _attrs: Optional[TextAttribute] = None
9
+
10
+ @property
11
+ def attrs(self) -> Optional[TextAttribute]:
12
+ return self._attrs
13
+
14
+ @attrs.setter
15
+ def attrs(self, value):
16
+ self._attrs = self.checkAndConvertNullable(value, TextAttribute, "attrs")
@@ -0,0 +1,46 @@
1
+ from typing import Optional
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
4
+
5
+
6
+ class TextAttribute(BasicAttribute):
7
+ _style: Optional[str] = None
8
+ _nodeIndent: Optional[int] = None
9
+ _nodeLineHeight: Optional[int] = None
10
+ _nodeTextAlignment: Optional[str] = None
11
+
12
+ @property
13
+ def style(self) -> Optional[str]:
14
+ return self._style
15
+
16
+ @style.setter
17
+ def style(self, value):
18
+ self._style = self.checkAndConvertNullable(value, str, "style")
19
+
20
+ @property
21
+ def nodeIndent(self) -> Optional[int]:
22
+ return self._nodeIndent
23
+
24
+ @nodeIndent.setter
25
+ def nodeIndent(self, value):
26
+ self._nodeIndent = self.checkAndConvertNullable(value, int, "nodeIndent")
27
+
28
+ @property
29
+ def nodeLineHeight(self) -> Optional[int]:
30
+ return self._nodeLineHeight
31
+
32
+ @nodeLineHeight.setter
33
+ def nodeLineHeight(self, value):
34
+ self._nodeLineHeight = self.checkAndConvertNullable(
35
+ value, int, "nodeLineHeight"
36
+ )
37
+
38
+ @property
39
+ def nodeTextAlignment(self) -> Optional[str]:
40
+ return self._nodeTextAlignment
41
+
42
+ @nodeTextAlignment.setter
43
+ def nodeTextAlignment(self, value):
44
+ self._nodeTextAlignment = self.checkAndConvertNullable(
45
+ value, str, "nodeTextAlignment"
46
+ )
@@ -0,0 +1,64 @@
1
+ from typing import Optional, TypeVar
2
+
3
+ from LOGS.Entities.LabNotebookEntryContent.BasicAttribute import BasicAttribute
4
+
5
+
6
+ class TextMarkAttributeDefault(BasicAttribute):
7
+ pass
8
+
9
+
10
+ _T = TypeVar("_T", bound=BasicAttribute)
11
+
12
+
13
+ class TextMarkAttributeTextColor(BasicAttribute):
14
+ _color: Optional[str] = None
15
+
16
+ @property
17
+ def color(self) -> Optional[str]:
18
+ return self._color
19
+
20
+ @color.setter
21
+ def color(self, value):
22
+ self._color = self.checkAndConvertNullable(value, str, "color")
23
+
24
+
25
+ class TextMarkAttributeTextHighlight(BasicAttribute):
26
+ _highlight: Optional[str] = None
27
+
28
+ @property
29
+ def highlight(self) -> Optional[str]:
30
+ return self._highlight
31
+
32
+ @highlight.setter
33
+ def highlight(self, value):
34
+ self._highlight = self.checkAndConvertNullable(value, str, "highlight")
35
+
36
+
37
+ class TextMarkAttributeLink(BasicAttribute):
38
+ _auto: Optional[bool] = None
39
+ _href: Optional[str] = None
40
+ _target: Optional[str] = None
41
+
42
+ @property
43
+ def auto(self) -> Optional[bool]:
44
+ return self._auto
45
+
46
+ @auto.setter
47
+ def auto(self, value):
48
+ self._auto = self.checkAndConvertNullable(value, bool, "auto")
49
+
50
+ @property
51
+ def href(self) -> Optional[str]:
52
+ return self._href
53
+
54
+ @href.setter
55
+ def href(self, value):
56
+ self._href = self.checkAndConvertNullable(value, str, "href")
57
+
58
+ @property
59
+ def target(self) -> Optional[str]:
60
+ return self._target
61
+
62
+ @target.setter
63
+ def target(self, value):
64
+ self._target = self.checkAndConvertNullable(value, str, "target")
@@ -0,0 +1,45 @@
1
+ from LOGS.Entities.LabNotebookEntryContent.TextMarks import (
2
+ TextMarkBold,
3
+ TextMarkCode,
4
+ TextMarkContentPlaceholder,
5
+ TextMarkItalic,
6
+ TextMarkLink,
7
+ TextMarkStrike,
8
+ TextMarkSub,
9
+ TextMarkSup,
10
+ TextMarkTextColor,
11
+ TextMarkTextHighlight,
12
+ TextMarkUnderline,
13
+ )
14
+
15
+
16
+ class TextMarkConverter:
17
+ @staticmethod
18
+ def convert(mark: dict):
19
+ if "type" not in mark:
20
+ raise ValueError(f"TextMark must contain a 'type' field. (Got '{mark}')")
21
+ _type = mark["type"]
22
+ if _type == "bold":
23
+ return TextMarkBold(mark)
24
+ if _type == "italic":
25
+ return TextMarkItalic(mark)
26
+ elif _type == "underline":
27
+ return TextMarkUnderline(mark)
28
+ elif _type == "strike":
29
+ return TextMarkStrike(mark)
30
+ elif _type == "sup":
31
+ return TextMarkSup(mark)
32
+ elif _type == "sub":
33
+ return TextMarkSub(mark)
34
+ elif _type == "code":
35
+ return TextMarkCode(mark)
36
+ elif _type == "textColor":
37
+ return TextMarkTextColor(mark)
38
+ elif _type == "textHighlight":
39
+ return TextMarkTextHighlight(mark)
40
+ elif _type == "link":
41
+ return TextMarkLink(mark)
42
+ elif _type == "contentPlaceholder":
43
+ return TextMarkContentPlaceholder(mark)
44
+ else:
45
+ raise ValueError(f"TextMark type '{_type}' is not supported.")
@@ -0,0 +1,71 @@
1
+ from LOGS.Entities.LabNotebookEntryContent.EntryContentItem import EntryContentItem
2
+ from LOGS.Entities.LabNotebookEntryContent.IEntryContentWithAttribute import (
3
+ IEntryContentWithAttribute,
4
+ )
5
+ from LOGS.Entities.LabNotebookEntryContent.TextMarkAtributes import (
6
+ TextMarkAttributeDefault,
7
+ TextMarkAttributeLink,
8
+ TextMarkAttributeTextColor,
9
+ TextMarkAttributeTextHighlight,
10
+ )
11
+
12
+
13
+ class TextMarkBold(EntryContentItem, IEntryContentWithAttribute):
14
+ _type = "bold"
15
+ _attrType = TextMarkAttributeDefault
16
+
17
+
18
+ class TextMarkItalic(EntryContentItem, IEntryContentWithAttribute):
19
+ _type = "italic"
20
+ _attrType = TextMarkAttributeDefault
21
+
22
+
23
+ class TextMarkUnderline(EntryContentItem, IEntryContentWithAttribute):
24
+ _type = "underline"
25
+ _attrType = TextMarkAttributeDefault
26
+
27
+
28
+ class TextMarkStrike(EntryContentItem, IEntryContentWithAttribute):
29
+ _type = "strike"
30
+ _attrType = TextMarkAttributeDefault
31
+
32
+
33
+ class TextMarkSup(EntryContentItem, IEntryContentWithAttribute):
34
+ _type = "sup"
35
+ _attrType = TextMarkAttributeDefault
36
+
37
+
38
+ class TextMarkSub(EntryContentItem, IEntryContentWithAttribute):
39
+ _type = "sub"
40
+ _attrType = TextMarkAttributeDefault
41
+
42
+
43
+ class TextMarkCode(EntryContentItem, IEntryContentWithAttribute):
44
+ _type = "code"
45
+ _attrType = TextMarkAttributeDefault
46
+
47
+
48
+ class TextMarkTextColor(
49
+ EntryContentItem, IEntryContentWithAttribute[TextMarkAttributeTextColor]
50
+ ):
51
+ _type = "textColor"
52
+ _attrType = TextMarkAttributeTextColor
53
+
54
+
55
+ class TextMarkTextHighlight(
56
+ EntryContentItem, IEntryContentWithAttribute[TextMarkAttributeTextHighlight]
57
+ ):
58
+ _type = "textHighlight"
59
+ _attrType = TextMarkAttributeTextHighlight
60
+
61
+
62
+ class TextMarkLink(EntryContentItem, IEntryContentWithAttribute[TextMarkAttributeLink]):
63
+ _type = "link"
64
+ _attrType = TextMarkAttributeLink
65
+
66
+
67
+ class TextMarkContentPlaceholder(
68
+ EntryContentItem, IEntryContentWithAttribute[TextMarkAttributeLink]
69
+ ):
70
+ _type = "contentPlaceholder"
71
+ _attrType = TextMarkAttributeLink
@@ -0,0 +1,34 @@
1
+ """
2
+ This package is written for the LOGS Repository.
3
+
4
+ It's objects can be used to write your own dataset parser.
5
+
6
+ License:
7
+ Permission to use this libraray and all of its contents is
8
+ strictly permitted to the Signals Company.
9
+ """
10
+
11
+ from .EntityAttribute import *
12
+ from .EntryContentBlockquote import *
13
+ from .EntryContentBulletList import *
14
+ from .EntryContentCallout import *
15
+ from .EntryContentContentPlaceholderNode import *
16
+ from .EntryContentConverter import *
17
+ from .EntryContentDocument import *
18
+ from .EntryContentEntity import *
19
+ from .EntryContentEntityMention import *
20
+ from .EntryContentHeading import *
21
+ from .EntryContentHorizontalRule import *
22
+ from .EntryContentItem import *
23
+ from .EntryContentListItem import *
24
+ from .EntryContentOrderedList import *
25
+ from .EntryContentParagraph import *
26
+ from .EntryContentTable import *
27
+ from .EntryContentTableCell import *
28
+ from .EntryContentTableRow import *
29
+ from .EntryContentTaskList import *
30
+ from .EntryContentTaskListItem import *
31
+ from .EntryContentText import *
32
+ from .TextAttribute import *
33
+ from .TextMarkAtributes import *
34
+ from .TextMarks import *
@@ -7,6 +7,7 @@ from LOGS.Entities.IRelatedEntityRequest import IRelatedEntityRequest
7
7
  from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
8
8
  from LOGS.Interfaces.ICreationRecord import ICreationRecordRequest
9
9
  from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
10
+ from LOGS.Interfaces.INamedEntity import INamedEntityRequest
10
11
  from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
11
12
  from LOGS.Interfaces.ISoftDeletable import ISoftDeletableRequest
12
13
 
@@ -44,6 +45,7 @@ class LabNotebookEntryRequestParameter(
44
45
  ICreationRecordRequest,
45
46
  IModificationRecordRequest,
46
47
  IPermissionedEntityRequest,
48
+ INamedEntityRequest,
47
49
  ):
48
50
  includeContent: Optional[bool] = None
49
51
 
@@ -0,0 +1,52 @@
1
+ from typing import TYPE_CHECKING, Optional
2
+
3
+ from LOGS.Auxiliary.Decorators import Endpoint
4
+ from LOGS.Auxiliary.MinimalModelGenerator import MinimalFromSingle
5
+ from LOGS.Entities.LabNotebookModels import LabNotebookExperimentStatus
6
+ from LOGS.Entity.EntityWithIntId import IEntityWithIntId
7
+ from LOGS.Interfaces.INamedEntity import INamedEntity
8
+ from LOGS.Interfaces.IPermissionedEntity import GenericPermissionEntity
9
+ from LOGS.Interfaces.IVersionedEntity import IVersionedEntity
10
+
11
+ if TYPE_CHECKING:
12
+ from LOGS.Entities import LabNotebookMinimal
13
+
14
+
15
+ @Endpoint("lab_notebook_experiments")
16
+ class LabNotebookExperiment(
17
+ IEntityWithIntId,
18
+ INamedEntity,
19
+ GenericPermissionEntity,
20
+ IVersionedEntity,
21
+ ):
22
+ _description: Optional[str] = None
23
+ _status: Optional[LabNotebookExperimentStatus] = None
24
+ _labNotebook: Optional["LabNotebookMinimal"] = None
25
+
26
+ @property
27
+ def description(self) -> Optional[str]:
28
+ return self._description
29
+
30
+ @description.setter
31
+ def description(self, value: str):
32
+ self._description = self.checkAndConvertNullable(value, str, "description")
33
+
34
+ @property
35
+ def status(self) -> Optional[LabNotebookExperimentStatus]:
36
+ return self._status
37
+
38
+ @status.setter
39
+ def status(self, value: str):
40
+ self._status = self.checkAndConvertNullable(
41
+ value, LabNotebookExperimentStatus, "status"
42
+ )
43
+
44
+ @property
45
+ def labNotebook(self) -> Optional["LabNotebookMinimal"]:
46
+ return self._labNotebook
47
+
48
+ @labNotebook.setter
49
+ def labNotebook(self, value: str):
50
+ self._labNotebook = MinimalFromSingle(
51
+ value, "LabNotebookMinimal", "labNotebook"
52
+ )
@@ -0,0 +1,8 @@
1
+ from LOGS.Auxiliary.Decorators import FullModel
2
+ from LOGS.Entities.LabNotebookExperiment import LabNotebookExperiment
3
+ from LOGS.Entity.EntityMinimalWithIntId import EntityMinimalWithIntId
4
+
5
+
6
+ @FullModel(LabNotebookExperiment)
7
+ class LabNotebookExperimentMinimal(EntityMinimalWithIntId[LabNotebookExperiment]):
8
+ pass