diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 15dff36..4172331 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -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 diff --git a/CITATION.cff b/CITATION.cff index 0d90e69..45edf4d 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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" diff --git a/deshima_rawdata/__init__.py b/deshima_rawdata/__init__.py index 417210d..83fe961 100644 --- a/deshima_rawdata/__init__.py +++ b/deshima_rawdata/__init__.py @@ -1,5 +1,5 @@ -__all__ = ["cli", "download", "list"] -__version__ = "2023.11.4" +__all__ = ["cli", "download", "list", "version"] +__version__ = "2023.11.5" # submodules diff --git a/deshima_rawdata/cli.py b/deshima_rawdata/cli.py index f0ba9eb..6c12f77 100644 --- a/deshima_rawdata/cli.py +++ b/deshima_rawdata/cli.py @@ -1,4 +1,4 @@ -__all__ = ["download", "list"] +__all__ = ["download", "list", "version"] # standard library @@ -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__ @@ -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, + } + ) diff --git a/poetry.lock b/poetry.lock index 23d88e9..b177ecc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -970,4 +970,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.9, <3.13" -content-hash = "d807d0ecfa0509b28710c796234c44941d881990ee57576fe8d8d2ec3cc78220" +content-hash = "a7aeec8b1fbecfcfb900c5e31c98b2798745b8010cb2e51df3ba26512f383ca9" diff --git a/pyproject.toml b/pyproject.toml index 7a70ed8..6b8dae6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT" @@ -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"