Skip to content

Commit

Permalink
add readthedocs config
Browse files Browse the repository at this point in the history
  • Loading branch information
foolcage committed Jan 19, 2022
1 parent d2eb426 commit cbcab04
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
python:
install:
- requirements: requirements/docs.txt
- method: pip
path: .
sphinx:
builder: dirhtml
fail_on_warning: true
configuration: docs/source/conf.py
1 change: 1 addition & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ API
:template: custom-module-template.rst
:recursive:

zvt
zvt.api
zvt.autocode
zvt.consts
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pre adjusted(qfq), post adjusted(hfq), or not adjusted(bfq).
.. note:
In order to be compatible with historical data, the qfq is an exception, {adjust_type} is left empty
The pre defined kdata schema could be in :module:`~.zvt.domain.quotes`, it's seperated by
The pre defined kdata schema could be in :py:mod:`~.zvt.domain.quotes`, it's seperated by
entity_schema, level, and adjust type.

Normal data
Expand Down
4 changes: 4 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx==4.4.0
sphinx_autodoc_typehints==1.15.3
rst2pdf==0.99
ipython==7.31.1
10 changes: 8 additions & 2 deletions src/zvt/ml/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ def build_feature(
self, entity_ids: List[str], start_timestamp: pd.Timestamp, end_timestamp: pd.Timestamp
) -> pd.DataFrame:
"""
result df format:
result df format
col1 col2 col3 ...
entity_id timestamp
1.2 0.5 0.3 ...
Expand All @@ -214,6 +213,13 @@ class MaStockMLMachine(StockMLMachine):
def build_feature(
self, entity_ids: List[str], start_timestamp: pd.Timestamp, end_timestamp: pd.Timestamp
) -> pd.DataFrame:
"""
:param entity_ids:
:param start_timestamp:
:param end_timestamp:
:return:
"""
t = MaTransformer(windows=[5, 10, 120, 250])
df = t.transform(self.kdata_df)
return df
Expand Down
6 changes: 0 additions & 6 deletions src/zvt/recorders/exchange/exchange_etf_meta_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ def persist_etf_list(self, df: pd.DataFrame, exchange: str):
df_to_db(df=df, data_schema=Etf, provider=self.provider, force_update=False)

def download_sh_etf_component(self, df: pd.DataFrame):
"""
ETF_CLASS => 1. 单市场 ETF 2.跨市场 ETF 3. 跨境 ETF
5. 债券 ETF 6. 黄金 ETF
:param df: ETF 列表数据
:return: None
"""
query_url = (
"http://query.sse.com.cn/infodisplay/queryConstituentStockInfo.do?" "isPagination=false&type={}&etfClass={}"
)
Expand Down

0 comments on commit cbcab04

Please sign in to comment.