Skip to content

Commit

Permalink
fix_download_data_for_CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Linlang Lv (iSoftStone) committed Mar 25, 2022
1 parent 8a90787 commit c725fd0
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
- name: Test data downloads
run: |
python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
python scripts/get_data.py qlib_data_simple --target_dir ~/.qlib/qlib_data/cn_data_simple --interval 1d --region cn
python -c "import os; userpath=os.path.expanduser('~'); os.rename(userpath + '/.qlib/qlib_data/cn_data_simple', userpath + '/.qlib/qlib_data/cn_data')"
- name: Test workflow by config (install from pip)
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ jobs:
brew install libomp.rb
- name: Test data downloads
run: |
python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
python scripts/get_data.py qlib_data_simple --target_dir ~/.qlib/qlib_data/cn_data_simple --interval 1d --region cn
python -c "import os; userpath=os.path.expanduser('~'); os.rename(userpath + '/.qlib/qlib_data/cn_data_simple', userpath + '/.qlib/qlib_data/cn_data')"
- name: Test workflow by config (install from pip)
run: |
python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
Expand Down
1 change: 0 additions & 1 deletion qlib/backtest/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def get_signal(self, start_time, end_time) -> Union[pd.Series, pd.DataFrame, Non
Union[pd.Series, pd.DataFrame, None]:
returns None if no signal in the specific day
"""
...


class SignalWCache(Signal):
Expand Down
8 changes: 0 additions & 8 deletions qlib/data/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,10 @@ def remove(self, value: CalVT) -> None:
@overload
def __setitem__(self, i: int, value: CalVT) -> None:
"""x.__setitem__(i, o) <==> (x[i] = o)"""
...

@overload
def __setitem__(self, s: slice, value: Iterable[CalVT]) -> None:
"""x.__setitem__(s, o) <==> (x[s] = o)"""
...

def __setitem__(self, i, value) -> None:
raise NotImplementedError(
Expand All @@ -141,12 +139,10 @@ def __setitem__(self, i, value) -> None:
@overload
def __delitem__(self, i: int) -> None:
"""x.__delitem__(i) <==> del x[i]"""
...

@overload
def __delitem__(self, i: slice) -> None:
"""x.__delitem__(slice(start: int, stop: int, step: int)) <==> del x[start:stop:step]"""
...

def __delitem__(self, i) -> None:
"""
Expand All @@ -162,12 +158,10 @@ def __delitem__(self, i) -> None:
@overload
def __getitem__(self, s: slice) -> Iterable[CalVT]:
"""x.__getitem__(slice(start: int, stop: int, step: int)) <==> x[start:stop:step]"""
...

@overload
def __getitem__(self, i: int) -> CalVT:
"""x.__getitem__(i) <==> x[i]"""
...

def __getitem__(self, i) -> CalVT:
"""
Expand Down Expand Up @@ -467,12 +461,10 @@ def __getitem__(self, s: slice) -> pd.Series:
-------
pd.Series(values, index=pd.RangeIndex(start, len(values))
"""
...

@overload
def __getitem__(self, i: int) -> Tuple[int, float]:
"""x.__getitem__(y) <==> x[y]"""
...

def __getitem__(self, i) -> Union[Tuple[int, float], pd.Series]:
"""x.__getitem__(y) <==> x[y]
Expand Down
2 changes: 1 addition & 1 deletion qlib/utils/index_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def sum_by_index(data_list: Union["SingleData"], new_index: list, fill_value=0)
new_index : list
the new_index of new SingleData.
fill_value : float
fill the missing values ​​or replace np.NaN.
fill the missing values or replace np.NaN.
Returns
-------
Expand Down
2 changes: 0 additions & 2 deletions qlib/workflow/online/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def update(self, *args, **kwargs):
"""
Update info for specific recorder
"""
...


class DSBasedUpdater(RecordUpdater, metaclass=ABCMeta):
Expand Down Expand Up @@ -248,7 +247,6 @@ def get_update_data(self, dataset: Dataset) -> pd.DataFrame:
- `update_date` only include some data specific feature
- `update` include some general routine steps(e.g. prepare dataset, checking)
"""
...


def _replace_range(data, new_data):
Expand Down
2 changes: 1 addition & 1 deletion scripts/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@


if __name__ == "__main__":
fire.Fire(GetData)
fire.Fire(GetData().qlib_data)

0 comments on commit c725fd0

Please sign in to comment.