cs-models 0.0.572__py3-none-any.whl → 0.0.574__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 cs-models might be problematic. Click here for more details.
- cs_models/resources/BatchJobStatus/__init__.py +0 -0
- cs_models/resources/BatchJobStatus/models.py +31 -0
- cs_models/resources/BatchJobStatus/schemas.py +18 -0
- cs_models/resources/UserWatchlist/models.py +6 -0
- cs_models/resources/UserWatchlist/schemas.py +1 -0
- {cs_models-0.0.572.dist-info → cs_models-0.0.574.dist-info}/METADATA +1 -1
- {cs_models-0.0.572.dist-info → cs_models-0.0.574.dist-info}/RECORD +9 -6
- {cs_models-0.0.572.dist-info → cs_models-0.0.574.dist-info}/WHEEL +0 -0
- {cs_models-0.0.572.dist-info → cs_models-0.0.574.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
String,
|
|
8
|
+
Text,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
from ...database import Base
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BatchJobStatusModel(Base):
|
|
15
|
+
__tablename__ = "batch_jobs_status"
|
|
16
|
+
|
|
17
|
+
id = Column(Integer, primary_key=True)
|
|
18
|
+
job_id = Column(String(128), nullable=False, index=True)
|
|
19
|
+
job_def = Column(String(128), nullable=False, index=True)
|
|
20
|
+
job_queue = Column(String(125), nullable=False, index=True)
|
|
21
|
+
parameters = Column(Text, nullable=True)
|
|
22
|
+
status = Column(String(50), nullable=False)
|
|
23
|
+
created_at = Column(DateTime, nullable=False)
|
|
24
|
+
updated_at = Column(
|
|
25
|
+
DateTime,
|
|
26
|
+
nullable=False,
|
|
27
|
+
index=True,
|
|
28
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
29
|
+
default=lambda: datetime.utcnow(),
|
|
30
|
+
onupdate=lambda: datetime.utcnow(),
|
|
31
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BatchJobStatusResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
job_id = fields.String(required=True)
|
|
13
|
+
job_def = fields.String(required=True)
|
|
14
|
+
job_queue = fields.String(required=True)
|
|
15
|
+
parameters = fields.String(allow_none=True)
|
|
16
|
+
status = fields.String(required=True)
|
|
17
|
+
created_at = fields.DateTime(required=True)
|
|
18
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
@@ -4,6 +4,7 @@ from sqlalchemy import (
|
|
|
4
4
|
String,
|
|
5
5
|
DateTime,
|
|
6
6
|
Boolean,
|
|
7
|
+
ForeignKey,
|
|
7
8
|
)
|
|
8
9
|
from datetime import datetime
|
|
9
10
|
|
|
@@ -18,6 +19,11 @@ class UserWatchlistModel(Base):
|
|
|
18
19
|
resource_type = Column(String(128), nullable=False, index=True)
|
|
19
20
|
resource_id = Column(String(50), nullable=False, index=True)
|
|
20
21
|
is_active = Column(Boolean, nullable=True)
|
|
22
|
+
saved_search_id = Column(
|
|
23
|
+
Integer,
|
|
24
|
+
ForeignKey('user_saved_searches.id'),
|
|
25
|
+
nullable=False,
|
|
26
|
+
)
|
|
21
27
|
updated_at = Column(
|
|
22
28
|
DateTime,
|
|
23
29
|
nullable=False,
|
|
@@ -13,4 +13,5 @@ class UserWatchlistResourceSchema(Schema):
|
|
|
13
13
|
resource_type = fields.String(required=True)
|
|
14
14
|
resource_id = fields.String(required=True)
|
|
15
15
|
is_active = fields.Boolean(required=True)
|
|
16
|
+
saved_search_id = fields.Integer(required=True)
|
|
16
17
|
updated_at = fields.DateTime(dump_only=True)
|
|
@@ -37,6 +37,9 @@ cs_models/resources/AssistantSession/schemas.py,sha256=Sc5pFt5O3ISQRR-hRYW7LcCqA
|
|
|
37
37
|
cs_models/resources/AssistantUserQuery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
cs_models/resources/AssistantUserQuery/models.py,sha256=fCM9N65laJanb_hVzFgTMzVLV09KuqSQKa27RuHhnMU,1753
|
|
39
39
|
cs_models/resources/AssistantUserQuery/schemas.py,sha256=dGAHxkNxY7v8iD0EtKi_XJrIBF67ie-r7j6wNnAewP0,716
|
|
40
|
+
cs_models/resources/BatchJobStatus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
|
+
cs_models/resources/BatchJobStatus/models.py,sha256=nKXTIzOp_T0vWOgaLBMg-8gCq6MiKSktyfjG9JFxQGg,890
|
|
42
|
+
cs_models/resources/BatchJobStatus/schemas.py,sha256=Wqze3FXBQdHuCjPhHEa9FUGy2doq0ijpKmxuwFD9wpc,540
|
|
40
43
|
cs_models/resources/Biomarker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
44
|
cs_models/resources/Biomarker/models.py,sha256=67yyvRKi6_5pLwSH6IE9ZTemIqmpsCx7IIVDSqMwOvo,810
|
|
42
45
|
cs_models/resources/Biomarker/schemas.py,sha256=saP7FJfKeUPDHEhKeJqLci9gze3WZYXWgP1M-ySMWmE,434
|
|
@@ -805,8 +808,8 @@ cs_models/resources/UserSearchHistoryItem/models.py,sha256=GdNZsTEett2x_gU92iPbR
|
|
|
805
808
|
cs_models/resources/UserSearchHistoryItem/schemas.py,sha256=e68GcY-1KV75VWwWCGryTufWXHL09h7b48UhxieoaUQ,747
|
|
806
809
|
cs_models/resources/UserSearchHistoryItem/test_user_search_history_item.py,sha256=eoiVJpVS-_Fe6k2Bc1oCTc6gRggI1N1kc_trTNQ1w60,2904
|
|
807
810
|
cs_models/resources/UserWatchlist/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
808
|
-
cs_models/resources/UserWatchlist/models.py,sha256=
|
|
809
|
-
cs_models/resources/UserWatchlist/schemas.py,sha256=
|
|
811
|
+
cs_models/resources/UserWatchlist/models.py,sha256=XPWn6KgwcWfAaYuaEkK1sRw304DvKbLXnvn_MjO_Q-Y,908
|
|
812
|
+
cs_models/resources/UserWatchlist/schemas.py,sha256=gM4N7ClcMGvyaSzIg95SSOw1EbFdZ2tUbAke33FwtS8,528
|
|
810
813
|
cs_models/resources/ViewConditionByTA/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
811
814
|
cs_models/resources/ViewConditionByTA/models.py,sha256=CieIW5mvmvok4dbglxd-ijMVI7gx-6C057CViSjuWoQ,764
|
|
812
815
|
cs_models/resources/ViewConditionByTA/schemas.py,sha256=Y0hoMeysHulflnPUchmDP0NDsSTKtIZH-UXRvp2fIRw,441
|
|
@@ -928,7 +931,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
928
931
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
929
932
|
cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
|
|
930
933
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
931
|
-
cs_models-0.0.
|
|
932
|
-
cs_models-0.0.
|
|
933
|
-
cs_models-0.0.
|
|
934
|
-
cs_models-0.0.
|
|
934
|
+
cs_models-0.0.574.dist-info/METADATA,sha256=_7qFwP8lUsWnCjJUpOhQtJ-Un6AyGuZIze2WvLSCi14,791
|
|
935
|
+
cs_models-0.0.574.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
936
|
+
cs_models-0.0.574.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
937
|
+
cs_models-0.0.574.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|