1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-04 03:21:00 +08:00

update test&docs

This commit is contained in:
bxdd
2021-01-22 01:06:32 +09:00
parent 80c9a47e51
commit a762248d98
2 changed files with 3 additions and 5 deletions

View File

@@ -195,7 +195,7 @@ Feature
- `ExpressionOps`
`ExpressionOps` will use operator for feature construction.
To know more about ``Operator``, please refer to `Operator API <../reference/api.html#module-qlib.data.ops>`_.
Also, ``Qlib`` supports users to define their own custom ``Operator``, an example has been given in ``qlib/tests/test_register_ops.py``.
Also, ``Qlib`` supports users to define their own custom ``Operator``, an example has been given in ``tests/test_register_ops.py``.
To know more about ``Feature``, please refer to `Feature API <../reference/api.html#module-qlib.data.base>`_.

View File

@@ -63,13 +63,11 @@ class TestRegiterCustomOps(TestAutoData):
@classmethod
def setUpClass(cls) -> None:
# use default data
provider_uri = "~/.qlib/qlib_data/cn_data_simple" # target_dir
provider_uri = "~/.qlib/qlib_data/cn_data_simple_1" # target_dir
if not exists_qlib_data(provider_uri):
print(f"Qlib data is not found in {provider_uri}")
GetData().qlib_data(
name="qlib_data_simple", region="cn", version="latest", interval="1d", target_dir=provider_uri
)
GetData().qlib_data(name="qlib_data_simple", region="cn", interval="1d", target_dir=provider_uri)
qlib.init(provider_uri=provider_uri, custom_ops=[Diff, Distance], region=REG_CN)
def test_regiter_custom_ops(self):