Skip to content

Commit

Permalink
Add KG tests (#1351) (#1360)
Browse files Browse the repository at this point in the history
* Add KG tests (#1351)

* cli tests

* add sdk tests

* typo fix

* change workflow ordering

* add collection integration tests (#1352)

* bump pkg

* remove workflows

* fix sdk test port

* fix delete collection return check

* Fix document info serialization (#1353)

* Update integration-test-workflow-debian.yml

* pre-commit

* slightly modify

* up

* up

* smaller file

* up

* typo, change order

* up

* up

* change order

---------

Co-authored-by: emrgnt-cmplxty <[email protected]>
Co-authored-by: emrgnt-cmplxty <[email protected]>
Co-authored-by: Nolan Tremelling <[email protected]>

* add graphrag docs (#1362)

* add documentation

* up

* Update js/sdk/src/models.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* pre-commit

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Concurrent index creation, allow -1 for paginated entries (#1363)

* update webdev-template for current next.js and r2r-js sdk (#1218)

Co-authored-by: Simeon <[email protected]>

* Feature/extend integration tests rebased (#1361)

* cleanups

* add back overzealous edits

* extend workflows

* fix full setup

* simplify cli

* add ymls

* rename to light

* try again

* start light

* add cli tests

* fix

* fix

* testing..

* trying complete matrix testflow

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* up

* up

* up

* All actions

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* try offic pgvec formula

* sudo make

* sudo make

* push and pray

* push and pray

* add new actions

* add new actions

* docker push & pray

* inspect manifests during launch

* inspect manifests during launch

* inspect manifests during launch

* inspect manifests during launch

* setup docker

* setup docker

* fix default

* fix default

* Feature/rebase to r2r vars (#1364)

* cleanups

* add back overzealous edits

* extend workflows

* fix full setup

* simplify cli

* add ymls

* rename to light

* try again

* start light

* add cli tests

* fix

* fix

* testing..

* trying complete matrix testflow

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* cleanup matrix logic

* up

* up

* up

* All actions

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* rename to runner

* try offic pgvec formula

* sudo make

* sudo make

* push and pray

* push and pray

* add new actions

* add new actions

* docker push & pray

* inspect manifests during launch

* inspect manifests during launch

* inspect manifests during launch

* inspect manifests during launch

* setup docker

* setup docker

* fix default

* fix default

* make changes

* update the windows workflow

* update the windows workflow

* remove extra workflows for now

* bump pkg

---------

Co-authored-by: Shreyas Pimpalgaonkar <[email protected]>
Co-authored-by: Nolan Tremelling <[email protected]>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: FutureProofTechOps <[email protected]>
Co-authored-by: Simeon <[email protected]>
  • Loading branch information
6 people authored Oct 9, 2024
1 parent 0a769bc commit 4beb826
Show file tree
Hide file tree
Showing 82 changed files with 2,243 additions and 730 deletions.
24 changes: 24 additions & 0 deletions .github/actions/run-cli-graphrag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Run SDK Ingestion Tests'
description: 'Runs SDK ingestion tests for R2R'
runs:
using: "composite"
steps:
- name: Ingest sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_remove_all_files_and_ingest_sample_file_cli

- name: Create the graph (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_kg_create_graph_sample_file_cli

- name: Enrich the graph (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_kg_enrich_graph_sample_file_cli

- name: Search over the graph (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_kg_search_sample_file_cli
29 changes: 29 additions & 0 deletions .github/actions/run-cli-ingestion-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Run CLI Ingestion Tests'
description: 'Runs CLI retrieval tests for R2R'
runs:
using: "composite"
steps:
- name: Ingest sample file (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_ingest_sample_file_cli

- name: Document overview (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_document_overview_sample_file_cli

- name: Document chunks (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_document_chunks_sample_file_cli

- name: Delete and reingest (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_delete_and_reingest_sample_file_cli

- name: Update file (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_update_file_cli
25 changes: 25 additions & 0 deletions .github/actions/run-cli-retrieval-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Run CLI Retrieval Tests'
description: 'Runs CLI retrieval tests for R2R'
runs:
using: "composite"
steps:
# Ingest the sample file via the CLI for later tests
- name: Ingest sample file (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_ingest_sample_file_cli

- name: Vector search the sample file (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_vector_search_sample_file_filter_cli

- name: RAG over sample file (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_rag_response_sample_file_cli

- name: RAG streaming response (CLI)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_cli.py test_rag_response_stream_sample_file_cli
49 changes: 49 additions & 0 deletions .github/actions/run-sdk-auth-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Run SDK Auth Tests'
description: 'Runs SDK authentication tests for R2R'
runs:
using: "composite"
steps:
- name: User registration and login
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_registration_and_login

- name: Duplicate user registration
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_duplicate_user_registration

- name: Token refresh
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_token_refresh

- name: User document management
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_document_management

- name: User search and RAG
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_search_and_rag

- name: User password management
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_password_management

- name: User profile management
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_profile_management

- name: User overview
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_overview

- name: User logout
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_logout
84 changes: 84 additions & 0 deletions .github/actions/run-sdk-collections-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: 'Run SDK Collections Tests'
description: 'Runs SDK collections tests for R2R'
runs:
using: "composite"
steps:
- name: Ingest sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_ingest_sample_file_sdk

- name: User creates collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_creates_collection

- name: User updates collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_updates_collection

- name: User lists collections
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_lists_collections

- name: User collection document management
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_collection_document_management

- name: User removes document from collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_removes_document_from_collection

- name: User lists documents in collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_lists_documents_in_collection

- name: Pagination and filtering
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_pagination_and_filtering

- name: Advanced collection management
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_advanced_collection_management

- name: User gets collection details
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_gets_collection_details

- name: User adds user to collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_adds_user_to_collection

- name: User removes user from collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_removes_user_from_collection

- name: User lists users in collection
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_lists_users_in_collection

- name: User gets collections for user
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_gets_collections_for_user

- name: User gets collections for document
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_gets_collections_for_document

- name: User permissions
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_user_permissions
24 changes: 24 additions & 0 deletions .github/actions/run-sdk-graphrag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Run SDK Ingestion Tests'
description: 'Runs SDK ingestion tests for R2R'
runs:
using: "composite"
steps:
- name: Ingest sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_remove_all_files_and_ingest_sample_file_sdk

- name: Create the graph (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_kg_create_graph_sample_file_sdk

- name: Enrich the graph (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_kg_enrich_graph_sample_file_sdk

- name: Search over the graph (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_kg_search_sample_file_sdk
34 changes: 34 additions & 0 deletions .github/actions/run-sdk-ingestion-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Run SDK Ingestion Tests'
description: 'Runs SDK ingestion tests for R2R'
runs:
using: "composite"
steps:
- name: Ingest sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_ingest_sample_file_sdk

- name: Reingest sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_reingest_sample_file_sdk

- name: Document overview (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_document_overview_sample_file_sdk

- name: Document chunks (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_document_chunks_sample_file_sdk

- name: Delete and reingest (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_delete_and_reingest_sample_file_sdk

- name: Ingest sample file with config (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_ingest_sample_file_with_config_sdk
25 changes: 25 additions & 0 deletions .github/actions/run-sdk-retrieval-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Run SDK Retrieval Tests'
description: 'Runs SDK retrieval tests for R2R'
runs:
using: "composite"
steps:
# Ingest the sample file via the SDK for later tests
- name: Ingest sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_ingest_sample_file_sdk

- name: Vector search sample file filter (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_vector_search_sample_file_filter_sdk

- name: Hybrid search sample file filter (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_hybrid_search_sample_file_filter_sdk

- name: RAG response sample file (SDK)
working-directory: ./py
shell: bash
run: poetry run python tests/integration/runner_sdk.py test_rag_response_sample_file_sdk
27 changes: 27 additions & 0 deletions .github/actions/setup-docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Setup Docker'
description: 'Sets up Docker for running R2R'
inputs:
os:
description: 'Operating system'
required: true
docker_username:
description: 'Docker Hub username'
required: true
docker_password:
description: 'Docker Hub password or token'
required: true
runs:
using: "composite"
steps:
- name: Set up Docker
uses: docker-practice/actions-setup-docker@master
with:
docker_version: 20.10
docker_buildx: true
docker_nightly: true

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
Loading

0 comments on commit 4beb826

Please sign in to comment.