-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
265 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# This workflow comes from https://github.com/ofek/hatch-mypyc | ||
# https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml | ||
name: Test / astra | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
pull_request: | ||
paths: | ||
- 'integrations/astra/**' | ||
- '.github/workflows/astra.yml' | ||
|
||
defaults: | ||
run: | ||
working-directory: integrations/astra | ||
|
||
concurrency: | ||
group: astra-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
run: | ||
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.9', '3.10'] | ||
|
||
steps: | ||
- name: Support longpaths | ||
if: matrix.os == 'windows-latest' | ||
working-directory: . | ||
run: git config --system core.longpaths true | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Hatch | ||
run: pip install --upgrade hatch | ||
|
||
- name: Lint | ||
if: matrix.python-version == '3.9' && runner.os == 'Linux' | ||
run: hatch run lint:all | ||
|
||
- name: Run tests | ||
run: hatch run cov |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
haystack-ai==2.0.0b4 | ||
sentence_transformers==2.2.2 | ||
openai==1.6.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "astra-store" | ||
name = "astra-haystack" | ||
dynamic = ["version"] | ||
description = '' | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
license = "Apache-2.0" | ||
keywords = [] | ||
authors = [ | ||
{ name = "John Doe", email = "[email protected]" }, | ||
{ name = "Anant Corporation", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
|
@@ -25,18 +25,22 @@ classifiers = [ | |
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [ | ||
# we distribute the preview version of Haystack 2.0 under the package "haystack-ai" | ||
"haystack-ai", | ||
"typing_extensions", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/Anant/astra-haystack/tree/main#readme" | ||
Issues = "https://github.com/Anant/astra-haystack/issues" | ||
Source = "https://github.com/Anant/astra-haystack" | ||
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/astra#readme" | ||
Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" | ||
Source = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/astra" | ||
|
||
[tool.hatch.version] | ||
path = "src/astra_store/__about__.py" | ||
source = "vcs" | ||
tag-pattern = 'integrations\/astra-v(?P<version>.*)' | ||
|
||
[tool.hatch.version.raw-options] | ||
root = "../.." | ||
git_describe_command = 'git describe --tags --match="integrations/astra-v[0-9]*"' | ||
|
||
[tool.hatch.envs.default] | ||
dependencies = [ | ||
|
@@ -66,7 +70,7 @@ dependencies = [ | |
"ruff>=0.0.243", | ||
] | ||
[tool.hatch.envs.lint.scripts] | ||
typing = "mypy --install-types --non-interactive {args:src/astra_store tests}" | ||
typing = "mypy --install-types --non-interactive {args:src/astra_haystack tests}" | ||
style = [ | ||
"ruff {args:.}", | ||
"black --check --diff {args:.}", | ||
|
@@ -140,7 +144,7 @@ unfixable = [ | |
] | ||
|
||
[tool.ruff.isort] | ||
known-first-party = ["astra_store"] | ||
known-first-party = ["astra_haystack"] | ||
|
||
[tool.ruff.flake8-tidy-imports] | ||
ban-relative-imports = "all" | ||
|
@@ -150,15 +154,12 @@ ban-relative-imports = "all" | |
"tests/**/*" = ["PLR2004", "S101", "TID252"] | ||
|
||
[tool.coverage.run] | ||
source_pkgs = ["astra_store", "tests"] | ||
source_pkgs = ["astra_haystack", "tests"] | ||
branch = true | ||
parallel = true | ||
omit = [ | ||
"src/astra_store/__about__.py", | ||
] | ||
|
||
[tool.coverage.paths] | ||
astra_store = ["src/astra_store", "*/astra-store/src/astra_store"] | ||
astra_haystack = ["src/astra_haystack", "*/astra-store/src/astra_haystack"] | ||
tests = ["tests", "*/astra-store/tests"] | ||
|
||
[tool.coverage.report] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-FileCopyrightText: 2023-present Anant Corporation <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
from astra_haystack.document_store import AstraDocumentStore | ||
|
||
__all__ = ["AstraDocumentStore"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.