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 e4e2656..0a175cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # bcl-python -Altissimo Python client for bcl-python. +Python client for the Broad Genomics Platform Operations (BCL GPO) API: order and sample lookups over Google-authenticated HTTP. diff --git a/pyproject.toml b/pyproject.toml index ffc66eb..28427bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "bcl-python" version = "0.1.0" -description = "Altissimo Python client for bcl-python" +description = "Python client for the Broad Genomics Platform Operations (BCL GPO) API: order and sample lookups over Google-authenticated HTTP" readme = "README.md" license = "Apache-2.0" requires-python = ">=3.11" diff --git a/src/altissimo/bcl/__init__.py b/src/altissimo/bcl/__init__.py index 6c55e00..23c1663 100644 --- a/src/altissimo/bcl/__init__.py +++ b/src/altissimo/bcl/__init__.py @@ -2,6 +2,8 @@ from __future__ import annotations +from importlib.metadata import PackageNotFoundError, version + from .client import BCLClient, BCLSettings from .exceptions import BCLOrderNotFoundError, BCLSampleNotFoundError from .models import ( @@ -17,6 +19,11 @@ validate_metadata_helper, ) +try: + __version__ = version("bcl-python") +except PackageNotFoundError: # pragma: no cover — editable install without metadata + __version__ = "0.1.0" + __all__ = [ "BCLClient", "BCLOrderNotFoundError", @@ -31,5 +38,6 @@ "BCLStatus", "BCLTest", "BCLTestSample", + "__version__", "validate_metadata_helper", ] diff --git a/tests/test_placeholder.py b/tests/test_placeholder.py deleted file mode 100644 index eb83382..0000000 --- a/tests/test_placeholder.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Placeholder tests.""" - - -def test_placeholder() -> None: - """A placeholder test so pytest does not fail.""" - assert True