Skip to content

Commit a8a42d7

Browse files
authored
#19 Merge pull request from deshima-dev/astropenguin/issue18
Add version command
2 parents f68e88a + b742dfc commit a8a42d7

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

.github/workflows/pypi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
with:
1818
python-version: "3.12"
1919
- name: Publish package to PyPI
20-
run: pip install poetry && poetry publish --build
20+
run: pip install poetry==1.7.1 && poetry publish --build

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ message: "If you use this software, please cite it as below."
33

44
title: "deshima-rawdata"
55
abstract: "DESHIMA raw data and downloader package"
6-
version: 2023.11.4
6+
version: 2023.11.5
77
date-released: 2023-11-17
88
license: "MIT"
99
doi: "10.5281/zenodo.10145185"

deshima_rawdata/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
__all__ = ["cli", "download", "list"]
2-
__version__ = "2023.11.4"
1+
__all__ = ["cli", "download", "list", "version"]
2+
__version__ = "2023.11.5"
33

44

55
# submodules

deshima_rawdata/cli.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__all__ = ["download", "list"]
1+
__all__ = ["download", "list", "version"]
22

33

44
# standard library
@@ -10,6 +10,7 @@
1010
# dependencies
1111
import pandas as pd
1212
from fire import Fire
13+
from packaging.version import Version
1314
from requests import get
1415
from tqdm import tqdm
1516
from . import __version__
@@ -103,6 +104,17 @@ def list(format: str = DEFAULT_LIST_FORMAT) -> Any:
103104
return getattr(DATA_LIST, f"to_{format}")()
104105

105106

107+
def version() -> Version:
108+
"""Show the version of the package."""
109+
return Version(__version__)
110+
111+
106112
def main() -> None:
107113
"""Entry point of the deshima-rawdata command."""
108-
Fire({"download": download, "list": list})
114+
Fire(
115+
{
116+
"download": download,
117+
"list": list,
118+
"version": version,
119+
}
120+
)

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "deshima-rawdata"
3-
version = "2023.11.4"
3+
version = "2023.11.5"
44
description = "DESHIMA raw data and downloader package"
55
authors = ["Akio Taniguchi <taniguchi@a.phys.nagoya-u.ac.jp>"]
66
license = "MIT"
@@ -9,6 +9,7 @@ readme = "README.md"
99
[tool.poetry.dependencies]
1010
python = ">=3.9, <3.13"
1111
fire = "^0.5"
12+
packaging = "^23.0"
1213
requests = "^2.30"
1314
tqdm = "^4.65"
1415

0 commit comments

Comments
 (0)