Skip to content

Commit

Permalink
#19 Merge pull request from deshima-dev/astropenguin/issue18
Browse files Browse the repository at this point in the history
Add version command
  • Loading branch information
astropenguin authored Nov 17, 2023
2 parents f68e88a + b742dfc commit a8a42d7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
with:
python-version: "3.12"
- name: Publish package to PyPI
run: pip install poetry && poetry publish --build
run: pip install poetry==1.7.1 && poetry publish --build
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ message: "If you use this software, please cite it as below."

title: "deshima-rawdata"
abstract: "DESHIMA raw data and downloader package"
version: 2023.11.4
version: 2023.11.5
date-released: 2023-11-17
license: "MIT"
doi: "10.5281/zenodo.10145185"
Expand Down
4 changes: 2 additions & 2 deletions deshima_rawdata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__all__ = ["cli", "download", "list"]
__version__ = "2023.11.4"
__all__ = ["cli", "download", "list", "version"]
__version__ = "2023.11.5"


# submodules
Expand Down
16 changes: 14 additions & 2 deletions deshima_rawdata/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["download", "list"]
__all__ = ["download", "list", "version"]


# standard library
Expand All @@ -10,6 +10,7 @@
# dependencies
import pandas as pd
from fire import Fire
from packaging.version import Version
from requests import get
from tqdm import tqdm
from . import __version__
Expand Down Expand Up @@ -103,6 +104,17 @@ def list(format: str = DEFAULT_LIST_FORMAT) -> Any:
return getattr(DATA_LIST, f"to_{format}")()


def version() -> Version:
"""Show the version of the package."""
return Version(__version__)


def main() -> None:
"""Entry point of the deshima-rawdata command."""
Fire({"download": download, "list": list})
Fire(
{
"download": download,
"list": list,
"version": version,
}
)
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "deshima-rawdata"
version = "2023.11.4"
version = "2023.11.5"
description = "DESHIMA raw data and downloader package"
authors = ["Akio Taniguchi <taniguchi@a.phys.nagoya-u.ac.jp>"]
license = "MIT"
Expand All @@ -9,6 +9,7 @@ readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.9, <3.13"
fire = "^0.5"
packaging = "^23.0"
requests = "^2.30"
tqdm = "^4.65"

Expand Down

0 comments on commit a8a42d7

Please sign in to comment.