From 5c0c810b91d162381575f0cb9301dbbfda0b4803 Mon Sep 17 00:00:00 2001 From: Stephan Tulkens Date: Fri, 18 Oct 2024 09:49:01 +0200 Subject: [PATCH] Add dynamic version (#72) --- pyproject.toml | 5 ++++- reach/__init__.py | 6 +++--- reach/reach.py | 2 +- reach/version.py | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 reach/version.py diff --git a/pyproject.toml b/pyproject.toml index f9b2042..b16df68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "reach" description = "Load your vector embeddings" readme = "README.md" -version = "5.0.0" +dynamic = ["version"] requires-python = ">=3.10" dependencies = [ @@ -71,3 +71,6 @@ packages = ["reach"] [tool.setuptools_scm] # can be empty if no extra settings are needed, presence enables setuptools_scm + +[tool.setuptools.dynamic] +version = {attr = "reach.version.__version__"} diff --git a/reach/__init__.py b/reach/__init__.py index 8317571..7561afc 100644 --- a/reach/__init__.py +++ b/reach/__init__.py @@ -1,6 +1,6 @@ -"""A package for reading and manipulating word embeddings.""" +"""Small vector store.""" from reach.reach import Reach, normalize +from reach.version import __version__ -__all__ = ["Reach", "normalize"] -__version__ = "5.0.0" +__all__ = ["Reach", "normalize", "__version__"] diff --git a/reach/reach.py b/reach/reach.py index b10fecb..1f43153 100644 --- a/reach/reach.py +++ b/reach/reach.py @@ -1,4 +1,4 @@ -"""A class for working with vector representations.""" +"""A small vector store.""" from __future__ import annotations diff --git a/reach/version.py b/reach/version.py new file mode 100644 index 0000000..c3fe30e --- /dev/null +++ b/reach/version.py @@ -0,0 +1,2 @@ +__version_triple__ = (5, 0, 0) +__version__ = ".".join(map(str, __version_triple__))