diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml deleted file mode 100644 index 37892586f..000000000 --- a/.github/workflows/publish_to_pypi.yml +++ /dev/null @@ -1,41 +0,0 @@ -# GitHub Actions Workflow: Publish to PyPI -# This workflow automates the process of testing and publishing Py-Astra to PyPI. -# This workflow: -# 1. Runs unit tests using the test.yml workflow -# 2. Publishes the package to PyPI given the unit tests passed - -name: Publish to PyPI - -on: - workflow_dispatch: - -permissions: - contents: read - -jobs: - Run-tests: - name: Run tests - uses: ./.github/workflows/test.yml - secrets: inherit - - Publish-to-PyPi: - runs-on: ubuntu-latest - environment: PyPI - needs: - - Run-tests - - steps: - - uses: actions/checkout@v3 - - - name: Install Hatch - run: pip install hatch - - - name: Build package - run: hatch build - -# TODO publish once package ready -# - name: Publish astra-haystack -# env: -# HATCH_INDEX_USER: __token__ -# HATCH_INDEX_AUTH: ${{ secrets.PYPI_ASTRA_HAYSTACK_TOKEN }} -# run: hatch publish -y \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 8da15a4d3..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: test - -on: - push: - branches: - - main - - '2.0-main' - pull_request: - workflow_call: - -concurrency: - group: test-${{ 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] - python-version: ['3.9', '3.10'] - - steps: - - name: Support longpaths - if: matrix.os == 'windows-latest' - run: git config --system core.longpaths true - - - uses: actions/checkout@v3 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Hatch - run: pip install --upgrade hatch - - - name: Install Black - run: pip install --upgrade black - - - name: Install Ruff - run: pip install --upgrade ruff - - - name: Lint Black - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: black --check . - - - name: Lint Ruff - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: ruff --select E501 T201 PLW2901 --quiet --ignore E501 . - - - name: Install Dependencies - run: pip install -r requirements.txt - - - name: Install astra-haystack - run: pip install -e . - - - name: Run unit tests - env: - ASTRA_DB_ID: ${{ secrets.ASTRA_DB_ID }} - ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} - run: pytest -ssv --cov-report xml:coverage.xml --cov="haystack" tests/${{ matrix.topic }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index be1352870..000000000 --- a/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.idea/ -src/__pycache__/ -src/astra_store/__pycache__/ -tests/__pycache__/ -src/astra_store/temp-astra-haystack.py -coverage.xml -.coverage \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 7a6f256e0..000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,34 +0,0 @@ -repos: -- repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - name: isort - entry: isort - require_serial: true - language: python - language_version: python3.10 - types: [python] - args: [ "--sp=pyproject.toml" ] -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 - hooks: - - id: trailing-whitespace # Trim trailing whitespace - exclude: ^notebooks/ - args: ["--markdown-linebreak-ext=md"] - - id: check-yaml # Attempt to load all yaml files to verify syntax - - id: check-merge-conflict # Check for files that contain merge conflict strings - - id: end-of-file-fixer # Make sure files end in a newline and only a newline - exclude_types: - - text - - id: fix-encoding-pragma # Remove the coding pragma: # -*- coding: utf-8 -*- - args: ["--remove"] - - id: mixed-line-ending # Replace or check mixed line ending - args: ["--fix=lf"] - - id: check-toml # check if toml files are parseable -- repo: https://github.com/ambv/black - rev: 23.1.0 - hooks: - - id: black - language_version: python3.10 - args: ["--config=pyproject.toml"] diff --git a/LICENSE b/integrations/astra/LICENSE similarity index 100% rename from LICENSE rename to integrations/astra/LICENSE diff --git a/README.md b/integrations/astra/README.md similarity index 100% rename from README.md rename to integrations/astra/README.md diff --git a/examples/data/usr_01.txt b/integrations/astra/examples/data/usr_01.txt similarity index 100% rename from examples/data/usr_01.txt rename to integrations/astra/examples/data/usr_01.txt diff --git a/examples/example.py b/integrations/astra/examples/example.py similarity index 100% rename from examples/example.py rename to integrations/astra/examples/example.py diff --git a/examples/pipeline_example.py b/integrations/astra/examples/pipeline_example.py similarity index 100% rename from examples/pipeline_example.py rename to integrations/astra/examples/pipeline_example.py diff --git a/pyproject.toml b/integrations/astra/pyproject.toml similarity index 100% rename from pyproject.toml rename to integrations/astra/pyproject.toml diff --git a/requirements.txt b/integrations/astra/requirements.txt similarity index 100% rename from requirements.txt rename to integrations/astra/requirements.txt diff --git a/src/astra_store/__about__.py b/integrations/astra/src/astra_store/__about__.py similarity index 100% rename from src/astra_store/__about__.py rename to integrations/astra/src/astra_store/__about__.py diff --git a/src/astra_store/__init__.py b/integrations/astra/src/astra_store/__init__.py similarity index 100% rename from src/astra_store/__init__.py rename to integrations/astra/src/astra_store/__init__.py diff --git a/src/astra_store/astra_client.py b/integrations/astra/src/astra_store/astra_client.py similarity index 100% rename from src/astra_store/astra_client.py rename to integrations/astra/src/astra_store/astra_client.py diff --git a/src/astra_store/document_store.py b/integrations/astra/src/astra_store/document_store.py similarity index 100% rename from src/astra_store/document_store.py rename to integrations/astra/src/astra_store/document_store.py diff --git a/src/astra_store/errors.py b/integrations/astra/src/astra_store/errors.py similarity index 100% rename from src/astra_store/errors.py rename to integrations/astra/src/astra_store/errors.py diff --git a/src/astra_store/filters.py b/integrations/astra/src/astra_store/filters.py similarity index 100% rename from src/astra_store/filters.py rename to integrations/astra/src/astra_store/filters.py diff --git a/src/astra_store/retriever.py b/integrations/astra/src/astra_store/retriever.py similarity index 100% rename from src/astra_store/retriever.py rename to integrations/astra/src/astra_store/retriever.py diff --git a/tests/__init__.py b/integrations/astra/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to integrations/astra/tests/__init__.py diff --git a/tests/test_document_store.py b/integrations/astra/tests/test_document_store.py similarity index 100% rename from tests/test_document_store.py rename to integrations/astra/tests/test_document_store.py