Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetWolf committed May 23, 2024
1 parent d0b84d5 commit 5f9219a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qlib/tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ def __init__(self, delete_zip_file=False):
self.delete_zip_file = delete_zip_file

def merge_remote_url(self, file_name: str):
"""
Generate download links.
Parameters
----------
file_name: str
The name of the file to be downloaded.
The file name can be accompanied by a version number, (e.g.: v2/qlib_data_simple_cn_1d_latest.zip),
if no version number is attached, it will be downloaded from v0 by default.
"""
return f"{self.REMOTE_URL}/{file_name}" if "/" in file_name else f"{self.REMOTE_URL}/v0/{file_name}"

def download(self, url: str, target_path: [Path, str]):
Expand Down

0 comments on commit 5f9219a

Please sign in to comment.