From 16d6ed9a5fce0984ae7e6f8ea0ee873390095672 Mon Sep 17 00:00:00 2001 From: James Turk Date: Sun, 28 Jul 2024 02:35:08 -0400 Subject: [PATCH] not really working yet --- pdm.lock | 13 ++++++++++++- pyproject.toml | 8 ++++++-- src/wud/cli.py | 4 ++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pdm.lock b/pdm.lock index 9d2afc9..b168212 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:82c9bf589914aff7f949cecce5859dbd6ade8b8ae3dc543171a39458c7e02ff7" +content_hash = "sha256:a76925dc191bfa8c9b09ed8edbc159844972310a7494a1440e8f8aed3ea499ed" [[metadata.targets]] requires_python = ">=3.12" @@ -640,6 +640,17 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "structlog" +version = "24.4.0" +requires_python = ">=3.8" +summary = "Structured Logging for Python" +groups = ["default"] +files = [ + {file = "structlog-24.4.0-py3-none-any.whl", hash = "sha256:597f61e80a91cc0749a9fd2a098ed76715a1c8a01f73e336b746504d1aad7610"}, + {file = "structlog-24.4.0.tar.gz", hash = "sha256:b27bfecede327a6d2da5fbc96bd859f114ecc398a6389d664f62085ee7ae6fc4"}, +] + [[package]] name = "textual" version = "0.74.0" diff --git a/pyproject.toml b/pyproject.toml index b753698..55026c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,11 @@ name = "wud" version = "0.1.0" description = "" authors = [{ name = "James Turk", email = "dev@jpt.sh" }] -dependencies = ["textual>=0.74.0", "typer>=0.12.3"] +dependencies = [ + "textual>=0.74.0", + "typer>=0.12.3", + "structlog>=24.4.0", +] requires-python = ">=3.12" readme = "README.md" license = { text = "MIT" } @@ -13,7 +17,7 @@ requires = ["pdm-backend"] build-backend = "pdm.backend" [project.scripts] -modo = "wud.app:cli" +wud = "wud.cli:cli" [tool.pdm] distribution = true diff --git a/src/wud/cli.py b/src/wud/cli.py index 09e8b36..0bd2aae 100644 --- a/src/wud/cli.py +++ b/src/wud/cli.py @@ -13,8 +13,8 @@ def hello(name: str) -> None: def _version_callback(value: bool) -> None: if value: - version = importlib.metadata.version("{{ cookiecutter.project_slug }}") - typer.echo(f"{{ cookiecutter.project_slug }} v{version}") + version = importlib.metadata.version("wud") + typer.echo(f"wud v{version}") raise typer.Exit()