diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f2ba00..2255507 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,15 @@ repos: - id: ruff args: ['--fix'] - id: ruff-format + - repo: local + hooks: + - id: mypy + name: mypy + entry: mypy + language: system + types: [python] + pass_filenames: false + args: ["src"] - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.44.0 hooks: diff --git a/README.md b/README.md index 411a858..52ea27b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # dnavisit-python -Altissimo Python client for dnavisit-python. +Python client for the DNAvisit API to authenticate and submit pre-test, post-test, and insights genetic testing requests. diff --git a/pyproject.toml b/pyproject.toml index a2bf581..63486d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "dnavisit-python" version = "0.1.0" -description = "Altissimo Python client for dnavisit-python" +description = "Python client for the DNAvisit API to authenticate and submit pre-test, post-test, and insights genetic testing requests" readme = "README.md" license = "Apache-2.0" requires-python = ">=3.11" diff --git a/src/altissimo/dnavisit/__init__.py b/src/altissimo/dnavisit/__init__.py index 834af21..44d0a1b 100644 --- a/src/altissimo/dnavisit/__init__.py +++ b/src/altissimo/dnavisit/__init__.py @@ -2,6 +2,8 @@ from __future__ import annotations +from importlib.metadata import PackageNotFoundError, version + from altissimo.dnavisit.client import DNAvisitClient, DNAvisitSettings from altissimo.dnavisit.exceptions import ( DNAvisitAuthenticationFailedError, @@ -28,6 +30,11 @@ YesNoEnum, ) +try: + __version__ = version("dnavisit-python") +except PackageNotFoundError: # pragma: no cover — editable install without metadata + __version__ = "0.1.0" + __all__ = [ "CHAT_BLURB_CARDIO_NEGATIVE", "CHAT_BLURB_CARDIO_VUS", @@ -51,4 +58,5 @@ "TestStatusEnum", "TestTypeEnum", "YesNoEnum", + "__version__", ]