logs-py 4.0.7__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.
- LOGS/Auxiliary/CheckClassName.py +1075 -0
- LOGS/Auxiliary/Constants.py +99 -0
- LOGS/Auxiliary/CustomEntityClassGenerator.py +254 -0
- LOGS/Auxiliary/CustomFieldClassGenerator.py +115 -0
- LOGS/Auxiliary/CustomFieldValueTypeChecker.py +168 -0
- LOGS/Auxiliary/CustomSectionClassGenerator.py +113 -0
- LOGS/Auxiliary/CustomTypeClassGenerator.py +147 -0
- LOGS/Auxiliary/DateTimeConverter.py +66 -0
- LOGS/Auxiliary/Decorators.py +109 -0
- LOGS/Auxiliary/Exceptions.py +341 -0
- LOGS/Auxiliary/LOGSErrorResponse.py +89 -0
- LOGS/Auxiliary/MinimalModelGenerator.py +236 -0
- LOGS/Auxiliary/ParameterHelper.py +56 -0
- LOGS/Auxiliary/ReplaceMessage.py +13 -0
- LOGS/Auxiliary/Tools.py +432 -0
- LOGS/Auxiliary/__init__.py +15 -0
- LOGS/Converter/Conversion.py +248 -0
- LOGS/Converter/Converter.py +96 -0
- LOGS/Converter/ConverterParameter.py +88 -0
- LOGS/Converter/DateTimeRange.py +58 -0
- LOGS/Converter/ExportParameters.py +89 -0
- LOGS/Converter/__init__.py +13 -0
- LOGS/Entities/Attachment.py +84 -0
- LOGS/Entities/AttachmentMinimal.py +8 -0
- LOGS/Entities/AttachmentRequestParameter.py +42 -0
- LOGS/Entities/Attachments.py +53 -0
- LOGS/Entities/AutoloadFileInfo.py +12 -0
- LOGS/Entities/AutoloadStatusError.py +7 -0
- LOGS/Entities/AxisNaming.py +33 -0
- LOGS/Entities/AxisZoom.py +33 -0
- LOGS/Entities/Bridge.py +165 -0
- LOGS/Entities/BridgeClientInfo.py +93 -0
- LOGS/Entities/BridgeMinimal.py +8 -0
- LOGS/Entities/BridgeRequestParameter.py +49 -0
- LOGS/Entities/BridgeType.py +7 -0
- LOGS/Entities/Bridges.py +12 -0
- LOGS/Entities/CustomField.py +243 -0
- LOGS/Entities/CustomFieldMinimal.py +8 -0
- LOGS/Entities/CustomFieldModels.py +111 -0
- LOGS/Entities/CustomFieldRequestParameter.py +69 -0
- LOGS/Entities/CustomFieldSearchQuery.py +40 -0
- LOGS/Entities/CustomFields.py +12 -0
- LOGS/Entities/CustomType.py +212 -0
- LOGS/Entities/CustomTypeMinimal.py +8 -0
- LOGS/Entities/CustomTypeRequestParameter.py +60 -0
- LOGS/Entities/CustomTypeSection.py +63 -0
- LOGS/Entities/CustomTypes.py +12 -0
- LOGS/Entities/DataFormat.py +97 -0
- LOGS/Entities/DataFormatInstrument.py +18 -0
- LOGS/Entities/DataFormatInstrumentMinimal.py +8 -0
- LOGS/Entities/DataFormatInstrumentRequestParameter.py +17 -0
- LOGS/Entities/DataFormatInstruments.py +16 -0
- LOGS/Entities/DataFormatMinimal.py +18 -0
- LOGS/Entities/DataFormatRequestParameter.py +21 -0
- LOGS/Entities/DataFormats.py +12 -0
- LOGS/Entities/DataSource.py +218 -0
- LOGS/Entities/DataSourceConnectionStatus.py +12 -0
- LOGS/Entities/DataSourceMinimal.py +8 -0
- LOGS/Entities/DataSourceRequestParameter.py +57 -0
- LOGS/Entities/DataSourceStatus.py +108 -0
- LOGS/Entities/DataSourceStatusIterator.py +16 -0
- LOGS/Entities/DataSourceStatusRequestParameter.py +31 -0
- LOGS/Entities/DataSources.py +12 -0
- LOGS/Entities/Dataset.py +439 -0
- LOGS/Entities/DatasetBase.py +196 -0
- LOGS/Entities/DatasetCreator.py +148 -0
- LOGS/Entities/DatasetInfo.py +147 -0
- LOGS/Entities/DatasetMatchTypes.py +157 -0
- LOGS/Entities/DatasetMatching.py +196 -0
- LOGS/Entities/DatasetMinimal.py +8 -0
- LOGS/Entities/DatasetModels.py +33 -0
- LOGS/Entities/DatasetRequestParameter.py +92 -0
- LOGS/Entities/DatasetTemplate.py +23 -0
- LOGS/Entities/DatasetUploadParameter.py +14 -0
- LOGS/Entities/Datasets.py +142 -0
- LOGS/Entities/Datatrack.py +179 -0
- LOGS/Entities/DatatrackFormattedTable.py +25 -0
- LOGS/Entities/DatatrackGeneric.py +34 -0
- LOGS/Entities/DatatrackImage.py +25 -0
- LOGS/Entities/DatatrackNumericArray.py +30 -0
- LOGS/Entities/DatatrackNumericMatrix.py +98 -0
- LOGS/Entities/Entities.py +71 -0
- LOGS/Entities/EntitiesRequestParameter.py +18 -0
- LOGS/Entities/EntityOriginWriteModelWithId.py +15 -0
- LOGS/Entities/FileEntry.py +138 -0
- LOGS/Entities/FileExcludePattern.py +8 -0
- LOGS/Entities/FormatMetaData.py +56 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTable.py +135 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTableCell.py +108 -0
- LOGS/Entities/FormattedTable/DatatypeFormattedTableSettings.py +11 -0
- LOGS/Entities/FormattedTable/__init__.py +9 -0
- LOGS/Entities/HierarchyLeaf.py +15 -0
- LOGS/Entities/HierarchyNode.py +40 -0
- LOGS/Entities/ILiteraryTypedEntity.py +19 -0
- LOGS/Entities/InventoryItem.py +102 -0
- LOGS/Entities/InventoryItemMinimal.py +25 -0
- LOGS/Entities/InventoryItemRequestParameter.py +58 -0
- LOGS/Entities/InventoryItems.py +12 -0
- LOGS/Entities/LabNotebook.py +33 -0
- LOGS/Entities/LabNotebookEntries.py +16 -0
- LOGS/Entities/LabNotebookEntry.py +106 -0
- LOGS/Entities/LabNotebookEntryContent/BasicAttribute.py +15 -0
- LOGS/Entities/LabNotebookEntryContent/EntityAttribute.py +85 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentBlockquote.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentBulletList.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentCallout.py +40 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentContentPlaceholderNode.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentConverter.py +207 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentDocument.py +8 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentEntity.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentEntityMention.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentHeading.py +33 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentHorizontalRule.py +12 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentItem.py +37 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentListItem.py +49 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentOrderedList.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentParagraph.py +13 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTable.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTableCell.py +40 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTableRow.py +8 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTaskList.py +17 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentTaskListItem.py +31 -0
- LOGS/Entities/LabNotebookEntryContent/EntryContentText.py +33 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithAttribute.py +23 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithContent.py +38 -0
- LOGS/Entities/LabNotebookEntryContent/IEntryContentWithTextAttribute.py +16 -0
- LOGS/Entities/LabNotebookEntryContent/TextAttribute.py +46 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarkAtributes.py +64 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarkConverter.py +45 -0
- LOGS/Entities/LabNotebookEntryContent/TextMarks.py +71 -0
- LOGS/Entities/LabNotebookEntryContent/__init__.py +34 -0
- LOGS/Entities/LabNotebookEntryMinimal.py +8 -0
- LOGS/Entities/LabNotebookEntryRequestParameter.py +59 -0
- LOGS/Entities/LabNotebookExperiment.py +58 -0
- LOGS/Entities/LabNotebookExperimentMinimal.py +8 -0
- LOGS/Entities/LabNotebookExperimentRequestParameter.py +52 -0
- LOGS/Entities/LabNotebookExperiments.py +16 -0
- LOGS/Entities/LabNotebookMinimal.py +8 -0
- LOGS/Entities/LabNotebookModels.py +14 -0
- LOGS/Entities/LabNotebookRequestParameter.py +42 -0
- LOGS/Entities/LabNotebookTemplate.py +42 -0
- LOGS/Entities/LabNotebookTemplateMinimal.py +8 -0
- LOGS/Entities/LabNotebookTemplateRequestParameter.py +38 -0
- LOGS/Entities/LabNotebookTemplates.py +16 -0
- LOGS/Entities/LabNotebooks.py +12 -0
- LOGS/Entities/Method.py +66 -0
- LOGS/Entities/MethodMinimal.py +8 -0
- LOGS/Entities/MethodRequestParameter.py +16 -0
- LOGS/Entities/Methods.py +12 -0
- LOGS/Entities/Origin.py +53 -0
- LOGS/Entities/OriginMinimal.py +8 -0
- LOGS/Entities/OriginRequestParameter.py +28 -0
- LOGS/Entities/Origins.py +12 -0
- LOGS/Entities/ParserLog.py +49 -0
- LOGS/Entities/Permission.py +9 -0
- LOGS/Entities/Person.py +145 -0
- LOGS/Entities/PersonCategory.py +12 -0
- LOGS/Entities/PersonMinimal.py +8 -0
- LOGS/Entities/PersonRequestParameter.py +58 -0
- LOGS/Entities/Persons.py +12 -0
- LOGS/Entities/Project.py +52 -0
- LOGS/Entities/ProjectMinimal.py +8 -0
- LOGS/Entities/ProjectPersonPermission.py +102 -0
- LOGS/Entities/ProjectRequestParameter.py +58 -0
- LOGS/Entities/Projects.py +12 -0
- LOGS/Entities/Role.py +94 -0
- LOGS/Entities/RoleMinimal.py +8 -0
- LOGS/Entities/RoleRequestParameter.py +40 -0
- LOGS/Entities/Roles.py +12 -0
- LOGS/Entities/RunState.py +9 -0
- LOGS/Entities/Sample.py +53 -0
- LOGS/Entities/SampleMinimal.py +8 -0
- LOGS/Entities/SampleRequestParameter.py +54 -0
- LOGS/Entities/Samples.py +12 -0
- LOGS/Entities/SharedContent.py +87 -0
- LOGS/Entities/SharedContentMinimal.py +8 -0
- LOGS/Entities/SharedContentRequestParameter.py +38 -0
- LOGS/Entities/SharedContents.py +12 -0
- LOGS/Entities/Signature.py +60 -0
- LOGS/Entities/Track.py +93 -0
- LOGS/Entities/TrackData.py +20 -0
- LOGS/Entities/TrackImage.py +21 -0
- LOGS/Entities/TrackImageData.py +20 -0
- LOGS/Entities/TrackMatrix.py +28 -0
- LOGS/Entities/TrackMatrixData.py +22 -0
- LOGS/Entities/TrackSettings.py +55 -0
- LOGS/Entities/TrackTable.py +21 -0
- LOGS/Entities/TrackTableData.py +22 -0
- LOGS/Entities/TrackXY.py +40 -0
- LOGS/Entities/TrackXYComplex.py +51 -0
- LOGS/Entities/TrackXYComplexData.py +50 -0
- LOGS/Entities/TrackXYData.py +31 -0
- LOGS/Entities/Vendor.py +40 -0
- LOGS/Entities/VendorMinimal.py +8 -0
- LOGS/Entities/VendorRequestParameter.py +17 -0
- LOGS/Entities/Vendors.py +12 -0
- LOGS/Entities/__init__.py +118 -0
- LOGS/Entity/ConnectedEntity.py +170 -0
- LOGS/Entity/Entity.py +203 -0
- LOGS/Entity/EntityConnector.py +70 -0
- LOGS/Entity/EntityIterator.py +263 -0
- LOGS/Entity/EntityMinimal.py +141 -0
- LOGS/Entity/EntityMinimalWithIntId.py +36 -0
- LOGS/Entity/EntityMinimalWithStrId.py +36 -0
- LOGS/Entity/EntityMinimalWithType.py +47 -0
- LOGS/Entity/EntityRequestParameter.py +104 -0
- LOGS/Entity/EntitySortBy.py +69 -0
- LOGS/Entity/EntityWithIntId.py +26 -0
- LOGS/Entity/EntityWithStrId.py +26 -0
- LOGS/Entity/IGenericEntityOrderBy.py +55 -0
- LOGS/Entity/IdIterator.py +207 -0
- LOGS/Entity/SerializableContent.py +834 -0
- LOGS/Entity/__init__.py +23 -0
- LOGS/Interfaces/ICustomFieldValue.py +92 -0
- LOGS/Interfaces/ICustomSectionValue.py +161 -0
- LOGS/Interfaces/ICustomTypeValue.py +152 -0
- LOGS/Interfaces/ICustomValue.py +28 -0
- LOGS/Interfaces/IEntityInterface.py +7 -0
- LOGS/Interfaces/IEntryRecord.py +57 -0
- LOGS/Interfaces/IHierarchicalEntity.py +41 -0
- LOGS/Interfaces/IHierarchyType.py +63 -0
- LOGS/Interfaces/ILockableEntity.py +52 -0
- LOGS/Interfaces/IModificationRecord.py +56 -0
- LOGS/Interfaces/INamedEntity.py +25 -0
- LOGS/Interfaces/IOwnedEntity.py +27 -0
- LOGS/Interfaces/IPaginationRequest.py +11 -0
- LOGS/Interfaces/IPermissionedEntity.py +72 -0
- LOGS/Interfaces/IProjectBased.py +27 -0
- LOGS/Interfaces/ISessionedEntity.py +59 -0
- LOGS/Interfaces/ISignableEntity.py +49 -0
- LOGS/Interfaces/ISoftDeletable.py +28 -0
- LOGS/Interfaces/ITypedEntity.py +129 -0
- LOGS/Interfaces/IUniqueEntity.py +61 -0
- LOGS/Interfaces/IVersionedEntity.py +39 -0
- LOGS/Interfaces/__init__.py +7 -0
- LOGS/LOGS.py +1436 -0
- LOGS/LOGSConnection.py +647 -0
- LOGS/LOGSOptions.py +11 -0
- LOGS/Parameters/Color.py +92 -0
- LOGS/Parameters/ParameterBase.py +55 -0
- LOGS/Parameters/ParameterConverter.py +24 -0
- LOGS/Parameters/ParameterElement.py +99 -0
- LOGS/Parameters/ParameterList.py +52 -0
- LOGS/Parameters/ParameterTable.py +64 -0
- LOGS/Parameters/__init__.py +13 -0
- LOGS/ServerMetaData.py +120 -0
- LOGS/__init__.py +12 -0
- logs_py-4.0.7.dist-info/METADATA +51 -0
- logs_py-4.0.7.dist-info/RECORD +251 -0
- logs_py-4.0.7.dist-info/WHEEL +5 -0
- logs_py-4.0.7.dist-info/top_level.txt +1 -0
|
@@ -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.SerializableContent import SerializableContent
|
|
5
|
+
|
|
6
|
+
_T = TypeVar("_T", bound=BasicAttribute)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class IEntryContentWithAttribute(Generic[_T], SerializableContent):
|
|
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.SerializableContent import SerializableContent
|
|
8
|
+
|
|
9
|
+
_T = TypeVar("_T", bound=EntryContentItem)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IEntryContentWithContent(SerializableContent):
|
|
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.SerializableContent import SerializableContent
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class IEntryContentWithTextAttribute(SerializableContent):
|
|
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 *
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import FullModel
|
|
2
|
+
from LOGS.Entities.LabNotebookEntry import LabNotebookEntry
|
|
3
|
+
from LOGS.Entity.EntityMinimalWithIntId import EntityMinimalWithIntId
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@FullModel(LabNotebookEntry)
|
|
7
|
+
class LabNotebookEntryMinimal(EntityMinimalWithIntId[LabNotebookEntry]):
|
|
8
|
+
pass
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from datetime import date
|
|
3
|
+
from typing import List, Optional, Type, cast
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Self
|
|
6
|
+
|
|
7
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
8
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
9
|
+
IGenericEntitySortingOptions,
|
|
10
|
+
IModificationRecordSortingOptions,
|
|
11
|
+
)
|
|
12
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntityRequest
|
|
13
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
14
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
15
|
+
from LOGS.Interfaces.IProjectBased import IProjectBasedRequest
|
|
16
|
+
from LOGS.Interfaces.ISignableEntity import ISignableEntityRequest
|
|
17
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
18
|
+
from LOGS.Interfaces.IVersionedEntity import IVersionedEntityRequest
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class LabNotebookEntrySortingOptions(
|
|
22
|
+
IGenericEntitySortingOptions, IModificationRecordSortingOptions
|
|
23
|
+
):
|
|
24
|
+
NAME: Self = cast(Self, "NAME")
|
|
25
|
+
ENTRY_DATE: Self = cast(Self, "ENTRY_DATE")
|
|
26
|
+
VERSION: Self = cast(Self, "VERSION")
|
|
27
|
+
LAB_NOTEBOOK_ID: Self = cast(Self, "LAB_NOTEBOOK_ID")
|
|
28
|
+
LAB_NOTEBOOK_NAME: Self = cast(Self, "LAB_NOTEBOOK_NAME")
|
|
29
|
+
LAB_NOTEBOOK_EXPERIMENT_ID: Self = cast(Self, "LAB_NOTEBOOK_EXPERIMENT_ID")
|
|
30
|
+
LAB_NOTEBOOK_EXPERIMENT_NAME: Self = cast(Self, "LAB_NOTEBOOK_EXPERIMENT_NAME")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass
|
|
34
|
+
class LabNotebookEntryRequestParameter(
|
|
35
|
+
EntityRequestParameter[LabNotebookEntrySortingOptions],
|
|
36
|
+
IPermissionedEntityRequest,
|
|
37
|
+
IUniqueEntityRequest,
|
|
38
|
+
INamedEntityRequest,
|
|
39
|
+
IProjectBasedRequest,
|
|
40
|
+
ILockableEntityRequest,
|
|
41
|
+
ISignableEntityRequest,
|
|
42
|
+
IVersionedEntityRequest,
|
|
43
|
+
):
|
|
44
|
+
_orderByType: Type[LabNotebookEntrySortingOptions] = field(
|
|
45
|
+
default=LabNotebookEntrySortingOptions, init=False
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
entryDateFrom: Optional[date] = None
|
|
49
|
+
entryDateTo: Optional[date] = None
|
|
50
|
+
labNotebookExperimentReferenceIds: Optional[List[int]] = None
|
|
51
|
+
datasetReferenceIds: Optional[List[int]] = None
|
|
52
|
+
attachmentReferenceIds: Optional[List[int]] = None
|
|
53
|
+
personReferenceIds: Optional[List[int]] = None
|
|
54
|
+
projectReferenceIds: Optional[List[int]] = None
|
|
55
|
+
sampleReferenceIds: Optional[List[int]] = None
|
|
56
|
+
inventoryItemReferenceIds: Optional[List[int]] = None
|
|
57
|
+
labNotebookReferenceIds: Optional[List[int]] = None
|
|
58
|
+
useFullTextSearch: Optional[bool] = None
|
|
59
|
+
includeContent: Optional[bool] = None
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
|
+
from LOGS.Auxiliary.MinimalModelGenerator import MinimalModelGenerator
|
|
5
|
+
from LOGS.Entities.LabNotebookModels import LabNotebookExperimentStatus
|
|
6
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
7
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntity
|
|
8
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
9
|
+
from LOGS.Interfaces.IPermissionedEntity import IGenericPermissionEntity
|
|
10
|
+
from LOGS.Interfaces.ISignableEntity import ISignableEntity
|
|
11
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
12
|
+
from LOGS.Interfaces.IVersionedEntity import IVersionedEntity
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from LOGS.Entities import LabNotebookMinimal
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@Endpoint("lab_notebook_experiments")
|
|
19
|
+
class LabNotebookExperiment(
|
|
20
|
+
IEntityWithIntId,
|
|
21
|
+
IUniqueEntity,
|
|
22
|
+
INamedEntity,
|
|
23
|
+
IVersionedEntity,
|
|
24
|
+
IGenericPermissionEntity,
|
|
25
|
+
ILockableEntity,
|
|
26
|
+
ISignableEntity,
|
|
27
|
+
):
|
|
28
|
+
_labNotebook: Optional["LabNotebookMinimal"] = None
|
|
29
|
+
_status: Optional[LabNotebookExperimentStatus] = None
|
|
30
|
+
_description: Optional[str] = None
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def description(self) -> Optional[str]:
|
|
34
|
+
return self._description
|
|
35
|
+
|
|
36
|
+
@description.setter
|
|
37
|
+
def description(self, value: str):
|
|
38
|
+
self._description = self.checkAndConvertNullable(value, str, "description")
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def status(self) -> Optional[LabNotebookExperimentStatus]:
|
|
42
|
+
return self._status
|
|
43
|
+
|
|
44
|
+
@status.setter
|
|
45
|
+
def status(self, value: str):
|
|
46
|
+
self._status = self.checkAndConvertNullable(
|
|
47
|
+
value, LabNotebookExperimentStatus, "status"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def labNotebook(self) -> Optional["LabNotebookMinimal"]:
|
|
52
|
+
return self._labNotebook
|
|
53
|
+
|
|
54
|
+
@labNotebook.setter
|
|
55
|
+
def labNotebook(self, value: str):
|
|
56
|
+
self._labNotebook = MinimalModelGenerator.MinimalFromSingle(
|
|
57
|
+
value, "LabNotebookMinimal", "labNotebook", self._getConnection()
|
|
58
|
+
)
|
|
@@ -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
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import List, Optional, Type, cast
|
|
3
|
+
|
|
4
|
+
from typing_extensions import Self
|
|
5
|
+
|
|
6
|
+
from LOGS.Entities.LabNotebookModels import LabNotebookExperimentStatus
|
|
7
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
8
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
9
|
+
IGenericEntitySortingOptions,
|
|
10
|
+
IModificationRecordSortingOptions,
|
|
11
|
+
INamedEntitySortingOptions,
|
|
12
|
+
)
|
|
13
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntityRequest
|
|
14
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
15
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
16
|
+
from LOGS.Interfaces.IProjectBased import IProjectBasedRequest
|
|
17
|
+
from LOGS.Interfaces.ISignableEntity import ISignableEntityRequest
|
|
18
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
19
|
+
from LOGS.Interfaces.IVersionedEntity import IVersionedEntityRequest
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class LabNotebookExperimentSortingOptions(
|
|
23
|
+
IGenericEntitySortingOptions,
|
|
24
|
+
INamedEntitySortingOptions,
|
|
25
|
+
IModificationRecordSortingOptions,
|
|
26
|
+
):
|
|
27
|
+
STATUS: Self = cast(Self, "STATUS")
|
|
28
|
+
VERSION: Self = cast(Self, "VERSION")
|
|
29
|
+
LAB_NOTEBOOK_ID: Self = cast(Self, "LAB_NOTEBOOK_ID")
|
|
30
|
+
LAB_NOTEBOOK_NAME: Self = cast(Self, "LAB_NOTEBOOK_NAME")
|
|
31
|
+
LAB_NOTEBOOK_EXPERIMENT_ID: Self = cast(Self, "LAB_NOTEBOOK_EXPERIMENT_ID")
|
|
32
|
+
LAB_NOTEBOOK_EXPERIMENT_NAME: Self = cast(Self, "LAB_NOTEBOOK_EXPERIMENT_NAME")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass
|
|
36
|
+
class LabNotebookExperimentRequestParameter(
|
|
37
|
+
EntityRequestParameter[LabNotebookExperimentSortingOptions],
|
|
38
|
+
IPermissionedEntityRequest,
|
|
39
|
+
IUniqueEntityRequest,
|
|
40
|
+
INamedEntityRequest,
|
|
41
|
+
IProjectBasedRequest,
|
|
42
|
+
ILockableEntityRequest,
|
|
43
|
+
ISignableEntityRequest,
|
|
44
|
+
IVersionedEntityRequest[int],
|
|
45
|
+
):
|
|
46
|
+
_orderByType: Type[LabNotebookExperimentSortingOptions] = field(
|
|
47
|
+
default=LabNotebookExperimentSortingOptions, init=False
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
status: Optional[List[LabNotebookExperimentStatus]] = None
|
|
51
|
+
labNotebookIds: Optional[List[int]] = None
|
|
52
|
+
labNotebookProjectIds: Optional[List[int]] = None
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.LabNotebookExperiment import LabNotebookExperiment
|
|
3
|
+
from LOGS.Entities.LabNotebookExperimentRequestParameter import (
|
|
4
|
+
LabNotebookExperimentRequestParameter,
|
|
5
|
+
)
|
|
6
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@Endpoint("lab_notebook_experiments")
|
|
10
|
+
class LabNotebookExperiments(
|
|
11
|
+
EntityIterator[LabNotebookExperiment, LabNotebookExperimentRequestParameter]
|
|
12
|
+
):
|
|
13
|
+
"""LOGS connected LabNotebookExperiment iterator"""
|
|
14
|
+
|
|
15
|
+
_generatorType = LabNotebookExperiment
|
|
16
|
+
_parameterType = LabNotebookExperimentRequestParameter
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import FullModel
|
|
2
|
+
from LOGS.Entities.LabNotebook import LabNotebook
|
|
3
|
+
from LOGS.Entity.EntityMinimalWithIntId import EntityMinimalWithIntId
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@FullModel(LabNotebook)
|
|
7
|
+
class LabNotebookMinimal(EntityMinimalWithIntId[LabNotebook]):
|
|
8
|
+
pass
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class LabNotebookStatus(Enum):
|
|
5
|
+
CLOSED = "CLOSED"
|
|
6
|
+
ACTIVE = "ACTIVE"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class LabNotebookExperimentStatus(Enum):
|
|
10
|
+
RUNNING = "RUNNING"
|
|
11
|
+
PAUSED = "PAUSED"
|
|
12
|
+
COMPLETED = "COMPLETED"
|
|
13
|
+
FAILED = "FAILED"
|
|
14
|
+
ABORTED = "ABORTED"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Type, cast
|
|
3
|
+
|
|
4
|
+
from typing_extensions import Self
|
|
5
|
+
|
|
6
|
+
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
7
|
+
from LOGS.Entity.IGenericEntityOrderBy import (
|
|
8
|
+
IGenericEntitySortingOptions,
|
|
9
|
+
IModificationRecordSortingOptions,
|
|
10
|
+
INamedEntitySortingOptions,
|
|
11
|
+
)
|
|
12
|
+
from LOGS.Interfaces.ILockableEntity import ILockableEntityRequest
|
|
13
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
14
|
+
from LOGS.Interfaces.IPermissionedEntity import IPermissionedEntityRequest
|
|
15
|
+
from LOGS.Interfaces.IProjectBased import IProjectBasedRequest
|
|
16
|
+
from LOGS.Interfaces.ISignableEntity import ISignableEntityRequest
|
|
17
|
+
from LOGS.Interfaces.IUniqueEntity import IUniqueEntityRequest
|
|
18
|
+
from LOGS.Interfaces.IVersionedEntity import IVersionedEntityRequest
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class LabNotebookSortingOptions(
|
|
22
|
+
IGenericEntitySortingOptions,
|
|
23
|
+
INamedEntitySortingOptions,
|
|
24
|
+
IModificationRecordSortingOptions,
|
|
25
|
+
):
|
|
26
|
+
VERSION: Self = cast(Self, "VERSION")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class LabNotebookRequestParameter(
|
|
31
|
+
EntityRequestParameter[LabNotebookSortingOptions],
|
|
32
|
+
IPermissionedEntityRequest,
|
|
33
|
+
IUniqueEntityRequest,
|
|
34
|
+
INamedEntityRequest,
|
|
35
|
+
IProjectBasedRequest,
|
|
36
|
+
IVersionedEntityRequest[int],
|
|
37
|
+
ILockableEntityRequest,
|
|
38
|
+
ISignableEntityRequest,
|
|
39
|
+
):
|
|
40
|
+
_orderByType: Type[LabNotebookSortingOptions] = field(
|
|
41
|
+
default=LabNotebookSortingOptions, init=False
|
|
42
|
+
)
|