cs-models 0.0.655__py3-none-any.whl → 0.0.657__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/EventLLM/__init__.py +0 -0
- cs_models/resources/EventLLM/models.py +51 -0
- cs_models/resources/EventLLM/schemas.py +41 -0
- cs_models/resources/UserDocumentMeeting/__init__.py +0 -0
- cs_models/resources/UserDocumentMeeting/models.py +33 -0
- cs_models/resources/UserDocumentMeeting/schemas.py +14 -0
- cs_models/resources/UserInternalDocWorkflow/__init__.py +0 -0
- cs_models/resources/UserInternalDocWorkflow/models.py +28 -0
- cs_models/resources/UserInternalDocWorkflow/schemas.py +11 -0
- {cs_models-0.0.655.dist-info → cs_models-0.0.657.dist-info}/METADATA +1 -1
- {cs_models-0.0.655.dist-info → cs_models-0.0.657.dist-info}/RECORD +13 -4
- {cs_models-0.0.655.dist-info → cs_models-0.0.657.dist-info}/WHEEL +0 -0
- {cs_models-0.0.655.dist-info → cs_models-0.0.657.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
String,
|
|
7
|
+
ForeignKey,
|
|
8
|
+
DateTime,
|
|
9
|
+
Text,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ...database import Base
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class EventLLMModel(Base):
|
|
16
|
+
__tablename__ = "events_llm"
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
date = Column(DateTime, nullable=False)
|
|
20
|
+
end_date = Column(DateTime, nullable=False)
|
|
21
|
+
event_type = Column(String(128), nullable=False)
|
|
22
|
+
description = Column(Text, nullable=False)
|
|
23
|
+
products = Column(Text, nullable=True)
|
|
24
|
+
company_sec_id = Column(
|
|
25
|
+
Integer,
|
|
26
|
+
ForeignKey('companies_sec.id'),
|
|
27
|
+
nullable=True,
|
|
28
|
+
)
|
|
29
|
+
company_ous_id = Column(
|
|
30
|
+
Integer,
|
|
31
|
+
ForeignKey('companies_ous.id'),
|
|
32
|
+
nullable=True,
|
|
33
|
+
)
|
|
34
|
+
news_id = Column(
|
|
35
|
+
Integer,
|
|
36
|
+
ForeignKey('newswires.id'),
|
|
37
|
+
nullable=True,
|
|
38
|
+
)
|
|
39
|
+
sec_filing_id = Column(
|
|
40
|
+
Integer,
|
|
41
|
+
ForeignKey('companies_sec_filings.id'),
|
|
42
|
+
nullable=True,
|
|
43
|
+
)
|
|
44
|
+
llm_response = Column(Text, nullable=True)
|
|
45
|
+
updated_at = Column(
|
|
46
|
+
DateTime,
|
|
47
|
+
nullable=False,
|
|
48
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
49
|
+
default=lambda: datetime.utcnow(),
|
|
50
|
+
onupdate=lambda: datetime.utcnow(),
|
|
51
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
pre_load,
|
|
6
|
+
ValidationError,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EventLLMResourceSchema(Schema):
|
|
11
|
+
not_blank = validate.Length(min=1, error="Field cannot be blank")
|
|
12
|
+
|
|
13
|
+
id = fields.Integer(dump_only=True)
|
|
14
|
+
date = fields.DateTime(required=True)
|
|
15
|
+
end_date = fields.DateTime(required=True)
|
|
16
|
+
event_type = fields.String(required=True)
|
|
17
|
+
description = fields.String(required=True)
|
|
18
|
+
products = fields.String(allow_none=True)
|
|
19
|
+
company_sec_id = fields.Integer(allow_none=True)
|
|
20
|
+
company_ous_id = fields.Integer(allow_none=True)
|
|
21
|
+
news_id = fields.Integer(allow_none=True)
|
|
22
|
+
sec_filing_id = fields.Integer(allow_none=True)
|
|
23
|
+
llm_response = fields.String(allow_none=True)
|
|
24
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
25
|
+
|
|
26
|
+
@pre_load
|
|
27
|
+
def check_company_info(self, in_data, **kwargs):
|
|
28
|
+
if self._get_number_of_company_fields(in_data) > 1:
|
|
29
|
+
raise ValidationError('Provide either company_sec_id or '
|
|
30
|
+
'company_ous_id, not both')
|
|
31
|
+
return in_data
|
|
32
|
+
|
|
33
|
+
def _get_number_of_company_fields(self, in_data, **kwargs):
|
|
34
|
+
result = 0
|
|
35
|
+
if 'company_sec_id' in in_data:
|
|
36
|
+
if in_data['company_sec_id'] is not None:
|
|
37
|
+
result += 1
|
|
38
|
+
if 'company_ous_id' in in_data:
|
|
39
|
+
if in_data['company_ous_id'] is not None:
|
|
40
|
+
result += 1
|
|
41
|
+
return result
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
ForeignKey,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from ...database import Base
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class UserDocumentMeetingModel(Base):
|
|
14
|
+
__tablename__ = "user_document_meetings"
|
|
15
|
+
|
|
16
|
+
id = Column(Integer, primary_key=True)
|
|
17
|
+
user_document_id = Column(
|
|
18
|
+
Integer,
|
|
19
|
+
ForeignKey('user_documents.id'),
|
|
20
|
+
nullable=False,
|
|
21
|
+
)
|
|
22
|
+
meeting_id = Column(
|
|
23
|
+
Integer,
|
|
24
|
+
ForeignKey('meetings.id'),
|
|
25
|
+
nullable=False,
|
|
26
|
+
)
|
|
27
|
+
updated_at = Column(
|
|
28
|
+
DateTime,
|
|
29
|
+
nullable=False,
|
|
30
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
31
|
+
default=lambda: datetime.utcnow(),
|
|
32
|
+
onupdate=lambda: datetime.utcnow(),
|
|
33
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UserDocumentMeetingResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
user_document_id = fields.Integer(required=True)
|
|
13
|
+
meeting_id = fields.Integer(required=True)
|
|
14
|
+
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from sqlalchemy import (
|
|
2
|
+
Column,
|
|
3
|
+
Integer,
|
|
4
|
+
Text,
|
|
5
|
+
String,
|
|
6
|
+
DateTime,
|
|
7
|
+
)
|
|
8
|
+
from datetime import datetime
|
|
9
|
+
|
|
10
|
+
from ...database import Base
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class UserInternalDocWorkflowModel(Base):
|
|
14
|
+
__tablename__ = 'user_internal_doc_workflow'
|
|
15
|
+
|
|
16
|
+
id = Column(Integer, primary_key=True)
|
|
17
|
+
user_id = Column(String(128), nullable=False, index=True)
|
|
18
|
+
internal_doc_workflow = Column(
|
|
19
|
+
Text,
|
|
20
|
+
nullable=False,
|
|
21
|
+
)
|
|
22
|
+
updated_at = Column(
|
|
23
|
+
DateTime,
|
|
24
|
+
nullable=False,
|
|
25
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
26
|
+
default=lambda: datetime.utcnow(),
|
|
27
|
+
onupdate=lambda: datetime.utcnow(),
|
|
28
|
+
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class UserInternalDocWorkflowResourceSchema(Schema):
|
|
8
|
+
id = fields.Integer(dump_only=True)
|
|
9
|
+
user_id = fields.String(required=True)
|
|
10
|
+
internal_doc_workflow = fields.String(required=True)
|
|
11
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
@@ -289,6 +289,9 @@ cs_models/resources/EmptyCompany/schemas.py,sha256=U6fjKheQMxosVsS14C3Vz7zVNHHso
|
|
|
289
289
|
cs_models/resources/Event/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
290
290
|
cs_models/resources/Event/models.py,sha256=wkRLT1tkFjXId8Ga1BiThwflXK5lRaCFqEf_guIwWM0,1227
|
|
291
291
|
cs_models/resources/Event/schemas.py,sha256=63C0x7i-JUu5Q0aAZeNBd1O0_XZ7cahM3KTpkLCbCM8,1690
|
|
292
|
+
cs_models/resources/EventLLM/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
293
|
+
cs_models/resources/EventLLM/models.py,sha256=ZsGh4a3Q606-KVFsgQD1Tdy6BuiNJ9Wx9MFwIL7N8qY,1281
|
|
294
|
+
cs_models/resources/EventLLM/schemas.py,sha256=9I4kbekU5GEG2YFPfM2D5z85UqT7bAkyVjSoPANo5y4,1415
|
|
292
295
|
cs_models/resources/ExplorerColumn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
293
296
|
cs_models/resources/ExplorerColumn/models.py,sha256=t448jSUDUNpN3MPlA1-nf2H-K9KVfMkKIV7ruB-DSks,799
|
|
294
297
|
cs_models/resources/ExplorerColumn/schemas.py,sha256=0qsNjOCkilZNa_Ly083dzp43h72MrAFM39dp2s8CnmY,442
|
|
@@ -914,6 +917,9 @@ cs_models/resources/UserDocumentCondition/schemas.py,sha256=BeeRrfrLW9N3k0IsOhoi
|
|
|
914
917
|
cs_models/resources/UserDocumentIntervention/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
915
918
|
cs_models/resources/UserDocumentIntervention/models.py,sha256=XDW1UIMnsQoyszHeel_aaCGnd_XfWxIOJF-JJBn9IoM,1019
|
|
916
919
|
cs_models/resources/UserDocumentIntervention/schemas.py,sha256=XKgWDYGiU7NTPqNHkqxWgbdz0wMwt8__SlxrCPhEqrU,556
|
|
920
|
+
cs_models/resources/UserDocumentMeeting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
921
|
+
cs_models/resources/UserDocumentMeeting/models.py,sha256=dasPUuYRJbb5rurCsWQG13b_vvJsmK51N61AeTA5rhs,770
|
|
922
|
+
cs_models/resources/UserDocumentMeeting/schemas.py,sha256=ZfMPoPL_-LeTXAo1ouhbEfBwItFpTTUi4oaD509kZ4k,363
|
|
917
923
|
cs_models/resources/UserDocumentTag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
918
924
|
cs_models/resources/UserDocumentTag/models.py,sha256=A9fpE3iCmawx09fvQslM1zZuuWY8KNCBBTnJsbr5F2w,775
|
|
919
925
|
cs_models/resources/UserDocumentTag/schemas.py,sha256=R0KOmc6XqU6dO-q7JOrjj1LEZmLWODt8gGQtVFjZXYU,413
|
|
@@ -926,6 +932,9 @@ cs_models/resources/UserExplorerColumn/schemas.py,sha256=pfL8wGtzO4KjBTuLitwSkgb
|
|
|
926
932
|
cs_models/resources/UserFile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
927
933
|
cs_models/resources/UserFile/models.py,sha256=-eQ-6VqLl2SDiQ1mpuIxSwt8rnFDF0F-jALulgqZauY,744
|
|
928
934
|
cs_models/resources/UserFile/schemas.py,sha256=UN2-NlmGSW5Xvkphs7vSQjJ0uWjGNXFi_eOlytO1jV8,317
|
|
935
|
+
cs_models/resources/UserInternalDocWorkflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
936
|
+
cs_models/resources/UserInternalDocWorkflow/models.py,sha256=8Dh6EeGVCG7trnr-BlYGD4rRKbu1_l20bIMU6XsruV0,699
|
|
937
|
+
cs_models/resources/UserInternalDocWorkflow/schemas.py,sha256=I5waHOjEFRzcEeJ1kPk4gOi7KzTenkoj0R0oJqfwDjM,296
|
|
929
938
|
cs_models/resources/UserLLMUse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
930
939
|
cs_models/resources/UserLLMUse/models.py,sha256=PX7xvU74zIA5ZgE8kDhdHtKWfJoM2VubtOuJpfV4A7w,810
|
|
931
940
|
cs_models/resources/UserLLMUse/schemas.py,sha256=rkBf5fPyxCzevEKeVsB74Nv98ILWQwR2IJ0Q9UwYGDc,498
|
|
@@ -1075,7 +1084,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
1075
1084
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
1076
1085
|
cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
|
|
1077
1086
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
1078
|
-
cs_models-0.0.
|
|
1079
|
-
cs_models-0.0.
|
|
1080
|
-
cs_models-0.0.
|
|
1081
|
-
cs_models-0.0.
|
|
1087
|
+
cs_models-0.0.657.dist-info/METADATA,sha256=_kW0bbGPv0xwnKC5dq92J1z8BAPPpEzcgKsB7jL6yRI,792
|
|
1088
|
+
cs_models-0.0.657.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
1089
|
+
cs_models-0.0.657.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
1090
|
+
cs_models-0.0.657.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|