From 9b29ac4d58758beb0dcc39aee1cf6b5cb7e447e0 Mon Sep 17 00:00:00 2001 From: Madeesh Kannan Date: Mon, 24 Jun 2024 11:53:30 +0200 Subject: [PATCH] build: Fetch build version from Git tag (#19) --- haystack_experimental/version.py | 5 ----- pyproject.toml | 10 ++++------ 2 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 haystack_experimental/version.py diff --git a/haystack_experimental/version.py b/haystack_experimental/version.py deleted file mode 100644 index 9079a6e4..00000000 --- a/haystack_experimental/version.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2022-present deepset GmbH -# -# SPDX-License-Identifier: Apache-2.0 - -__version__ = "0.0.1" diff --git a/pyproject.toml b/pyproject.toml index 78245150..eb261811 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["hatchling>=1.8.0"] +requires = ["hatchling>=1.8.0", "hatch-vcs"] build-backend = "hatchling.build" [project] @@ -71,7 +71,8 @@ sync = "./.github/utils/pydoc-markdown.sh" delete-outdated = "python ./.github/utils/delete_outdated_docs.py {args}" [tool.hatch.version] -path = "haystack_experimental/version.py" +source = "vcs" +tag-pattern = 'v(?P.*)' [tool.hatch.metadata] allow-direct-references = true @@ -88,10 +89,7 @@ quiet-level = 3 skip = "test/nodes/*,test/others/*,test/samples/*,e2e/*" [tool.pylint] -ignore-paths = [ - "haystack_experimental/__init__.py", - "haystack_experimental/version.py", -] +ignore-paths = ["haystack_experimental/__init__.py"] [tool.pylint.'MESSAGES CONTROL'] max-line-length = 120