Skip to content

Commit 7440314

Browse files
committed
#3 Update download command
1 parent 9284ea8 commit 7440314

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

deshima_rawdata/cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
# constants
1616
CHUNK_SIZE = 1024
17-
DEFAULT_VERSION = f"v{__version__}"
1817
GITHUB_URL = "https://raw.githubusercontent.com/deshima-dev/rawdata"
18+
DEFAULT_TAG = f"v{__version__}"
1919

2020

2121
def download(
@@ -24,21 +24,21 @@ def download(
2424
*,
2525
dir: Path = Path(),
2626
progress: bool = True,
27-
version: str = DEFAULT_VERSION,
27+
tag: str = DEFAULT_TAG,
2828
) -> Path:
2929
"""Download DESHIMA raw data for given observation ID.
3030
3131
Args:
3232
obsid: Observation ID (YYYYmmddHHMMSS).
3333
dir: Directory where the raw data is saved.
3434
progress: Whether to show a progress bar.
35-
version: Version of the raw data.
35+
tag: Git tag (or branch) of the raw data.
3636
3737
Returns:
3838
Path of the downloaded raw data.
3939
4040
"""
41-
url = f"{GITHUB_URL}/{version}/data/{obsid}.tar.gz"
41+
url = f"{GITHUB_URL}/{tag}/data/{obsid}.tar.gz"
4242

4343
if not (response := get(url, stream=True)).ok:
4444
response.raise_for_status()

0 commit comments

Comments
 (0)