Skip to content

Commit 6b84a4b

Browse files
committed
#9 Rename option of download command (tag → ref)
1 parent 7c82635 commit 6b84a4b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

deshima_rawdata/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
dtype={0: str},
2424
)
2525
DATA_REPO_URL = "https://github.com/deshima-dev/rawdata"
26-
DEFAULT_DATA_TAG = f"v{__version__}"
26+
DEFAULT_DATA_REF = f"v{__version__}"
2727
DEFAULT_LIST_FORMAT = "markdown"
2828

2929

@@ -34,7 +34,7 @@ def download(
3434
dir: Path = Path(),
3535
extract: bool = False,
3636
progress: bool = False,
37-
tag: str = DEFAULT_DATA_TAG,
37+
ref: str = DEFAULT_DATA_REF,
3838
) -> Path:
3939
"""Download DESHIMA raw data for given observation ID.
4040
@@ -43,15 +43,15 @@ def download(
4343
dir: Directory where the raw data is saved.
4444
extract: Whether to extract the raw data.
4545
progress: Whether to show a progress bar.
46-
tag: Git tag (or branch) of the raw data.
47-
Note this is for development use only.
46+
ref: Reference of the branch or tag for the raw data.
47+
Note that this is for development use only.
4848
4949
Returns:
5050
Path of the downloaded raw data.
5151
5252
"""
5353
file_name = DATA_LIST["File name"][str(obsid)] # type: ignore
54-
url = f"{DATA_REPO_URL}/raw/{tag}/data/{file_name}"
54+
url = f"{DATA_REPO_URL}/raw/{ref}/data/{file_name}"
5555

5656
if not (response := get(url, stream=True)).ok:
5757
response.raise_for_status()

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def test_cli_download() -> None:
1010
for obsid in cli.DATA_LIST.index:
11-
cli.download(obsid, tag=env["GITHUB_SHA"])
11+
cli.download(obsid, ref=env["GITHUB_SHA"])
1212

1313

1414
def test_cli_list() -> None:

0 commit comments

Comments
 (0)