Skip to content

Commit

Permalink
fix: improve names of classes and update requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
ailinvenerus committed Dec 7, 2023
1 parent fbea51f commit ad13288
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs_source/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Methods Reference

.. autotypeddict:: scribemi.Env
.. autotypeddict:: scribemi.MITask
.. autotypeddict:: scribemi.MIModelFundPerformanceSchema
.. autotypeddict:: scribemi.MIModelFinancialsSchema
.. autotypeddict:: scribemi.MIModelFundPerformance
.. autotypeddict:: scribemi.MIModelFinancials
.. autotypeddict:: scribemi.MICollatedModelFundPerformance
17 changes: 17 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
alabaster==0.7.13
apeye==1.4.1
apeye-core==1.1.4
autodocsumm==0.2.11
aws-requests-auth==0.4.3
Babel==2.13.1
beautifulsoup4==4.12.2
boto3==1.33.6
botocore==1.33.6
CacheControl==0.13.1
certifi==2023.11.17
charset-normalizer==3.3.2
colorama==0.4.6
coverage==7.3.2
cssutils==2.9.0
dict2css==0.3.0.post1
docutils>=0.18.1
domdf-python-tools==3.7.0
filelock==3.13.1
html5lib==1.1
idna==3.6
imagesize==1.4.1
importlib-metadata==7.0.0
Expand All @@ -20,9 +30,12 @@ markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
more-itertools==10.1.0
msgpack==1.0.7
natsort==8.4.0
nh3==0.2.14
packaging==23.2
pkginfo==1.9.6
platformdirs==4.1.0
pluggy==1.3.0
Pygments==2.17.2
pytest==7.4.3
Expand All @@ -35,10 +48,13 @@ requests==2.31.0
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.7.0
ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8
s3transfer==0.8.2
scribeauth==1.2.0
six==1.16.0
snowballstemmer==2.2.0
soupsieve==2.5
Sphinx==7.2.6
sphinx-autodoc-typehints==1.25.2
sphinx-jinja2-compat>=0.2.0
Expand All @@ -57,4 +73,5 @@ twine==4.0.2
typing==3.7.4.3
typing_extensions==4.8.0
urllib3<2.1.0
webencodings==0.5.1
zipp==3.17.0
20 changes: 10 additions & 10 deletions scribemi/ScribeMi.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,34 @@ class Value(TypedDict):
bbox: Optional[str]


class ItemSchema(TypedDict):
class Item(TypedDict):
tag: str
term: str
ogterm: str
values: list[Value]


class Tables(TypedDict):
class Table(TypedDict):
title: str
columnsOrder: list[str]
items: list[ItemSchema]
items: list[Item]


class MICollatedModelFundPerformance(TypedDict):
date: Optional[str]
tables: list[Tables]
tables: list[Table]


class MIModelFundPerformanceSchema(TypedDict):
class MIModelFundPerformance(TypedDict):
date: str
tables: list[Tables]
tables: list[Table]


class MIModelFinancialsSchema(TypedDict):
class MIModelFinancials(TypedDict):
company: str
dateReporting: str
covering: str
items: list[ItemSchema]
items: list[Item]


class UnauthenticatedException(Exception):
Expand Down Expand Up @@ -264,7 +264,7 @@ def fetch_model(self, task: MITask):
:type task: MITask
:return: model.
:rtype: Union[:typeddict:`~.MIModelFundPerformanceSchema`, :typeddict:`~.MIModelFinancialsSchema`]
:rtype: Union[:typeddict:`~.MIModelFundPerformance`, :typeddict:`~.MIModelFinancials`]
"""
modelUrl = task.get("modelUrl")
if modelUrl == None:
Expand All @@ -290,7 +290,7 @@ def consolidate_tasks(self, tasks: list[MITask]):
To consolidate tasks.
:param tasks: list of tasks to consolidate.
:type tasks: list[MITask]
:type tasks: list[:typeddict:`~.MITask`]
:return: consolidated model.
:rtype: :typeddict:`~.MICollatedModelFundPerformance`
Expand Down
4 changes: 2 additions & 2 deletions scribemi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
MI,
Env,
MITask,
MIModelFundPerformanceSchema,
MIModelFinancialsSchema,
MIModelFundPerformance,
MIModelFinancials,
MICollatedModelFundPerformance,
)

0 comments on commit ad13288

Please sign in to comment.