logs-py 1.14__py3-none-any.whl → 2.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.
- LOGS/Auxiliary/Constants.py +2 -2
- LOGS/Auxiliary/DateTimeConverter.py +1 -1
- LOGS/Auxiliary/Exceptions.py +1 -1
- LOGS/Auxiliary/MinimalModelGenerator.py +28 -6
- LOGS/Auxiliary/Tools.py +4 -0
- LOGS/Entities/AutoloadClientInfo.py +6 -8
- LOGS/Entities/AutoloadStatus.py +3 -3
- LOGS/Entities/{AutoloadSource.py → Bridge.py} +11 -10
- LOGS/Entities/BridgeMinimal.py +8 -0
- LOGS/Entities/BridgeRelations.py +23 -0
- LOGS/Entities/BridgeRequestParameter.py +19 -0
- LOGS/Entities/{AutoloadSourceType.py → BridgeType.py} +1 -1
- LOGS/Entities/Bridges.py +12 -0
- LOGS/Entities/{AutoloadConfiguration.py → DataSource.py} +97 -23
- LOGS/Entities/DataSourceMinimal.py +8 -0
- LOGS/Entities/DataSourceRelations.py +23 -0
- LOGS/Entities/DataSourceRequestParameter.py +44 -0
- LOGS/Entities/{AutoloadConfigurationStatus.py → DataSourceStatus.py} +1 -1
- LOGS/Entities/DataSources.py +12 -0
- LOGS/Entities/Dataset.py +83 -71
- LOGS/Entities/DatasetCreator.py +38 -18
- LOGS/Entities/DatasetMatchTypes.py +38 -6
- LOGS/Entities/DatasetRelations.py +13 -2
- LOGS/Entities/DatasetRequestParameter.py +19 -7
- LOGS/Entities/Datasets.py +1 -1
- LOGS/Entities/Document.py +2 -2
- LOGS/Entities/Experiment.py +9 -24
- LOGS/Entities/ExperimentRelations.py +23 -0
- LOGS/Entities/ExperimentRequestParameter.py +27 -2
- LOGS/Entities/Format.py +27 -61
- LOGS/Entities/FormatFormat.py +8 -6
- LOGS/Entities/FormatInstrument.py +2 -2
- LOGS/Entities/FormatMetaData.py +13 -5
- LOGS/Entities/FormatMethod.py +34 -3
- LOGS/Entities/FormatMinimal.py +11 -1
- LOGS/Entities/FormatRequestParameter.py +8 -3
- LOGS/Entities/FormatVendor.py +14 -1
- LOGS/Entities/FormatVendorRequestParameter.py +1 -0
- LOGS/Entities/ICustomSchemaRequest.py +7 -0
- LOGS/Entities/IRelatedEntityRequest.py +9 -0
- LOGS/Entities/Instrument.py +16 -2
- LOGS/Entities/InstrumentRelations.py +23 -0
- LOGS/Entities/InstrumentRequestParameter.py +34 -2
- LOGS/Entities/LabNotebookEntry.py +67 -7
- LOGS/Entities/LabNotebookEntryRelations.py +81 -0
- LOGS/Entities/LabNotebookEntryRequestParameter.py +57 -2
- LOGS/Entities/Method.py +24 -2
- LOGS/Entities/MethodRelations.py +35 -0
- LOGS/Entities/MethodRequestParameter.py +35 -1
- LOGS/Entities/Origin.py +2 -2
- LOGS/Entities/OriginRequestParameter.py +3 -3
- LOGS/Entities/Person.py +34 -3
- LOGS/Entities/PersonRelations.py +36 -3
- LOGS/Entities/PersonRequestParameter.py +50 -10
- LOGS/Entities/Project.py +15 -2
- LOGS/Entities/ProjectRelations.py +11 -0
- LOGS/Entities/ProjectRequestParameter.py +44 -3
- LOGS/Entities/Role.py +45 -16
- LOGS/Entities/RoleRelations.py +23 -0
- LOGS/Entities/RoleRequestParameter.py +28 -1
- LOGS/Entities/Sample.py +26 -32
- LOGS/Entities/SampleRelations.py +4 -2
- LOGS/Entities/SampleRequestParameter.py +5 -10
- LOGS/Entities/__init__.py +8 -7
- LOGS/Entity/Entity.py +30 -6
- LOGS/Entity/EntityRelations.py +3 -2
- LOGS/Entity/EntityRequestParameter.py +10 -5
- LOGS/Entity/EntityWithIntId.py +1 -1
- LOGS/Entity/SerializeableContent.py +10 -4
- LOGS/Interfaces/ICreationRecord.py +12 -3
- LOGS/Interfaces/IModificationRecord.py +10 -1
- LOGS/Interfaces/IProjectBased.py +30 -0
- LOGS/Interfaces/IRelatedEntity.py +34 -0
- LOGS/Interfaces/IRelationModel.py +6 -0
- LOGS/Interfaces/IRelationRequest.py +12 -0
- LOGS/Interfaces/ITypedEntity.py +28 -0
- LOGS/Interfaces/IUniqueEntity.py +2 -3
- LOGS/LOGS.py +128 -40
- LOGS/LOGSConnection.py +2 -1
- {logs_py-1.14.dist-info → logs_py-2.1.dist-info}/METADATA +1 -1
- {logs_py-1.14.dist-info → logs_py-2.1.dist-info}/RECORD +84 -70
- LOGS/Entities/AutoloadConfigurationMinimal.py +0 -8
- LOGS/Entities/AutoloadConfigurationRequestParameter.py +0 -17
- LOGS/Entities/AutoloadConfigurations.py +0 -16
- LOGS/Entities/AutoloadSourceMinimal.py +0 -8
- LOGS/Entities/AutoloadSourceRequestParameter.py +0 -13
- LOGS/Entities/AutoloadSources.py +0 -12
- /LOGS/Interfaces/{ICustomFields.py → ICustomField.py} +0 -0
- {logs_py-1.14.dist-info → logs_py-2.1.dist-info}/WHEEL +0 -0
- {logs_py-1.14.dist-info → logs_py-2.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entity.EntityRelation import EntityRelation
|
|
4
|
+
from LOGS.Entity.EntityRelations import EntityRelations
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from LOGS.Entities.Dataset import Dataset
|
|
8
|
+
from LOGS.Entities.Document import Document
|
|
9
|
+
from LOGS.Entities.LabNotebookEntry import LabNotebookEntry
|
|
10
|
+
from LOGS.Entities.Person import Person
|
|
11
|
+
from LOGS.Entities.Project import Project
|
|
12
|
+
from LOGS.Entities.Sample import Sample
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class LabNotebookEntryRelations(EntityRelations):
|
|
16
|
+
"""Relations of a LabNotebookEntry with other entities"""
|
|
17
|
+
|
|
18
|
+
_datasets: Optional[EntityRelation["Dataset"]] = None
|
|
19
|
+
_labNotebookEntries: Optional[EntityRelation["LabNotebookEntry"]] = None
|
|
20
|
+
_persons: Optional[EntityRelation["Person"]] = None
|
|
21
|
+
_samples: Optional[EntityRelation["Sample"]] = None
|
|
22
|
+
_projects: Optional[EntityRelation["Project"]] = None
|
|
23
|
+
_documents: Optional[EntityRelation["Document"]] = None
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def persons(self) -> Optional[EntityRelation["Person"]]:
|
|
27
|
+
return self._persons
|
|
28
|
+
|
|
29
|
+
@persons.setter
|
|
30
|
+
def persons(self, value):
|
|
31
|
+
from LOGS.Entities.Persons import Persons
|
|
32
|
+
|
|
33
|
+
self._persons = self._entityConverter(value, Persons)
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def documents(self) -> Optional[EntityRelation["Document"]]:
|
|
37
|
+
return self._documents
|
|
38
|
+
|
|
39
|
+
@documents.setter
|
|
40
|
+
def documents(self, value):
|
|
41
|
+
from LOGS.Entities.Documents import Documents
|
|
42
|
+
|
|
43
|
+
self._documents = self._entityConverter(value, Documents)
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def datasets(self) -> Optional[EntityRelation["Dataset"]]:
|
|
47
|
+
return self._datasets
|
|
48
|
+
|
|
49
|
+
@datasets.setter
|
|
50
|
+
def datasets(self, value):
|
|
51
|
+
from LOGS.Entities.Datasets import Datasets
|
|
52
|
+
|
|
53
|
+
self._datasets = self._entityConverter(value, Datasets)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def labNotebookEntries(self) -> Optional[EntityRelation]:
|
|
57
|
+
return self._labNotebookEntries
|
|
58
|
+
|
|
59
|
+
@labNotebookEntries.setter
|
|
60
|
+
def labNotebookEntries(self, value):
|
|
61
|
+
self._labNotebookEntries = self.checkAndConvertNullable(
|
|
62
|
+
value, EntityRelation, "labNotebookEntries"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def samples(self) -> Optional[EntityRelation["Sample"]]:
|
|
67
|
+
return self._samples
|
|
68
|
+
|
|
69
|
+
@samples.setter
|
|
70
|
+
def samples(self, value):
|
|
71
|
+
from LOGS.Entities.Samples import Samples
|
|
72
|
+
|
|
73
|
+
self._samples = self._entityConverter(value, Samples)
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def projects(self) -> Optional[EntityRelation]:
|
|
77
|
+
return self._projects
|
|
78
|
+
|
|
79
|
+
@projects.setter
|
|
80
|
+
def projects(self, value):
|
|
81
|
+
self._projects = self.checkAndConvertNullable(value, EntityRelation, "projects")
|
|
@@ -1,12 +1,67 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from datetime import date, datetime
|
|
3
|
+
from enum import Enum
|
|
2
4
|
from typing import List, Optional
|
|
3
5
|
|
|
6
|
+
from LOGS.Entities.IRelatedEntityRequest import IRelatedEntityRequest
|
|
4
7
|
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
8
|
+
from LOGS.Interfaces.ICreationRecord import ICreationRecordRequest
|
|
9
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
10
|
+
from LOGS.Interfaces.ISoftDeletable import ISoftDeletableRequest
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LabNotebookEntryOrder(Enum):
|
|
14
|
+
ID_ASC = "ID_ASC"
|
|
15
|
+
ID_DESC = "ID_DESC"
|
|
16
|
+
LAB_NOTEBOOK_ID_ASC = "LAB_NOTEBOOK_ID_ASC"
|
|
17
|
+
LAB_NOTEBOOK_ID_DESC = "LAB_NOTEBOOK_ID_DESC"
|
|
18
|
+
LAB_NOTEBOOK_NAME_ASC = "LAB_NOTEBOOK_NAME_ASC"
|
|
19
|
+
LAB_NOTEBOOK_NAME_DESC = "LAB_NOTEBOOK_NAME_DESC"
|
|
20
|
+
LAB_NOTEBOOK_EXPERIMENT_ID_ASC = "LAB_NOTEBOOK_EXPERIMENT_ID_ASC"
|
|
21
|
+
LAB_NOTEBOOK_EXPERIMENT_ID_DESC = "LAB_NOTEBOOK_EXPERIMENT_ID_DESC"
|
|
22
|
+
LAB_NOTEBOOK_EXPERIMENT_NAME_ASC = "LAB_NOTEBOOK_EXPERIMENT_NAME_ASC"
|
|
23
|
+
LAB_NOTEBOOK_EXPERIMENT_NAME_DESC = "LAB_NOTEBOOK_EXPERIMENT_NAME_DESC"
|
|
24
|
+
ENTRY_DATE_ASC = "ENTRY_DATE_ASC"
|
|
25
|
+
ENTRY_DATE_DESC = "ENTRY_DATE_DESC"
|
|
26
|
+
CREATED_ON_ASC = "CREATED_ON_ASC"
|
|
27
|
+
CREATED_ON_DESC = "CREATED_ON_DESC"
|
|
28
|
+
CREATED_BY_ASC = "CREATED_BY_ASC"
|
|
29
|
+
CREATED_BY_DESC = "CREATED_BY_DESC"
|
|
30
|
+
MODIFIED_ON_ASC = "MODIFIED_ON_ASC"
|
|
31
|
+
MODIFIED_ON_DESC = "MODIFIED_ON_DESC"
|
|
32
|
+
MODIFIED_BY_ASC = "MODIFIED_BY_ASC"
|
|
33
|
+
MODIFIED_BY_DESC = "MODIFIED_BY_DESC"
|
|
34
|
+
VERSION_ASC = "VERSION_ASC"
|
|
35
|
+
VERSION_DESC = "VERSION_DESC"
|
|
5
36
|
|
|
6
37
|
|
|
7
38
|
@dataclass
|
|
8
|
-
class LabNotebookEntryRequestParameter(
|
|
9
|
-
|
|
39
|
+
class LabNotebookEntryRequestParameter(
|
|
40
|
+
EntityRequestParameter[LabNotebookEntryOrder],
|
|
41
|
+
IRelatedEntityRequest,
|
|
42
|
+
ISoftDeletableRequest,
|
|
43
|
+
ICreationRecordRequest,
|
|
44
|
+
IModificationRecordRequest,
|
|
45
|
+
):
|
|
46
|
+
includeContent: Optional[bool] = None
|
|
47
|
+
|
|
48
|
+
labNotebookExperimentIds: Optional[List[int]] = None
|
|
10
49
|
datasetIds: Optional[List[int]] = None
|
|
50
|
+
mediaIds: Optional[List[int]] = None
|
|
11
51
|
personIds: Optional[List[int]] = None
|
|
12
52
|
sampleIds: Optional[List[int]] = None
|
|
53
|
+
projectIds: Optional[List[int]] = None
|
|
54
|
+
labNotebookIds: Optional[List[int]] = None
|
|
55
|
+
entryDateFrom: Optional[date] = None
|
|
56
|
+
entryDateTo: Optional[date] = None
|
|
57
|
+
createdFrom: Optional[datetime] = None
|
|
58
|
+
createdTo: Optional[datetime] = None
|
|
59
|
+
createdByIds: Optional[List[int]] = None
|
|
60
|
+
modifiedFrom: Optional[datetime] = None
|
|
61
|
+
modifiedTo: Optional[datetime] = None
|
|
62
|
+
modifiedByIds: Optional[List[int]] = None
|
|
63
|
+
orderBy: Optional[LabNotebookEntryOrder] = None
|
|
64
|
+
originalIds: Optional[List[int]] = None
|
|
65
|
+
versionIds: Optional[List[int]] = None
|
|
66
|
+
versions: Optional[List[int]] = None
|
|
67
|
+
searchTermFullText: Optional[str] = None
|
LOGS/Entities/Method.py
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
3
|
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
|
-
from LOGS.
|
|
4
|
+
from LOGS.Entities.MethodRelations import MethodRelations
|
|
5
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
6
|
+
from LOGS.Interfaces.ICreationRecord import ICreationRecord
|
|
7
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
5
8
|
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
9
|
+
from LOGS.Interfaces.IRelatedEntity import IRelatedEntity
|
|
6
10
|
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
@Endpoint("methods")
|
|
10
|
-
class Method(
|
|
14
|
+
class Method(
|
|
15
|
+
IEntityWithIntId,
|
|
16
|
+
INamedEntity,
|
|
17
|
+
IUniqueEntity,
|
|
18
|
+
ICreationRecord,
|
|
19
|
+
IModificationRecord,
|
|
20
|
+
IRelatedEntity[MethodRelations],
|
|
21
|
+
):
|
|
22
|
+
_relationType = type(MethodRelations)
|
|
23
|
+
|
|
11
24
|
_fullName: Optional[str] = None
|
|
25
|
+
_description: Optional[str] = None
|
|
12
26
|
|
|
13
27
|
@property
|
|
14
28
|
def fullName(self) -> Optional[str]:
|
|
@@ -17,3 +31,11 @@ class Method(INamedEntity, EntityWithIntId, IUniqueEntity):
|
|
|
17
31
|
@fullName.setter
|
|
18
32
|
def fullName(self, value):
|
|
19
33
|
self._fullName = self.checkAndConvertNullable(value, str, "fullName")
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def description(self) -> Optional[str]:
|
|
37
|
+
return self._description
|
|
38
|
+
|
|
39
|
+
@description.setter
|
|
40
|
+
def description(self, value):
|
|
41
|
+
self._description = self.checkAndConvertNullable(value, str, "description")
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Optional
|
|
2
|
+
|
|
3
|
+
from LOGS.Entity.EntityRelation import EntityRelation
|
|
4
|
+
from LOGS.Entity.EntityRelations import EntityRelations
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from LOGS.Entities.Dataset import Dataset
|
|
8
|
+
from LOGS.Entities.Experiment import Experiment
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MethodRelations(EntityRelations):
|
|
12
|
+
"""Relations of a Method with other entities"""
|
|
13
|
+
|
|
14
|
+
_datasets: Optional[EntityRelation["Dataset"]] = None
|
|
15
|
+
_experiments: Optional[EntityRelation["Experiment"]] = None
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def datasets(self) -> Optional[EntityRelation["Dataset"]]:
|
|
19
|
+
return self._datasets
|
|
20
|
+
|
|
21
|
+
@datasets.setter
|
|
22
|
+
def datasets(self, value):
|
|
23
|
+
from LOGS.Entities.Datasets import Datasets
|
|
24
|
+
|
|
25
|
+
self._datasets = self._entityConverter(value, Datasets)
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def experiments(self) -> Optional[EntityRelation["Experiment"]]:
|
|
29
|
+
return self._experiments
|
|
30
|
+
|
|
31
|
+
@experiments.setter
|
|
32
|
+
def experiments(self, value):
|
|
33
|
+
from LOGS.Entities.Experiments import Experiments
|
|
34
|
+
|
|
35
|
+
self._experiments = self._entityConverter(value, Experiments)
|
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from enum import Enum
|
|
2
3
|
|
|
3
4
|
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
5
|
+
from LOGS.Interfaces.ICreationRecord import ICreatedByRequest
|
|
6
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
7
|
+
from LOGS.Interfaces.IPaginationRequest import IPaginationRequest
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MethodOrder(Enum):
|
|
11
|
+
ID_ASC = "ID_ASC"
|
|
12
|
+
ID_DESC = "ID_DESC"
|
|
13
|
+
NAME_ASC = "NAME_ASC"
|
|
14
|
+
NAME_DESC = "NAME_DESC"
|
|
15
|
+
FULL_NAME_ASC = "FULL_NAME_ASC"
|
|
16
|
+
FULL_NAME_DESC = "FULL_NAME_DESC"
|
|
17
|
+
CREATED_ON_ASC = "CREATED_ON_ASC"
|
|
18
|
+
CREATED_ON_DESC = "CREATED_ON_DESC"
|
|
19
|
+
CREATED_BY_ASC = "CREATED_BY_ASC"
|
|
20
|
+
CREATED_BY_DESC = "CREATED_BY_DESC"
|
|
21
|
+
MODIFIED_ON_ASC = "MODIFIED_ON_ASC"
|
|
22
|
+
MODIFIED_ON_DESC = "MODIFIED_ON_DESC"
|
|
23
|
+
MODIFIED_BY_ASC = "MODIFIED_BY_ASC"
|
|
24
|
+
MODIFIED_BY_DESC = "MODIFIED_BY_DESC"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# : GenericListRequestParameters<int, MethodSortingOptions>,
|
|
28
|
+
# IRelationParameters,
|
|
29
|
+
# IPaginationParameters,
|
|
30
|
+
# IPermissionParameters,
|
|
31
|
+
# ICreationRecordParameters,
|
|
32
|
+
# IModificationRecordParameters
|
|
4
33
|
|
|
5
34
|
|
|
6
35
|
@dataclass
|
|
7
|
-
class MethodRequestParameter(
|
|
36
|
+
class MethodRequestParameter(
|
|
37
|
+
EntityRequestParameter[MethodOrder],
|
|
38
|
+
IPaginationRequest,
|
|
39
|
+
ICreatedByRequest,
|
|
40
|
+
IModificationRecord,
|
|
41
|
+
):
|
|
8
42
|
pass
|
LOGS/Entities/Origin.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Optional
|
|
|
2
2
|
from uuid import UUID
|
|
3
3
|
|
|
4
4
|
from LOGS.Auxiliary.Decorators import Endpoint
|
|
5
|
-
from LOGS.Entity.EntityWithIntId import
|
|
5
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
6
6
|
from LOGS.Interfaces.ICreationRecord import ICreationRecord
|
|
7
7
|
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
8
8
|
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
@@ -10,7 +10,7 @@ from LOGS.LOGSConnection import LOGSConnection
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@Endpoint("origins")
|
|
13
|
-
class Origin(INamedEntity,
|
|
13
|
+
class Origin(IEntityWithIntId, INamedEntity, IModificationRecord, ICreationRecord):
|
|
14
14
|
_url: Optional[str]
|
|
15
15
|
_uid: Optional[UUID]
|
|
16
16
|
|
|
@@ -2,11 +2,11 @@ from dataclasses import dataclass
|
|
|
2
2
|
from typing import List, Optional, Sequence, Union
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
|
|
5
|
-
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
5
|
+
from LOGS.Entity.EntityRequestParameter import DefaultOrder, EntityRequestParameter
|
|
6
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
@dataclass
|
|
9
|
-
class OriginRequestParameter(EntityRequestParameter):
|
|
10
|
-
names: Optional[List[str]] = None
|
|
10
|
+
class OriginRequestParameter(EntityRequestParameter[DefaultOrder], INamedEntityRequest):
|
|
11
11
|
urls: Optional[List[str]] = None
|
|
12
12
|
uids: Optional[Sequence[Union[UUID, str]]] = None
|
LOGS/Entities/Person.py
CHANGED
|
@@ -1,20 +1,40 @@
|
|
|
1
|
+
from enum import Enum
|
|
1
2
|
from typing import List, Optional
|
|
2
3
|
|
|
3
4
|
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
5
|
from LOGS.Entities.PersonCategory import PersonCategory
|
|
5
6
|
from LOGS.Entities.PersonRelations import PersonRelations
|
|
6
7
|
from LOGS.Entities.Role import Role
|
|
7
|
-
from LOGS.Entity.EntityWithIntId import
|
|
8
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
9
|
+
from LOGS.Interfaces.ICreationRecord import ICreationRecord
|
|
10
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
8
11
|
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
12
|
+
from LOGS.Interfaces.IRelatedEntity import IRelatedEntity
|
|
13
|
+
from LOGS.Interfaces.ISoftDeletable import ISoftDeletable
|
|
9
14
|
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
10
15
|
from LOGS.LOGSConnection import LOGSConnection
|
|
11
16
|
|
|
12
17
|
|
|
18
|
+
class PersonAccountState(Enum):
|
|
19
|
+
NoAccount = "NoAccount"
|
|
20
|
+
Enabled = "Enabled"
|
|
21
|
+
Disabled = "Disabled"
|
|
22
|
+
|
|
23
|
+
|
|
13
24
|
@Endpoint("persons")
|
|
14
|
-
class Person(
|
|
25
|
+
class Person(
|
|
26
|
+
IEntityWithIntId,
|
|
27
|
+
IRelatedEntity[PersonRelations],
|
|
28
|
+
INamedEntity,
|
|
29
|
+
IUniqueEntity,
|
|
30
|
+
ISoftDeletable,
|
|
31
|
+
ICreationRecord,
|
|
32
|
+
IModificationRecord,
|
|
33
|
+
):
|
|
15
34
|
_firstName: Optional[str]
|
|
16
35
|
_lastName: Optional[str]
|
|
17
36
|
_login: Optional[str]
|
|
37
|
+
_accountState: Optional[PersonAccountState]
|
|
18
38
|
_salutation: Optional[str]
|
|
19
39
|
_notes: Optional[str]
|
|
20
40
|
_officePhone: Optional[str]
|
|
@@ -36,7 +56,8 @@ class Person(INamedEntity, EntityWithIntId, IUniqueEntity):
|
|
|
36
56
|
self._firstName = None
|
|
37
57
|
self._lastName = None
|
|
38
58
|
self._login = None
|
|
39
|
-
self.
|
|
59
|
+
self._accountState = None
|
|
60
|
+
self._salutation = None
|
|
40
61
|
self._notes = None
|
|
41
62
|
self._officePhone = None
|
|
42
63
|
self._email = None
|
|
@@ -58,6 +79,16 @@ class Person(INamedEntity, EntityWithIntId, IUniqueEntity):
|
|
|
58
79
|
def login(self, value):
|
|
59
80
|
self._login = self.checkAndConvertNullable(value, str, "login")
|
|
60
81
|
|
|
82
|
+
@property
|
|
83
|
+
def accountState(self) -> Optional[PersonAccountState]:
|
|
84
|
+
return self._accountState
|
|
85
|
+
|
|
86
|
+
@accountState.setter
|
|
87
|
+
def accountState(self, value):
|
|
88
|
+
self._accountState = self.checkAndConvertNullable(
|
|
89
|
+
value, PersonAccountState, "accountState"
|
|
90
|
+
)
|
|
91
|
+
|
|
61
92
|
@property
|
|
62
93
|
def firstName(self) -> Optional[str]:
|
|
63
94
|
return self._firstName
|
LOGS/Entities/PersonRelations.py
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING, Optional
|
|
2
2
|
|
|
3
|
-
from LOGS.Entities.Datasets import Datasets
|
|
4
|
-
from LOGS.Entities.Documents import Documents
|
|
5
3
|
from LOGS.Entity.EntityRelation import EntityRelation
|
|
6
4
|
from LOGS.Entity.EntityRelations import EntityRelations
|
|
7
5
|
|
|
8
6
|
if TYPE_CHECKING:
|
|
9
7
|
from LOGS.Entities.Dataset import Dataset
|
|
10
8
|
from LOGS.Entities.Document import Document
|
|
9
|
+
from LOGS.Entities.LabNotebookEntry import LabNotebookEntry
|
|
11
10
|
from LOGS.Entities.Sample import Sample
|
|
12
11
|
|
|
12
|
+
# public EntityRelation Documents { get; set; }
|
|
13
|
+
# public EntityRelation LabNotebooks { get; set; }
|
|
14
|
+
# public EntityRelation LabNotebookExperiments { get; set; }
|
|
15
|
+
# public EntityRelation LabNotebooksEntries { get; set; }
|
|
16
|
+
# public EntityRelation LabNotebooksEntryMentions { get; set; }
|
|
17
|
+
|
|
13
18
|
|
|
14
19
|
class PersonRelations(EntityRelations):
|
|
15
20
|
"""Relations of a Person with other entities"""
|
|
16
21
|
|
|
17
|
-
_documents: Optional[EntityRelation["Document"]] = None
|
|
18
22
|
_datasets: Optional[EntityRelation["Dataset"]] = None
|
|
19
23
|
_samples: Optional[EntityRelation["Sample"]] = None
|
|
24
|
+
_documents: Optional[EntityRelation["Document"]] = None
|
|
25
|
+
_labNotebooksEntries: Optional[EntityRelation["LabNotebookEntry"]] = None
|
|
26
|
+
_labNotebooksEntryMentions: Optional[EntityRelation["LabNotebookEntry"]] = None
|
|
20
27
|
|
|
21
28
|
@property
|
|
22
29
|
def documents(self) -> Optional[EntityRelation["Document"]]:
|
|
@@ -24,6 +31,8 @@ class PersonRelations(EntityRelations):
|
|
|
24
31
|
|
|
25
32
|
@documents.setter
|
|
26
33
|
def documents(self, value):
|
|
34
|
+
from LOGS.Entities.Documents import Documents
|
|
35
|
+
|
|
27
36
|
self._documents = self._entityConverter(value, Documents)
|
|
28
37
|
|
|
29
38
|
@property
|
|
@@ -42,4 +51,28 @@ class PersonRelations(EntityRelations):
|
|
|
42
51
|
|
|
43
52
|
@datasets.setter
|
|
44
53
|
def datasets(self, value):
|
|
54
|
+
from LOGS.Entities.Datasets import Datasets
|
|
55
|
+
|
|
45
56
|
self._datasets = self._entityConverter(value, Datasets)
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def labNotebooksEntries(self) -> Optional[EntityRelation["LabNotebookEntry"]]:
|
|
60
|
+
return self._labNotebooksEntries
|
|
61
|
+
|
|
62
|
+
@labNotebooksEntries.setter
|
|
63
|
+
def labNotebooksEntries(self, value):
|
|
64
|
+
from LOGS.Entities import LabNotebookEntries
|
|
65
|
+
|
|
66
|
+
self._labNotebooksEntries = self._entityConverter(value, LabNotebookEntries)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def labNotebooksEntryMentions(self) -> Optional[EntityRelation["LabNotebookEntry"]]:
|
|
70
|
+
return self._labNotebooksEntryMentions
|
|
71
|
+
|
|
72
|
+
@labNotebooksEntryMentions.setter
|
|
73
|
+
def labNotebooksEntryMentions(self, value):
|
|
74
|
+
from LOGS.Entities import LabNotebookEntries
|
|
75
|
+
|
|
76
|
+
self._labNotebooksEntryMentions = self._entityConverter(
|
|
77
|
+
value, LabNotebookEntries
|
|
78
|
+
)
|
|
@@ -1,19 +1,59 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from enum import Enum
|
|
2
3
|
from typing import List, Optional
|
|
3
4
|
|
|
5
|
+
from LOGS.Entities.IRelatedEntityRequest import IRelatedEntityRequest
|
|
4
6
|
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
7
|
+
from LOGS.Interfaces.ICreationRecord import ICreationRecordRequest
|
|
8
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
9
|
+
from LOGS.Interfaces.ISoftDeletable import ISoftDeletableRequest
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PersonOrder(Enum):
|
|
13
|
+
ID_ASC = "ID_ASC"
|
|
14
|
+
ID_DESC = "ID_DESC"
|
|
15
|
+
NAME_ASC = "NAME_ASC"
|
|
16
|
+
NAME_DESC = "NAME_DESC"
|
|
17
|
+
SALUTATION_ASC = "SALUTATION_ASC"
|
|
18
|
+
SALUTATION_DESC = "SALUTATION_DESC"
|
|
19
|
+
LAST_NAME_ASC = "LAST_NAME_ASC"
|
|
20
|
+
LAST_NAME_DESC = "LAST_NAME_DESC"
|
|
21
|
+
FIRST_NAME_ASC = "FIRST_NAME_ASC"
|
|
22
|
+
FIRST_NAME_DESC = "FIRST_NAME_DESC"
|
|
23
|
+
ORGANIZATION_ASC = "ORGANIZATION_ASC"
|
|
24
|
+
ORGANIZATION_DESC = "ORGANIZATION_DESC"
|
|
25
|
+
LOGIN_DISABLED_ASC = "LOGIN_DISABLED_ASC"
|
|
26
|
+
LOGIN_DISABLED_DESC = "LOGIN_DISABLED_DESC"
|
|
27
|
+
LOGIN_ASC = "LOGIN_ASC"
|
|
28
|
+
LOGIN_DESC = "LOGIN_DESC"
|
|
29
|
+
IS_SYSTEM_USER_ASC = "IS_SYSTEM_USER_ASC"
|
|
30
|
+
IS_SYSTEM_USER_DESC = "IS_SYSTEM_USER_DESC"
|
|
31
|
+
CREATED_ON_ASC = "CREATED_ON_ASC"
|
|
32
|
+
CREATED_ON_DESC = "CREATED_ON_DESC"
|
|
33
|
+
CREATED_BY_ASC = "CREATED_BY_ASC"
|
|
34
|
+
CREATED_BY_DESC = "CREATED_BY_DESC"
|
|
35
|
+
MODIFIED_ON_ASC = "MODIFIED_ON_ASC"
|
|
36
|
+
MODIFIED_ON_DESC = "MODIFIED_ON_DESC"
|
|
37
|
+
MODIFIED_BY_ASC = "MODIFIED_BY_ASC"
|
|
38
|
+
MODIFIED_BY_DESC = "MODIFIED_BY_DESC"
|
|
5
39
|
|
|
6
40
|
|
|
7
41
|
@dataclass
|
|
8
|
-
class PersonRequestParameter(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
sampleIds: Optional[List[int]] = None
|
|
42
|
+
class PersonRequestParameter(
|
|
43
|
+
EntityRequestParameter[PersonOrder],
|
|
44
|
+
IRelatedEntityRequest,
|
|
45
|
+
ISoftDeletableRequest,
|
|
46
|
+
ICreationRecordRequest,
|
|
47
|
+
IModificationRecordRequest,
|
|
48
|
+
):
|
|
49
|
+
personTagIds: Optional[List[int]] = None
|
|
50
|
+
personTags: Optional[List[str]] = None
|
|
18
51
|
organizationIds: Optional[List[int]] = None
|
|
52
|
+
roleIds: Optional[List[int]] = None
|
|
53
|
+
documentIds: Optional[List[int]] = None
|
|
54
|
+
hasAccount: Optional[bool] = None
|
|
55
|
+
isAccountEnabled: Optional[bool] = None
|
|
56
|
+
logins: Optional[List[str]] = None
|
|
19
57
|
emails: Optional[List[str]] = None
|
|
58
|
+
firstNames: Optional[List[str]] = None
|
|
59
|
+
lastNames: Optional[List[str]] = None
|
LOGS/Entities/Project.py
CHANGED
|
@@ -3,15 +3,28 @@ from typing import List, Optional
|
|
|
3
3
|
from LOGS.Auxiliary.Decorators import Endpoint
|
|
4
4
|
from LOGS.Entities.ProjectRelations import ProjectRelations
|
|
5
5
|
from LOGS.Entities.ProjectUserPermission import ProjectUserPermission
|
|
6
|
-
from LOGS.Entity.EntityWithIntId import
|
|
6
|
+
from LOGS.Entity.EntityWithIntId import IEntityWithIntId
|
|
7
|
+
from LOGS.Interfaces.ICreationRecord import ICreationRecord
|
|
8
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecord
|
|
7
9
|
from LOGS.Interfaces.INamedEntity import INamedEntity
|
|
8
10
|
from LOGS.Interfaces.IOwnedEntity import IOwnedEntity
|
|
11
|
+
from LOGS.Interfaces.IRelatedEntity import IRelatedEntity
|
|
9
12
|
from LOGS.Interfaces.IUniqueEntity import IUniqueEntity
|
|
10
13
|
from LOGS.LOGSConnection import LOGSConnection
|
|
11
14
|
|
|
12
15
|
|
|
13
16
|
@Endpoint("projects")
|
|
14
|
-
class Project(
|
|
17
|
+
class Project(
|
|
18
|
+
IEntityWithIntId,
|
|
19
|
+
INamedEntity,
|
|
20
|
+
IRelatedEntity[ProjectRelations],
|
|
21
|
+
IUniqueEntity,
|
|
22
|
+
ICreationRecord,
|
|
23
|
+
IModificationRecord,
|
|
24
|
+
IOwnedEntity,
|
|
25
|
+
):
|
|
26
|
+
_relationType = type(ProjectRelations)
|
|
27
|
+
|
|
15
28
|
_notes: Optional[str]
|
|
16
29
|
_tags: Optional[List[str]]
|
|
17
30
|
_relations: Optional[ProjectRelations]
|
|
@@ -17,6 +17,7 @@ class ProjectRelations(EntityRelations):
|
|
|
17
17
|
_datasets: Optional[EntityRelation[Dataset]] = None
|
|
18
18
|
_samples: Optional[EntityRelation[Sample]] = None
|
|
19
19
|
_labNotebookEntries: Optional[EntityRelation] = None
|
|
20
|
+
_labNotebooksEntryMentions: Optional[EntityRelation] = None
|
|
20
21
|
|
|
21
22
|
@property
|
|
22
23
|
def documents(self) -> Optional[EntityRelation[Document]]:
|
|
@@ -51,3 +52,13 @@ class ProjectRelations(EntityRelations):
|
|
|
51
52
|
self._labNotebookEntries = self.checkAndConvertNullable(
|
|
52
53
|
value, EntityRelation, "labNotebookEntries"
|
|
53
54
|
)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def labNotebooksEntryMentions(self) -> Optional[EntityRelation]:
|
|
58
|
+
return self._labNotebooksEntryMentions
|
|
59
|
+
|
|
60
|
+
@labNotebooksEntryMentions.setter
|
|
61
|
+
def labNotebooksEntryMentions(self, value):
|
|
62
|
+
self._labNotebooksEntryMentions = self.checkAndConvertNullable(
|
|
63
|
+
value, EntityRelation, "labNotebooksEntryMentions"
|
|
64
|
+
)
|
|
@@ -1,12 +1,53 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from enum import Enum
|
|
2
3
|
from typing import List, Optional
|
|
3
4
|
|
|
5
|
+
from LOGS.Entities.IRelatedEntityRequest import IRelatedEntityRequest
|
|
4
6
|
from LOGS.Entity.EntityRequestParameter import EntityRequestParameter
|
|
7
|
+
from LOGS.Interfaces.ICreationRecord import ICreationRecordRequest
|
|
8
|
+
from LOGS.Interfaces.IModificationRecord import IModificationRecordRequest
|
|
9
|
+
from LOGS.Interfaces.INamedEntity import INamedEntityRequest
|
|
5
10
|
from LOGS.Interfaces.IOwnedEntity import IOwnedEntityRequest
|
|
6
11
|
|
|
7
12
|
|
|
13
|
+
class ProjectOrder(Enum):
|
|
14
|
+
ID_ASC = "ID_ASC"
|
|
15
|
+
ID_DESC = "ID_DESC"
|
|
16
|
+
NAME_ASC = "NAME_ASC"
|
|
17
|
+
NAME_DESC = "NAME_DESC"
|
|
18
|
+
DATASET_COUNT_ASC = "DATASET_COUNT_ASC"
|
|
19
|
+
DATASET_COUNT_DESC = "DATASET_COUNT_DESC"
|
|
20
|
+
SAMPLE_COUNT_ASC = "SAMPLE_COUNT_ASC"
|
|
21
|
+
SAMPLE_COUNT_DESC = "SAMPLE_COUNT_DESC"
|
|
22
|
+
DOCUMENT_COUNT_ASC = "DOCUMENT_COUNT_ASC"
|
|
23
|
+
DOCUMENT_COUNT_DESC = "DOCUMENT_COUNT_DESC"
|
|
24
|
+
LAB_NOTEBOOK_COUNT_ASC = "LAB_NOTEBOOK_COUNT_ASC"
|
|
25
|
+
LAB_NOTEBOOK_COUNT_DESC = "LAB_NOTEBOOK_COUNT_DESC"
|
|
26
|
+
CREATED_ON_ASC = "CREATED_ON_ASC"
|
|
27
|
+
CREATED_ON_DESC = "CREATED_ON_DESC"
|
|
28
|
+
CREATED_BY_ASC = "CREATED_BY_ASC"
|
|
29
|
+
CREATED_BY_DESC = "CREATED_BY_DESC"
|
|
30
|
+
MODIFIED_ON_ASC = "MODIFIED_ON_ASC"
|
|
31
|
+
MODIFIED_ON_DESC = "MODIFIED_ON_DESC"
|
|
32
|
+
MODIFIED_BY_ASC = "MODIFIED_BY_ASC"
|
|
33
|
+
MODIFIED_BY_DESC = "MODIFIED_BY_DESC"
|
|
34
|
+
|
|
35
|
+
|
|
8
36
|
@dataclass
|
|
9
|
-
class ProjectRequestParameter(
|
|
10
|
-
|
|
37
|
+
class ProjectRequestParameter(
|
|
38
|
+
EntityRequestParameter[ProjectOrder],
|
|
39
|
+
IRelatedEntityRequest,
|
|
40
|
+
IOwnedEntityRequest,
|
|
41
|
+
ICreationRecordRequest,
|
|
42
|
+
IModificationRecordRequest,
|
|
43
|
+
INamedEntityRequest,
|
|
44
|
+
):
|
|
45
|
+
typeIds: Optional[List[str]] = None
|
|
11
46
|
notes: Optional[str] = None
|
|
12
|
-
|
|
47
|
+
projectTagIds: Optional[List[int]] = None
|
|
48
|
+
projectTags: Optional[List[str]] = None
|
|
49
|
+
personIds: Optional[List[int]] = None
|
|
50
|
+
datasetIds: Optional[List[int]] = None
|
|
51
|
+
mediaIds: Optional[List[int]] = None
|
|
52
|
+
sampleIds: Optional[List[int]] = None
|
|
53
|
+
documentIds: Optional[List[int]] = None
|