From 63eade0355b8050ab4bb44e0bc9d9acc69700491 Mon Sep 17 00:00:00 2001 From: altissimo Date: Tue, 15 Sep 2026 13:17:52 -0400 Subject: [PATCH] Add __version__, fix package description, wire mypy into pre-commit - Add __version__ to altissimo.dnavisit per the team's standard version pattern (reads installed package metadata, falls back to the pyproject version for editable installs). - Replace boilerplate description in pyproject.toml and README.md with a real one-liner describing the DNAvisit API client (auth, pre-test, post-test, and insights requests). - Add a local mypy hook to .pre-commit-config.yaml so the strict mypy config already in pyproject.toml is actually enforced (previously only configured, never run in CI's pre-commit-based lint job). Co-Authored-By: Claude Sonnet 5 --- .pre-commit-config.yaml | 9 +++++++++ README.md | 2 +- pyproject.toml | 2 +- src/altissimo/dnavisit/__init__.py | 8 ++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) 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__", ]