From c4134fa68c3ef6511ec2ad7869a9d42518398d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Hordy=C5=84ski?= Date: Thu, 3 Oct 2024 13:07:53 +0200 Subject: [PATCH] chore: prepare packages to upload --- LICENSE | 21 ++++++ packages/ragbits-cli/pyproject.toml | 6 +- .../ragbits-core/examples/chromadb_example.py | 2 +- packages/ragbits-core/examples/llm_example.py | 2 +- .../ragbits-core/examples/prompt_example.py | 2 +- packages/ragbits-core/pyproject.toml | 7 +- .../examples/simple_text.py | 2 +- .../ragbits-document-search/pyproject.toml | 9 ++- packages/ragbits/README.md | 1 + packages/ragbits/pyproject.toml | 50 ++++++++++++++ pyproject.toml | 4 +- scripts/update_ragbits_package.py | 4 +- uv.lock | 65 +++++++++++-------- 13 files changed, 128 insertions(+), 47 deletions(-) create mode 100644 LICENSE create mode 100644 packages/ragbits/README.md create mode 100644 packages/ragbits/pyproject.toml diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..5a068dea --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 deepsense.ai sp. z o.o. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/packages/ragbits-cli/pyproject.toml b/packages/ragbits-cli/pyproject.toml index 66fbeaa9..3950f649 100644 --- a/packages/ragbits-cli/pyproject.toml +++ b/packages/ragbits-cli/pyproject.toml @@ -6,7 +6,7 @@ readme = "README.md" requires-python = ">=3.10" license = "MIT" authors = [ - { name = "deepsense.ai", email = "contact@deepsense.ai"} + { name = "deepsense.ai", email = "ragbits@deepsense.ai"} ] keywords = [ "Retrieval Augmented Generation", @@ -18,7 +18,7 @@ keywords = [ "Prompt Management" ] classifiers = [ - "Development Status :: 1 - Planning", + "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", @@ -29,10 +29,10 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries :: Python Modules", - "Private :: Do Not Upload" ] dependencies = [ "typer>=0.12.5", + "ragbits-core==0.1.0" ] [project.scripts] diff --git a/packages/ragbits-core/examples/chromadb_example.py b/packages/ragbits-core/examples/chromadb_example.py index 0a2a8015..060a1e01 100644 --- a/packages/ragbits-core/examples/chromadb_example.py +++ b/packages/ragbits-core/examples/chromadb_example.py @@ -2,7 +2,7 @@ # requires-python = ">=3.10" # dependencies = [ # "ragbits-document-search", -# "ragbits[litellm]", +# "ragbits-core[litellm]", # ] # /// import asyncio diff --git a/packages/ragbits-core/examples/llm_example.py b/packages/ragbits-core/examples/llm_example.py index adcd61e0..6df160e1 100644 --- a/packages/ragbits-core/examples/llm_example.py +++ b/packages/ragbits-core/examples/llm_example.py @@ -1,7 +1,7 @@ # /// script # requires-python = ">=3.10" # dependencies = [ -# "ragbits[litellm]", +# "ragbits-core[litellm]", # ] # /// import asyncio diff --git a/packages/ragbits-core/examples/prompt_example.py b/packages/ragbits-core/examples/prompt_example.py index 64c37c36..437e833c 100644 --- a/packages/ragbits-core/examples/prompt_example.py +++ b/packages/ragbits-core/examples/prompt_example.py @@ -1,7 +1,7 @@ # /// script # requires-python = ">=3.10" # dependencies = [ -# "ragbits", +# "ragbits-core", # ] # /// from pydantic import BaseModel diff --git a/packages/ragbits-core/pyproject.toml b/packages/ragbits-core/pyproject.toml index 69364e40..b61e83d7 100644 --- a/packages/ragbits-core/pyproject.toml +++ b/packages/ragbits-core/pyproject.toml @@ -1,12 +1,12 @@ [project] -name = "ragbits" +name = "ragbits-core" version = "0.1.0" description = "Building blocks for rapid development of GenAI applications" readme = "README.md" requires-python = ">=3.10" license = "MIT" authors = [ - { name = "deepsense.ai", email = "contact@deepsense.ai"} + { name = "deepsense.ai", email = "ragbits@deepsense.ai"} ] keywords = [ "Retrieval Augmented Generation", @@ -18,7 +18,7 @@ keywords = [ "Prompt Management" ] classifiers = [ - "Development Status :: 1 - Planning", + "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", @@ -29,7 +29,6 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries :: Python Modules", - "Private :: Do Not Upload" ] dependencies = [ "jinja2>=3.1.4", diff --git a/packages/ragbits-document-search/examples/simple_text.py b/packages/ragbits-document-search/examples/simple_text.py index c0a3fa44..16c116cc 100644 --- a/packages/ragbits-document-search/examples/simple_text.py +++ b/packages/ragbits-document-search/examples/simple_text.py @@ -2,7 +2,7 @@ # requires-python = ">=3.10" # dependencies = [ # "ragbits-document-search", -# "ragbits[litellm]", +# "ragbits-core[litellm]", # ] # /// import asyncio diff --git a/packages/ragbits-document-search/pyproject.toml b/packages/ragbits-document-search/pyproject.toml index 83ae5304..996e6baf 100644 --- a/packages/ragbits-document-search/pyproject.toml +++ b/packages/ragbits-document-search/pyproject.toml @@ -6,7 +6,7 @@ readme = "README.md" requires-python = ">=3.10" license = "MIT" authors = [ - { name = "deepsense.ai", email = "contact@deepsense.ai"} + { name = "deepsense.ai", email = "ragbits@deepsense.ai"} ] keywords = [ "Retrieval Augmented Generation", @@ -18,7 +18,7 @@ keywords = [ "Document Search" ] classifiers = [ - "Development Status :: 1 - Planning", + "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", @@ -29,13 +29,12 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries :: Python Modules", - "Private :: Do Not Upload" ] dependencies = [ "numpy~=1.24.0", - "ragbits", "unstructured>=0.15.13", "unstructured-client>=0.26.0", + "ragbits-core==0.1.0" ] [project.optional-dependencies] @@ -54,7 +53,7 @@ dev-dependencies = [ ] [tool.uv.sources] -ragbits = { workspace = true } +ragbits-core = { workspace = true } [build-system] requires = ["hatchling"] diff --git a/packages/ragbits/README.md b/packages/ragbits/README.md new file mode 100644 index 00000000..130dbdf7 --- /dev/null +++ b/packages/ragbits/README.md @@ -0,0 +1 @@ +# Ragbits diff --git a/packages/ragbits/pyproject.toml b/packages/ragbits/pyproject.toml new file mode 100644 index 00000000..d2dd7ab7 --- /dev/null +++ b/packages/ragbits/pyproject.toml @@ -0,0 +1,50 @@ +[project] +name = "ragbits" +version = "0.1.0" +description = "Building blocks for rapid development of GenAI applications" +readme = "README.md" +requires-python = ">=3.10" +license = "MIT" +authors = [ + { name = "deepsense.ai", email = "ragbits@deepsense.ai"} +] +keywords = [ + "Retrieval Augmented Generation", + "RAG", + "Large Language Models", + "LLMs", + "Generative AI", + "GenAI", + "Prompt Management" +] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "ragbits-document-search==0.1.0", + "ragbits-cli==0.1.0", + "ragbits-core==0.1.0" +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/ragbits"] + +[tool.pytest.ini_options] +asyncio_mode = "auto" diff --git a/pyproject.toml b/pyproject.toml index 4130adb5..e2336548 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Ragbits development workspace" readme = "README.md" requires-python = ">=3.10" dependencies = [ - "ragbits[litellm,local,lab,chromadb]", + "ragbits-core[litellm,local,lab,chromadb]", "ragbits-document-search[gcs]", "ragbits-cli" ] @@ -21,7 +21,7 @@ dev-dependencies = [ ] [tool.uv.sources] -ragbits = { workspace = true } +ragbits-core = { workspace = true } ragbits-document-search = { workspace = true } ragbits-cli = { workspace = true } diff --git a/scripts/update_ragbits_package.py b/scripts/update_ragbits_package.py index 85c9758f..b78f4235 100644 --- a/scripts/update_ragbits_package.py +++ b/scripts/update_ragbits_package.py @@ -147,9 +147,9 @@ def run(pkg_name: Optional[str] = typer.Argument(None), update_type: Optional[st for pkg in [pkg for pkg in packages if pkg != "ragbits-core"]: pkg_pyproject = tomlkit.parse((PACKAGES_DIR / pkg / "pyproject.toml").read_text()) pkg_pyproject["project"]["dependencies"] = [ - dep for dep in pkg_pyproject["project"]["dependencies"] if "ragbits" not in dep + dep for dep in pkg_pyproject["project"]["dependencies"] if "ragbits-core" not in dep ] - pkg_pyproject["project"]["dependencies"].append(f"ragbits=={new_ragbits_version}") + pkg_pyproject["project"]["dependencies"].append(f"ragbits-core=={new_ragbits_version}") _update_pkg_version(pkg, pkg_pyproject, update_type=casted_update_type) else: diff --git a/uv.lock b/uv.lock index 8279842a..606485be 100644 --- a/uv.lock +++ b/uv.lock @@ -9,8 +9,8 @@ resolution-markers = [ [manifest] members = [ - "ragbits", "ragbits-cli", + "ragbits-core", "ragbits-document-search", "ragbits-workspace", ] @@ -608,7 +608,7 @@ wheels = [ [package.optional-dependencies] toml = [ - { name = "tomli", marker = "python_full_version == '3.11'" }, + { name = "tomli", marker = "python_full_version <= '3.11'" }, ] [[package]] @@ -2843,16 +2843,42 @@ wheels = [ [[package]] name = "ragbits" +version = "0.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/f7/4dfc757e4d7adff14a8fad9989f47a88c063ca88456d0525d0d5d3593f54/ragbits-0.0.1.tar.gz", hash = "sha256:673b663730ee2ef0d2813ffe1d1619f3ce5042748a4c02c094c787f499f4c886", size = 1378 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/96/e1/2cef0ba62827617ebcd183ebe3a7b3ca7cfee8d45f99c953b4db005b9a88/ragbits-0.0.1-py2.py3-none-any.whl", hash = "sha256:101ef35803f4b78b600b7381cf8f3c86f18018fa54156055d9b6e95f708475bf", size = 1354 }, +] + +[[package]] +name = "ragbits-cli" +version = "0.1.0" +source = { editable = "packages/ragbits-cli" } +dependencies = [ + { name = "ragbits-core" }, + { name = "typer" }, +] + +[package.metadata] +requires-dist = [ + { name = "ragbits-core", editable = "packages/ragbits-core" }, + { name = "typer", specifier = ">=0.12.5" }, +] + +[[package]] +name = "ragbits-core" version = "0.1.0" source = { editable = "packages/ragbits-core" } dependencies = [ { name = "jinja2" }, { name = "pydantic" }, - { name = "ragbits-cli" }, { name = "typer" }, ] [package.optional-dependencies] +chromadb = [ + { name = "chromadb" }, +] lab = [ { name = "gradio" }, ] @@ -2876,12 +2902,12 @@ dev = [ [package.metadata] requires-dist = [ + { name = "chromadb", marker = "extra == 'chromadb'", specifier = "~=0.4.24" }, { name = "gradio", marker = "extra == 'lab'", specifier = "~=4.44.0" }, { name = "jinja2", specifier = ">=3.1.4" }, { name = "litellm", marker = "extra == 'litellm'", specifier = "~=1.46.0" }, { name = "numpy", marker = "extra == 'local'", specifier = "~=1.24.0" }, { name = "pydantic", specifier = ">=2.9.1" }, - { name = "ragbits-cli", editable = "packages/ragbits-cli" }, { name = "torch", marker = "extra == 'local'", specifier = "~=2.2.1" }, { name = "transformers", marker = "extra == 'local'", specifier = "~=4.44.2" }, { name = "typer", specifier = "~=0.12.5" }, @@ -2896,32 +2922,18 @@ dev = [ { name = "pytest-cov", specifier = "~=5.0.0" }, ] -[[package]] -name = "ragbits-cli" -version = "0.1.0" -source = { editable = "packages/ragbits-cli" } -dependencies = [ - { name = "typer" }, -] - -[package.metadata] -requires-dist = [{ name = "typer", specifier = ">=0.12.5" }] - [[package]] name = "ragbits-document-search" version = "0.1.0" source = { editable = "packages/ragbits-document-search" } dependencies = [ { name = "numpy" }, - { name = "ragbits" }, + { name = "ragbits-core" }, { name = "unstructured" }, { name = "unstructured-client" }, ] [package.optional-dependencies] -chromadb = [ - { name = "chromadb" }, -] gcs = [ { name = "gcloud-aio-storage" }, ] @@ -2933,15 +2945,14 @@ dev = [ { name = "pytest" }, { name = "pytest-asyncio" }, { name = "pytest-cov" }, - { name = "ragbits", extra = ["litellm", "local"] }, + { name = "ragbits" }, ] [package.metadata] requires-dist = [ - { name = "chromadb", marker = "extra == 'chromadb'", specifier = "~=0.4.24" }, { name = "gcloud-aio-storage", marker = "extra == 'gcs'", specifier = "~=9.3.0" }, { name = "numpy", specifier = "~=1.24.0" }, - { name = "ragbits", editable = "packages/ragbits-core" }, + { name = "ragbits-core", editable = "packages/ragbits-core" }, { name = "unstructured", specifier = ">=0.15.13" }, { name = "unstructured-client", specifier = ">=0.26.0" }, ] @@ -2953,7 +2964,7 @@ dev = [ { name = "pytest", specifier = "~=8.3.3" }, { name = "pytest-asyncio", specifier = "~=0.24.0" }, { name = "pytest-cov", specifier = "~=5.0.0" }, - { name = "ragbits", extras = ["litellm", "local"], editable = "packages/ragbits-core" }, + { name = "ragbits", extras = ["litellm", "local"] }, ] [[package]] @@ -2961,9 +2972,9 @@ name = "ragbits-workspace" version = "0.1.0" source = { virtual = "." } dependencies = [ - { name = "ragbits", extra = ["lab", "litellm", "local"] }, { name = "ragbits-cli" }, - { name = "ragbits-document-search", extra = ["chromadb", "gcs"] }, + { name = "ragbits-core", extra = ["chromadb", "lab", "litellm", "local"] }, + { name = "ragbits-document-search", extra = ["gcs"] }, ] [package.dev-dependencies] @@ -2977,9 +2988,9 @@ dev = [ [package.metadata] requires-dist = [ - { name = "ragbits", extras = ["litellm", "local", "lab"], editable = "packages/ragbits-core" }, { name = "ragbits-cli", editable = "packages/ragbits-cli" }, - { name = "ragbits-document-search", extras = ["chromadb", "gcs"], editable = "packages/ragbits-document-search" }, + { name = "ragbits-core", extras = ["litellm", "local", "lab", "chromadb"], editable = "packages/ragbits-core" }, + { name = "ragbits-document-search", extras = ["gcs"], editable = "packages/ragbits-document-search" }, ] [package.metadata.requires-dev]