From c6b2065d1d265846a0a3ce68872f617ce527b04b Mon Sep 17 00:00:00 2001 From: Paco Aranda Date: Tue, 9 Jul 2024 09:04:11 +0200 Subject: [PATCH] [CHORE] `argilla`: Move version to specific file (#5169) # Description This PR aligns how the package version is defined with the rest of the packages. A new `_version.py` module is defined including the version. This can help when bumping versions automatically. **Type of change** - Refactor (change restructuring the codebase without changing functionality) **How Has This Been Tested** **Checklist** - I added relevant documentation - I followed the style guidelines of this project - I did a self-review of my code - I made corresponding changes to the documentation - I confirm My changes generate no new warnings - I have added tests that prove my fix is effective or that my feature works - I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --- argilla/pyproject.toml | 2 +- argilla/src/argilla/__init__.py | 4 +--- argilla/src/argilla/_version.py | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 argilla/src/argilla/_version.py diff --git a/argilla/pyproject.toml b/argilla/pyproject.toml index 8efcadc708..b98d8b7448 100644 --- a/argilla/pyproject.toml +++ b/argilla/pyproject.toml @@ -41,7 +41,7 @@ distribution = true [tool.pdm.version] source = "file" -path = "src/argilla/__init__.py" +path = "src/argilla/_version.py" [tool.pdm.dev-dependencies] dev = [ diff --git a/argilla/src/argilla/__init__.py b/argilla/src/argilla/__init__.py index 69e6b7f9d8..b87ec6588c 100644 --- a/argilla/src/argilla/__init__.py +++ b/argilla/src/argilla/__init__.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from argilla._version import __version__ # noqa from argilla.client import * # noqa from argilla.datasets import * # noqa @@ -21,6 +22,3 @@ from argilla.responses import * # noqa from argilla.records import * # noqa from argilla.vectors import * # noqa - - -__version__ = "2.0.0dev0" diff --git a/argilla/src/argilla/_version.py b/argilla/src/argilla/_version.py new file mode 100644 index 0000000000..2f99479f33 --- /dev/null +++ b/argilla/src/argilla/_version.py @@ -0,0 +1,15 @@ +# Copyright 2024-present, Argilla, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__version__ = "2.0.0dev0"