Skip to content

Commit

Permalink
Modularize with extras
Browse files Browse the repository at this point in the history
  • Loading branch information
cbornet committed Dec 4, 2023
1 parent 0936ed8 commit 4e94a90
Show file tree
Hide file tree
Showing 20 changed files with 11 additions and 4,640 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --no-root
- name: Run ragstack-ai-langchain unit tests
run: |
poetry run tox -c libs/ragstack-ai-langchain
- name: Run ragstack-ai-llamaindex unit tests
run: |
poetry run tox -c libs/ragstack-ai-llamaindex
poetry install --no-root --all-extras
- name: Run ragstack-ai unit tests
run: |
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/release-ragstack-langchain.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/release-ragstack-llamaindex.yml

This file was deleted.

20 changes: 0 additions & 20 deletions libs/ragstack-ai-langchain/README.md

This file was deleted.

2,151 changes: 0 additions & 2,151 deletions libs/ragstack-ai-langchain/poetry.lock

This file was deleted.

23 changes: 0 additions & 23 deletions libs/ragstack-ai-langchain/pyproject.toml

This file was deleted.

8 changes: 0 additions & 8 deletions libs/ragstack-ai-langchain/ragstack_ai_langchain/__init__.py

This file was deleted.

Empty file.
9 changes: 0 additions & 9 deletions libs/ragstack-ai-langchain/tests/test_ragstack.py

This file was deleted.

13 changes: 0 additions & 13 deletions libs/ragstack-ai-langchain/tox.ini

This file was deleted.

20 changes: 0 additions & 20 deletions libs/ragstack-ai-llamaindex/README.md

This file was deleted.

2,288 changes: 0 additions & 2,288 deletions libs/ragstack-ai-llamaindex/poetry.lock

This file was deleted.

21 changes: 0 additions & 21 deletions libs/ragstack-ai-llamaindex/pyproject.toml

This file was deleted.

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions libs/ragstack-ai-llamaindex/tests/test_ragstack_llamaindex.py

This file was deleted.

14 changes: 0 additions & 14 deletions libs/ragstack-ai-llamaindex/tox.ini

This file was deleted.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
ragstack-ai-langchain = { path = "libs/ragstack-ai-langchain", develop = true }
ragstack-ai-llamaindex = { path = "libs/ragstack-ai-llamaindex", develop = true }
astrapy = "~0.6.2"
cassio = "~0.1.3"
unstructured = { version = "^0.10", optional = true }
langchain = { version = "0.0.343", extras = ["openai"], optional = true }
llama-index = { version = "0.9.11", optional = true }

[tool.poetry.group.test.dependencies]
pytest = "*"
nbmake = "*"
tox = "*"

[tool.poetry.extras]
langchain = ["langchain", "unstructured"]
llama-index = ["llama-index"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down
2 changes: 1 addition & 1 deletion ragstack-e2e-tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ huggingface-hub = "^0.19.4"
# From LangChain optional deps, needed by WebBaseLoader
beautifulsoup4 = "^4"

ragstack-ai = { path = "../", develop = false }
ragstack-ai = { path = "../", extras = ["langchain"], develop = false }

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 0 additions & 2 deletions tests/unit-tests/test_ragstack.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
def test_import():
from ragstack_ai_langchain import __version__ # noqa
from ragstack_ai_llamaindex import __version__ # noqa
from llama_index.vector_stores import AstraDBVectorStore, CassandraVectorStore # noqa
from langchain.vectorstores import AstraDB # noqa
import langchain_core # noqa
Expand Down

0 comments on commit 4e94a90

Please sign in to comment.