From 18326f69f73678ff1c843f4f16f77c96b3547b90 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Fri, 17 Nov 2023 17:02:47 +0000 Subject: [PATCH 1/4] #18 Update project dependencies --- poetry.lock | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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..61f54b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" From dabf7463e3d9e555598cc2bd4dcde6acf01b1240 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Fri, 17 Nov 2023 17:03:37 +0000 Subject: [PATCH 2/4] #18 Add version command --- deshima_rawdata/__init__.py | 2 +- deshima_rawdata/cli.py | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/deshima_rawdata/__init__.py b/deshima_rawdata/__init__.py index 417210d..f1cd453 100644 --- a/deshima_rawdata/__init__.py +++ b/deshima_rawdata/__init__.py @@ -1,4 +1,4 @@ -__all__ = ["cli", "download", "list"] +__all__ = ["cli", "download", "list", "version"] __version__ = "2023.11.4" 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, + } + ) From 72ca498a4c2eb33e41affd27aa685a9b4794abb9 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Fri, 17 Nov 2023 17:03:50 +0000 Subject: [PATCH 3/4] #18 Fix Poetry version --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From b742dfca1763c183ac43b7423e5dfc74ab493ef3 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Fri, 17 Nov 2023 17:04:26 +0000 Subject: [PATCH 4/4] =?UTF-8?q?#18=20Update=20package=20version=20(2023.11?= =?UTF-8?q?.4=20=E2=86=92=202023.11.5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CITATION.cff | 2 +- deshima_rawdata/__init__.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 f1cd453..83fe961 100644 --- a/deshima_rawdata/__init__.py +++ b/deshima_rawdata/__init__.py @@ -1,5 +1,5 @@ __all__ = ["cli", "download", "list", "version"] -__version__ = "2023.11.4" +__version__ = "2023.11.5" # submodules diff --git a/pyproject.toml b/pyproject.toml index 61f54b0..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"