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,60 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Optional
|
|
3
|
+
|
|
4
|
+
from LOGS.Auxiliary.MinimalModelGenerator import MinimalModelGenerator
|
|
5
|
+
from LOGS.Entities.PersonMinimal import PersonMinimal
|
|
6
|
+
from LOGS.Entity.Entity import Entity
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from LOGS.Entities.PersonMinimal import PersonMinimal
|
|
10
|
+
|
|
11
|
+
from enum import Enum
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SignatureType(Enum):
|
|
15
|
+
Unknown = "Unknown"
|
|
16
|
+
Contributor = "Contributor"
|
|
17
|
+
Reviewer = "Reviewer"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Signature(Entity):
|
|
21
|
+
_signedBy: Optional["PersonMinimal"] = None
|
|
22
|
+
_timestamp: Optional[datetime] = None
|
|
23
|
+
_signatureType: Optional[SignatureType] = None
|
|
24
|
+
_comment: Optional[str] = None
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def signedBy(self) -> Optional["PersonMinimal"]:
|
|
28
|
+
return self._signedBy
|
|
29
|
+
|
|
30
|
+
@signedBy.setter
|
|
31
|
+
def signedBy(self, value):
|
|
32
|
+
self._signedBy = MinimalModelGenerator.MinimalFromSingle(
|
|
33
|
+
value, "PersonMinimal", "signedBy", self._getConnection()
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def timestamp(self) -> Optional[datetime]:
|
|
38
|
+
return self._timestamp
|
|
39
|
+
|
|
40
|
+
@timestamp.setter
|
|
41
|
+
def timestamp(self, value: Optional[datetime]):
|
|
42
|
+
self._timestamp = self.checkAndConvertNullable(value, datetime, "timestamp")
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def signatureType(self) -> Optional[SignatureType]:
|
|
46
|
+
return self._signatureType
|
|
47
|
+
|
|
48
|
+
@signatureType.setter
|
|
49
|
+
def signatureType(self, value: Optional[SignatureType]):
|
|
50
|
+
self._signatureType = self.checkAndConvertNullable(
|
|
51
|
+
value, SignatureType, "signatureType"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def comment(self) -> Optional[str]:
|
|
56
|
+
return self._comment
|
|
57
|
+
|
|
58
|
+
@comment.setter
|
|
59
|
+
def comment(self, value: Optional[str]):
|
|
60
|
+
self._comment = self.checkAndConvertNullable(value, str, "comment")
|
LOGS/Entities/Track.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from typing import Any, Dict, Generic, List, Literal, Optional, TypeVar, Union, cast
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.Datatrack import Datatrack
|
|
4
|
+
from LOGS.Entities.TrackData import TrackData
|
|
5
|
+
from LOGS.Entities.TrackSettings import TrackSettings
|
|
6
|
+
from LOGS.Entity.EntityWithStrId import EntityWithStrId
|
|
7
|
+
|
|
8
|
+
TrackTypes = Literal[
|
|
9
|
+
"nucleotide_sequence",
|
|
10
|
+
"image",
|
|
11
|
+
"matrix_real",
|
|
12
|
+
"pdf",
|
|
13
|
+
"table",
|
|
14
|
+
"XY_complex",
|
|
15
|
+
"XY_real",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
_T = TypeVar("_T", bound=Union[Datatrack, Dict[str, Datatrack]])
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Track(Generic[_T], EntityWithStrId):
|
|
22
|
+
_name: Optional[str] = None
|
|
23
|
+
_type: Optional[TrackTypes] = None
|
|
24
|
+
_tags: Optional[List[str]] = None
|
|
25
|
+
_settings: TrackSettings = TrackSettings()
|
|
26
|
+
_dataIds: Optional[dict] = None
|
|
27
|
+
_datatracks: Optional[_T] = None
|
|
28
|
+
|
|
29
|
+
def fromDict(self, ref) -> None:
|
|
30
|
+
if isinstance(ref, dict):
|
|
31
|
+
if "data" in ref:
|
|
32
|
+
self._dataIds = self.checkAndConvertNullable(ref["data"], dict)
|
|
33
|
+
ref["data"] = None
|
|
34
|
+
|
|
35
|
+
super().fromDict(ref)
|
|
36
|
+
|
|
37
|
+
def toDict(self) -> Dict[str, Any]:
|
|
38
|
+
d = super().toDict()
|
|
39
|
+
if isinstance(self.datatracks, TrackData):
|
|
40
|
+
d["data"] = self.datatracks.toData()
|
|
41
|
+
return d
|
|
42
|
+
|
|
43
|
+
def __str__(self):
|
|
44
|
+
s = (" name:'%s'" % getattr(self, "name")) if hasattr(self, "name") else ""
|
|
45
|
+
return "<%s id:%s%s>" % (type(self).__name__, str(self.id), s)
|
|
46
|
+
|
|
47
|
+
def _fetchData(self):
|
|
48
|
+
if isinstance(self.datatracks, dict):
|
|
49
|
+
for t in self.datatracks.values():
|
|
50
|
+
t.fetchFull()
|
|
51
|
+
|
|
52
|
+
def fetchFull(self):
|
|
53
|
+
self._fetchData()
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def name(self) -> Optional[str]:
|
|
57
|
+
return self._name
|
|
58
|
+
|
|
59
|
+
@name.setter
|
|
60
|
+
def name(self, value):
|
|
61
|
+
self._name = self.checkAndConvertNullable(value, str, "name")
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def type(self) -> Optional[TrackTypes]:
|
|
65
|
+
return self._type
|
|
66
|
+
|
|
67
|
+
@type.setter
|
|
68
|
+
def type(self, value):
|
|
69
|
+
self._type = cast(TrackTypes, self.checkAndConvertNullable(value, str, "type"))
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def tags(self) -> Optional[List[str]]:
|
|
73
|
+
return self._tags
|
|
74
|
+
|
|
75
|
+
@tags.setter
|
|
76
|
+
def tags(self, value):
|
|
77
|
+
self._tags = self.checkListAndConvertNullable(value, str, "tags")
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def settings(self) -> TrackSettings:
|
|
81
|
+
return self._settings
|
|
82
|
+
|
|
83
|
+
@settings.setter
|
|
84
|
+
def settings(self, value):
|
|
85
|
+
self._settings = self.checkAndConvert(value, TrackSettings, "settings")
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def datatracks(self) -> Optional[_T]:
|
|
89
|
+
return self._datatracks
|
|
90
|
+
|
|
91
|
+
@datatracks.setter
|
|
92
|
+
def datatracks(self, value):
|
|
93
|
+
self._datatracks = cast(Any, self.checkAndConvertNullable(value, dict, "data"))
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from LOGS.Entity.SerializableContent import SerializableContent
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class TrackData(SerializableContent):
|
|
5
|
+
def fetchFull(self):
|
|
6
|
+
raise NotImplementedError(
|
|
7
|
+
"Specific %a class for this track type is not implemented yet."
|
|
8
|
+
% type(self).__name__
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
def toData(self):
|
|
12
|
+
from LOGS.Entities.Datatrack import Datatrack
|
|
13
|
+
|
|
14
|
+
d = {}
|
|
15
|
+
for key in self.__dict__:
|
|
16
|
+
if key.startswith("_"):
|
|
17
|
+
a = getattr(self, key)
|
|
18
|
+
if isinstance(a, Datatrack):
|
|
19
|
+
d[key[1:]] = a.id
|
|
20
|
+
return d
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.Track import Track
|
|
4
|
+
from LOGS.Entities.TrackImageData import TrackImageData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackImage(Track):
|
|
8
|
+
_datatracks: Optional[TrackImageData] = None
|
|
9
|
+
|
|
10
|
+
def _fetchData(self):
|
|
11
|
+
if self.datatracks:
|
|
12
|
+
if self.datatracks.image:
|
|
13
|
+
self.datatracks.image.fetchFull()
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def datatracks(self) -> Optional[TrackImageData]:
|
|
17
|
+
return self._datatracks
|
|
18
|
+
|
|
19
|
+
@datatracks.setter
|
|
20
|
+
def datatracks(self, value):
|
|
21
|
+
self._datatracks = self.checkAndConvertNullable(value, TrackImageData, "data")
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.DatatrackImage import DatatrackImage
|
|
4
|
+
from LOGS.Entities.TrackData import TrackData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackImageData(TrackData):
|
|
8
|
+
_image: Optional[DatatrackImage] = None
|
|
9
|
+
|
|
10
|
+
def fetchFull(self):
|
|
11
|
+
if self.image:
|
|
12
|
+
self.image.fetchFull()
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def image(self) -> Optional[DatatrackImage]:
|
|
16
|
+
return self._image
|
|
17
|
+
|
|
18
|
+
@image.setter
|
|
19
|
+
def image(self, value):
|
|
20
|
+
self._image = self.checkAndConvertNullable(value, DatatrackImage, "image")
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.Track import Track
|
|
4
|
+
from LOGS.Entities.TrackMatrixData import TrackMatrixData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackMatrix(Track):
|
|
8
|
+
_datatracks: Optional[TrackMatrixData] = None
|
|
9
|
+
|
|
10
|
+
def _fetchData(self):
|
|
11
|
+
if self.datatracks:
|
|
12
|
+
if self.datatracks.matrix:
|
|
13
|
+
self.datatracks.matrix.fetchFull()
|
|
14
|
+
|
|
15
|
+
def __iter__(self):
|
|
16
|
+
if self.datatracks is not None and self.datatracks.matrix is not None:
|
|
17
|
+
for i in self.datatracks.matrix:
|
|
18
|
+
yield i[0], i[1], self.datatracks.matrix.getValueFromIndex(i)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def datatracks(self) -> Optional[TrackMatrixData]:
|
|
22
|
+
return self._datatracks
|
|
23
|
+
|
|
24
|
+
@datatracks.setter
|
|
25
|
+
def datatracks(self, value):
|
|
26
|
+
self._datatracks = self.checkAndConvertNullable(
|
|
27
|
+
value, TrackMatrixData, "datatracks"
|
|
28
|
+
)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.DatatrackNumericMatrix import DatatrackNumericMatrix
|
|
4
|
+
from LOGS.Entities.TrackData import TrackData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackMatrixData(TrackData):
|
|
8
|
+
_matrix: Optional[DatatrackNumericMatrix] = None
|
|
9
|
+
|
|
10
|
+
def fetchFull(self):
|
|
11
|
+
if self.matrix:
|
|
12
|
+
self.matrix.fetchFull()
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def matrix(self) -> Optional[DatatrackNumericMatrix]:
|
|
16
|
+
return self._matrix
|
|
17
|
+
|
|
18
|
+
@matrix.setter
|
|
19
|
+
def matrix(self, value):
|
|
20
|
+
self._matrix = self.checkAndConvertNullable(
|
|
21
|
+
value, DatatrackNumericMatrix, "matrix"
|
|
22
|
+
)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.AxisNaming import AxisNaming
|
|
4
|
+
from LOGS.Entities.AxisZoom import AxisZoom
|
|
5
|
+
from LOGS.Entity.SerializableContent import SerializableContent
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TrackSettings(SerializableContent):
|
|
9
|
+
"""LOGS general Track settings"""
|
|
10
|
+
|
|
11
|
+
_color: Optional[str] = None
|
|
12
|
+
_axisUnits: Optional[AxisNaming] = None
|
|
13
|
+
_axisLabels: Optional[AxisNaming] = None
|
|
14
|
+
_visible: Optional[bool] = None
|
|
15
|
+
_zoom: Optional[AxisZoom] = None
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def color(self) -> Optional[str]:
|
|
19
|
+
return self._color
|
|
20
|
+
|
|
21
|
+
@color.setter
|
|
22
|
+
def color(self, value):
|
|
23
|
+
self._color = self.checkAndConvertNullable(value, str, "color")
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def axisUnits(self) -> Optional[AxisNaming]:
|
|
27
|
+
return self._axisUnits
|
|
28
|
+
|
|
29
|
+
@axisUnits.setter
|
|
30
|
+
def axisUnits(self, value):
|
|
31
|
+
self._axisUnits = self.checkAndConvertNullable(value, AxisNaming, "axisUnits")
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def axisLabels(self) -> Optional[AxisNaming]:
|
|
35
|
+
return self._axisLabels
|
|
36
|
+
|
|
37
|
+
@axisLabels.setter
|
|
38
|
+
def axisLabels(self, value):
|
|
39
|
+
self._axisLabels = self.checkAndConvertNullable(value, AxisNaming, "axisLabels")
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def visible(self) -> Optional[bool]:
|
|
43
|
+
return self._visible
|
|
44
|
+
|
|
45
|
+
@visible.setter
|
|
46
|
+
def visible(self, value):
|
|
47
|
+
self._visible = self.checkAndConvertNullable(value, bool, "visible")
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def zoom(self) -> Optional[AxisZoom]:
|
|
51
|
+
return self._zoom
|
|
52
|
+
|
|
53
|
+
@zoom.setter
|
|
54
|
+
def zoom(self, value):
|
|
55
|
+
self._zoom = self.checkAndConvertNullable(value, AxisZoom, "zoom")
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.Track import Track
|
|
4
|
+
from LOGS.Entities.TrackTableData import TrackTableData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackTable(Track):
|
|
8
|
+
_datatracks: Optional[TrackTableData] = None
|
|
9
|
+
|
|
10
|
+
def _fetchData(self):
|
|
11
|
+
if self.datatracks:
|
|
12
|
+
if self.datatracks.table:
|
|
13
|
+
self.datatracks.table.fetchFull()
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def datatracks(self) -> Optional[TrackTableData]:
|
|
17
|
+
return self._datatracks
|
|
18
|
+
|
|
19
|
+
@datatracks.setter
|
|
20
|
+
def datatracks(self, value):
|
|
21
|
+
self._datatracks = self.checkAndConvertNullable(value, TrackTableData, "data")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.DatatrackFormattedTable import DatatrackFormattedTable
|
|
4
|
+
from LOGS.Entities.TrackData import TrackData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackTableData(TrackData):
|
|
8
|
+
_table: Optional[DatatrackFormattedTable] = None
|
|
9
|
+
|
|
10
|
+
def fetchFull(self):
|
|
11
|
+
if self.table:
|
|
12
|
+
self.table.fetchFull()
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def table(self) -> Optional[DatatrackFormattedTable]:
|
|
16
|
+
return self._table
|
|
17
|
+
|
|
18
|
+
@table.setter
|
|
19
|
+
def table(self, value):
|
|
20
|
+
self._table = self.checkAndConvertNullable(
|
|
21
|
+
value, DatatrackFormattedTable, "matrix"
|
|
22
|
+
)
|
LOGS/Entities/TrackXY.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.Track import Track
|
|
4
|
+
from LOGS.Entities.TrackXYData import TrackXYData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackXY(Track):
|
|
8
|
+
_datatracks: Optional[TrackXYData] = None
|
|
9
|
+
|
|
10
|
+
def _fetchData(self):
|
|
11
|
+
if self.datatracks:
|
|
12
|
+
if self.datatracks.x:
|
|
13
|
+
self.datatracks.x.cacheDir = self.cacheDir
|
|
14
|
+
self.datatracks.x.fetchFull()
|
|
15
|
+
if self.datatracks.y:
|
|
16
|
+
self.datatracks.y.cacheDir = self.cacheDir
|
|
17
|
+
self.datatracks.y.fetchFull()
|
|
18
|
+
|
|
19
|
+
def __iter__(self):
|
|
20
|
+
if (
|
|
21
|
+
self.datatracks is not None
|
|
22
|
+
and self.datatracks.x is not None
|
|
23
|
+
and self.datatracks.x.count is not None
|
|
24
|
+
and self.datatracks.x.data is not None
|
|
25
|
+
and self.datatracks.y is not None
|
|
26
|
+
and self.datatracks.y.count is not None
|
|
27
|
+
and self.datatracks.y.data is not None
|
|
28
|
+
):
|
|
29
|
+
for i in range(min(self.datatracks.x.count, self.datatracks.y.count)):
|
|
30
|
+
yield self.datatracks.x.data[i], self.datatracks.y.data[i]
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def datatracks(self) -> Optional[TrackXYData]:
|
|
34
|
+
return self._datatracks
|
|
35
|
+
|
|
36
|
+
@datatracks.setter
|
|
37
|
+
def datatracks(self, value):
|
|
38
|
+
self._datatracks = self.checkAndConvertNullable(
|
|
39
|
+
value, TrackXYData, "datatracks"
|
|
40
|
+
)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.Track import Track
|
|
4
|
+
from LOGS.Entities.TrackXYComplexData import TrackXYComplexData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackXYComplex(Track):
|
|
8
|
+
_datatracks: Optional[TrackXYComplexData] = None
|
|
9
|
+
|
|
10
|
+
def _fetchData(self):
|
|
11
|
+
if self.datatracks:
|
|
12
|
+
if self.datatracks.x:
|
|
13
|
+
self.datatracks.x.fetchFull()
|
|
14
|
+
if self.datatracks.re:
|
|
15
|
+
self.datatracks.re.fetchFull()
|
|
16
|
+
if self.datatracks.im:
|
|
17
|
+
self.datatracks.im.fetchFull()
|
|
18
|
+
|
|
19
|
+
def __iter__(self):
|
|
20
|
+
if (
|
|
21
|
+
self.datatracks is not None
|
|
22
|
+
and self.datatracks.x is not None
|
|
23
|
+
and self.datatracks.x.count is not None
|
|
24
|
+
and self.datatracks.x.data is not None
|
|
25
|
+
and self.datatracks.re is not None
|
|
26
|
+
and self.datatracks.re.count is not None
|
|
27
|
+
and self.datatracks.re.data is not None
|
|
28
|
+
and self.datatracks.im is not None
|
|
29
|
+
and self.datatracks.im.count is not None
|
|
30
|
+
and self.datatracks.im.data is not None
|
|
31
|
+
):
|
|
32
|
+
for i in range(
|
|
33
|
+
min(
|
|
34
|
+
self.datatracks.x.count,
|
|
35
|
+
self.datatracks.re.count,
|
|
36
|
+
self.datatracks.im.count,
|
|
37
|
+
)
|
|
38
|
+
):
|
|
39
|
+
yield self.datatracks.x.data[i], self.datatracks.re.data[
|
|
40
|
+
i
|
|
41
|
+
], self.datatracks.im.data[i]
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def datatracks(self) -> Optional[TrackXYComplexData]:
|
|
45
|
+
return self._datatracks
|
|
46
|
+
|
|
47
|
+
@datatracks.setter
|
|
48
|
+
def datatracks(self, value):
|
|
49
|
+
self._datatracks = self.checkAndConvertNullable(
|
|
50
|
+
value, TrackXYComplexData, "datatracks"
|
|
51
|
+
)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from numpy import ndarray, vectorize
|
|
4
|
+
|
|
5
|
+
from LOGS.Entities.DatatrackNumericArray import DatatrackNumericArray
|
|
6
|
+
from LOGS.Entities.TrackData import TrackData
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TrackXYComplexData(TrackData):
|
|
10
|
+
_x: Optional[DatatrackNumericArray] = None
|
|
11
|
+
_re: Optional[DatatrackNumericArray] = None
|
|
12
|
+
_im: Optional[DatatrackNumericArray] = None
|
|
13
|
+
|
|
14
|
+
def fetchFull(self):
|
|
15
|
+
if self.x:
|
|
16
|
+
self.x.fetchFull()
|
|
17
|
+
if self.re:
|
|
18
|
+
self.re.fetchFull()
|
|
19
|
+
if self.im:
|
|
20
|
+
self.im.fetchFull()
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def x(self) -> Optional[DatatrackNumericArray]:
|
|
24
|
+
return self._x
|
|
25
|
+
|
|
26
|
+
@x.setter
|
|
27
|
+
def x(self, value):
|
|
28
|
+
self._x = self.checkAndConvertNullable(value, DatatrackNumericArray, "x")
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def re(self) -> Optional[DatatrackNumericArray]:
|
|
32
|
+
return self._re
|
|
33
|
+
|
|
34
|
+
@re.setter
|
|
35
|
+
def re(self, value):
|
|
36
|
+
self._re = self.checkAndConvertNullable(value, DatatrackNumericArray, "re")
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def im(self) -> Optional[DatatrackNumericArray]:
|
|
40
|
+
return self._im
|
|
41
|
+
|
|
42
|
+
@im.setter
|
|
43
|
+
def im(self, value):
|
|
44
|
+
self._im = self.checkAndConvertNullable(value, DatatrackNumericArray, "im")
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def y(self) -> Optional[ndarray]:
|
|
48
|
+
if not self.re or not self.im:
|
|
49
|
+
return None
|
|
50
|
+
return vectorize(complex)(self.re.data, self.im.data)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entities.DatatrackNumericArray import DatatrackNumericArray
|
|
4
|
+
from LOGS.Entities.TrackData import TrackData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TrackXYData(TrackData):
|
|
8
|
+
_x: Optional[DatatrackNumericArray] = None
|
|
9
|
+
_y: Optional[DatatrackNumericArray] = None
|
|
10
|
+
|
|
11
|
+
def fetchFull(self):
|
|
12
|
+
if self.x:
|
|
13
|
+
self.x.fetchFull()
|
|
14
|
+
if self.y:
|
|
15
|
+
self.y.fetchFull()
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def x(self) -> Optional[DatatrackNumericArray]:
|
|
19
|
+
return self._x
|
|
20
|
+
|
|
21
|
+
@x.setter
|
|
22
|
+
def x(self, value):
|
|
23
|
+
self._x = self.checkAndConvertNullable(value, DatatrackNumericArray, "x")
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def y(self) -> Optional[DatatrackNumericArray]:
|
|
27
|
+
return self._y
|
|
28
|
+
|
|
29
|
+
@y.setter
|
|
30
|
+
def y(self, value):
|
|
31
|
+
self._y = self.checkAndConvertNullable(value, DatatrackNumericArray, "y")
|
LOGS/Entities/Vendor.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
|
+
from LOGS.Entity.EntityWithStrId import EntityWithStrId
|
|
5
|
+
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
6
|
+
from LOGS.LOGSConnection import LOGSConnection
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@Endpoint("vendors")
|
|
10
|
+
class Vendor(EntityWithStrId, INamedEntity):
|
|
11
|
+
_description: Optional[str]
|
|
12
|
+
_icon: Optional[str]
|
|
13
|
+
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
ref=None,
|
|
17
|
+
id: Optional[str] = None,
|
|
18
|
+
connection: Optional[LOGSConnection] = None,
|
|
19
|
+
):
|
|
20
|
+
"""Represents a connected LOGS entity type"""
|
|
21
|
+
|
|
22
|
+
self._description = None
|
|
23
|
+
self._icon = None
|
|
24
|
+
super().__init__(ref=ref, id=id, connection=connection)
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def description(self) -> Optional[str]:
|
|
28
|
+
return self._description
|
|
29
|
+
|
|
30
|
+
@description.setter
|
|
31
|
+
def description(self, value):
|
|
32
|
+
self._description = self.checkAndConvertNullable(value, str, "description")
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def icon(self) -> Optional[str]:
|
|
36
|
+
return self._icon
|
|
37
|
+
|
|
38
|
+
@icon.setter
|
|
39
|
+
def icon(self, value):
|
|
40
|
+
self._icon = self.checkAndConvertNullable(value, str, "icon")
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Optional, Type
|
|
3
|
+
|
|
4
|
+
from LOGS.Entity.EntityRequestParameter import (
|
|
5
|
+
DefaultSortingOptions,
|
|
6
|
+
EntityRequestParameter,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass
|
|
11
|
+
class VendorRequestParameter(EntityRequestParameter[DefaultSortingOptions]):
|
|
12
|
+
_orderByType: Type[DefaultSortingOptions] = field(
|
|
13
|
+
default=DefaultSortingOptions, init=False
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
name: Optional[str] = None
|
|
17
|
+
includeIcon: Optional[bool] = None
|
LOGS/Entities/Vendors.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from LOGS.Auxiliary.Decorators import Endpoint
|
|
2
|
+
from LOGS.Entities.Vendor import Vendor
|
|
3
|
+
from LOGS.Entities.VendorRequestParameter import VendorRequestParameter
|
|
4
|
+
from LOGS.Entity.EntityIterator import EntityIterator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Endpoint("vendors")
|
|
8
|
+
class Vendors(EntityIterator[Vendor, VendorRequestParameter]):
|
|
9
|
+
"""LOGS connected class Vendors iterator"""
|
|
10
|
+
|
|
11
|
+
_generatorType = Vendor
|
|
12
|
+
_parameterType = VendorRequestParameter
|