Skip to content

Commit

Permalink
PoC for Ragna meta package
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Jul 4, 2024
1 parent 9776ec5 commit 71f3d6d
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 18 deletions.
35 changes: 35 additions & 0 deletions meta-package/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[build-system]
requires = [
"setuptools>=64",
"setuptools_scm>=8",
"tomlkit; python_version<'3.11'"
]
build-backend = "setuptools.build_meta"

[project]
name = "Ragna"
description = "RAG orchestration framework"
license = {file = "LICENSE"}
authors = [
{ name = "Ragna Development Team", email = "[email protected]" },
]
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.9"
dynamic = ["version", "dependencies"]

[project.urls]
Homepage = "https://ragna.chat"
Documentation = "https://ragna.chat"
Changelog = "https://ragna.chat/en/stable/references/release-notes/"
Repository = "https://github.com/Quansight/ragna"

[tool.setuptools_scm]
root = ".."
version_scheme = "release-branch-semver"
local_scheme = "node-and-date"
22 changes: 22 additions & 0 deletions meta-package/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from pathlib import Path

from setuptools import setup
from setuptools_scm import Configuration, get_version

HERE = Path(__file__).parent
PROJECT_ROOT = HERE.parent


config = Configuration.from_file(PROJECT_ROOT / "pyproject.toml")
version = get_version(
root=str(PROJECT_ROOT),
version_scheme=config.version_scheme,
local_scheme=config.local_scheme,
)
install_requires = [f"{config.dist_name}=={version}"]

with open(PROJECT_ROOT / "requirements-optional.txt") as file:
install_requires.extend(file.read().splitlines())


setup(install_requires=install_requires)
23 changes: 5 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[build-system]
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
"setuptools>=64",
"setuptools_scm>=8",
"tomlkit; python_version<'3.11'",
]
build-backend = "setuptools.build_meta"

[project]
name = "Ragna"
name = "ragna-base"
description = "RAG orchestration framework"
license = {file = "LICENSE"}
authors = [
Expand Down Expand Up @@ -50,24 +51,10 @@ Documentation = "https://ragna.chat"
Changelog = "https://ragna.chat/en/stable/references/release-notes/"
Repository = "https://github.com/Quansight/ragna"

[project.optional-dependencies]
# to update the array below, run scripts/update_optional_dependencies.py
all = [
"chromadb>=0.4.13",
"httpx_sse",
"ijson",
"lancedb>=0.2",
"pyarrow",
"pymupdf>=1.23.6",
"python-docx",
"python-pptx",
"tiktoken",
]

[tool.setuptools_scm]
write_to = "ragna/_version.py"
version_scheme = "release-branch-semver"
local_scheme = "node-and-timestamp"
local_scheme = "node-and-date"

[project.scripts]
ragna = "ragna.__main__:app"
Expand Down
9 changes: 9 additions & 0 deletions requirements-optional.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
chromadb>=0.4.13
httpx_sse
ijson
lancedb>=0.2
pyarrow
pymupdf>=1.23.6
python-docx
python-pptx
tiktoken

0 comments on commit 71f3d6d

Please sign in to comment.