Refactor CI workflows to replace Poetry with uv for dependency management and execution

This commit is contained in:
Daulet Amirkhanov 2025-08-14 15:04:53 +01:00
parent 91d0d38e43
commit c60627306f
15 changed files with 76 additions and 83 deletions

View file

@ -1,5 +1,5 @@
name: cognee-setup name: cognee-setup
description: "Sets up Python, installs Poetry, loads venv from cache, and installs dependencies for Cognee." description: "Sets up Python, installs uv, and installs dependencies for Cognee."
inputs: inputs:
python-version: python-version:
@ -16,18 +16,11 @@ runs:
with: with:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Install Poetry - name: Install uv
shell: bash uses: astral-sh/setup-uv@v4
run: | with:
python -m pip install --upgrade pip enable-cache: true
pip install poetry
- name: Rebuild Poetry lock file
shell: bash
run: |
rm poetry.lock
poetry lock
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
run: poetry install --no-interaction -E api -E docs -E evals -E gemini -E codegraph -E ollama -E dev -E neo4j run: uv sync --extra api --extra docs --extra evals --extra gemini --extra codegraph --extra ollama --extra dev --extra neo4j

View file

@ -98,7 +98,7 @@ jobs:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Run Unit Tests - name: Run Unit Tests
run: poetry run pytest cognee/tests/unit/ run: uv run pytest cognee/tests/unit/
integration-tests: integration-tests:
name: Run Integration Tests name: Run Integration Tests
@ -115,7 +115,7 @@ jobs:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Run Integration Tests - name: Run Integration Tests
run: poetry run pytest cognee/tests/integration/ run: uv run pytest cognee/tests/integration/
simple-examples: simple-examples:
name: Run Simple Examples name: Run Simple Examples
@ -144,7 +144,7 @@ jobs:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Run Simple Examples - name: Run Simple Examples
run: poetry run python ./examples/python/simple_example.py run: uv run python ./examples/python/simple_example.py
simple-examples-baml: simple-examples-baml:
name: Run Simple Examples BAML name: Run Simple Examples BAML
@ -180,7 +180,7 @@ jobs:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Run Simple Examples - name: Run Simple Examples
run: poetry run python ./examples/python/simple_example.py run: uv run python ./examples/python/simple_example.py
graph-tests: graph-tests:
name: Run Basic Graph Tests name: Run Basic Graph Tests
@ -209,4 +209,4 @@ jobs:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Run Graph Tests - name: Run Graph Tests
run: poetry run python ./examples/python/code_graph_example.py --repo_path ./cognee/tasks/graph run: uv run python ./examples/python/code_graph_example.py --repo_path ./cognee/tasks/graph

View file

@ -56,7 +56,7 @@ jobs:
- name: Install Neo4j extra - name: Install Neo4j extra
run: | run: |
poetry install -E neo4j uv sync --extra neo4j
- name: Run Neo4j Example - name: Run Neo4j Example
env: env:
@ -74,7 +74,7 @@ jobs:
GRAPH_DATABASE_USERNAME: "neo4j" GRAPH_DATABASE_USERNAME: "neo4j"
GRAPH_DATABASE_PASSWORD: ${{ secrets.NEO4J_API_KEY }} GRAPH_DATABASE_PASSWORD: ${{ secrets.NEO4J_API_KEY }}
run: | run: |
poetry run python examples/database_examples/neo4j_example.py uv run python examples/database_examples/neo4j_example.py
run-db-example-kuzu: run-db-example-kuzu:
name: "Kuzu DB Example Test" name: "Kuzu DB Example Test"
@ -92,7 +92,7 @@ jobs:
- name: Install Kuzu extra - name: Install Kuzu extra
run: | run: |
poetry install uv sync
- name: Run Kuzu Example - name: Run Kuzu Example
env: env:
@ -107,7 +107,7 @@ jobs:
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
GRAPH_DATABASE_PROVIDER: "kuzu" GRAPH_DATABASE_PROVIDER: "kuzu"
run: | run: |
poetry run python examples/database_examples/kuzu_example.py uv run python examples/database_examples/kuzu_example.py
run-db-example-pgvector: run-db-example-pgvector:
name: "PostgreSQL PGVector DB Example Test" name: "PostgreSQL PGVector DB Example Test"
@ -141,7 +141,7 @@ jobs:
- name: Install PGVector extra - name: Install PGVector extra
run: | run: |
poetry install -E postgres uv sync --extra postgres
- name: Run PGVector Example - name: Run PGVector Example
env: env:
@ -155,4 +155,4 @@ jobs:
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: | run: |
poetry run python examples/database_examples/pgvector_example.py uv run python examples/database_examples/pgvector_example.py

View file

@ -57,7 +57,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_cognee_server_start.py run: uv run python ./cognee/tests/test_cognee_server_start.py
run-telemetry-test: run-telemetry-test:
name: Run Telemetry Test name: Run Telemetry Test
@ -81,7 +81,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_telemetry.py run: uv run python ./cognee/tests/test_telemetry.py
run-telemetry-pipeline-test: run-telemetry-pipeline-test:
name: Run Telemetry Pipeline Test name: Run Telemetry Pipeline Test
@ -110,7 +110,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_library.py run: uv run python ./cognee/tests/test_library.py
run-deduplication-test: run-deduplication-test:
name: Deduplication Test name: Deduplication Test
@ -143,7 +143,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E postgres uv sync --extra postgres
- name: Run Deduplication Example - name: Run Deduplication Example
env: env:
@ -154,7 +154,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_deduplication.py run: uv run python ./cognee/tests/test_deduplication.py
run-deletion-test: run-deletion-test:
name: Deletion Test name: Deletion Test
@ -179,7 +179,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_deletion.py run: uv run python ./cognee/tests/test_deletion.py
run-s3-bucket-test: run-s3-bucket-test:
name: S3 Bucket Test name: S3 Bucket Test
@ -195,7 +195,7 @@ jobs:
- name: Install specific S3 dependency - name: Install specific S3 dependency
run: | run: |
poetry install -E aws uv sync --extra aws
- name: Run S3 Bucket Test - name: Run S3 Bucket Test
env: env:
@ -210,7 +210,7 @@ jobs:
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: poetry run python ./cognee/tests/test_s3.py run: uv run python ./cognee/tests/test_s3.py
test-parallel-databases: test-parallel-databases:
name: Test using different async databases in parallel in Cognee name: Test using different async databases in parallel in Cognee
@ -226,7 +226,7 @@ jobs:
- name: Install specific graph db dependency - name: Install specific graph db dependency
run: | run: |
poetry install uv sync
- name: Run parallel databases test - name: Run parallel databases test
env: env:
@ -239,7 +239,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_parallel_databases.py run: uv run python ./cognee/tests/test_parallel_databases.py
test-permissions: test-permissions:
name: Test permissions with different situations in Cognee name: Test permissions with different situations in Cognee
@ -255,7 +255,7 @@ jobs:
- name: Install specific graph db dependency - name: Install specific graph db dependency
run: | run: |
poetry install uv sync
- name: Run parallel databases test - name: Run parallel databases test
env: env:
@ -268,7 +268,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_permissions.py run: uv run python ./cognee/tests/test_permissions.py
test-graph-edges: test-graph-edges:
name: Test graph edge ingestion name: Test graph edge ingestion
@ -284,7 +284,7 @@ jobs:
- name: Install specific graph db dependency - name: Install specific graph db dependency
run: | run: |
poetry install uv sync
- name: Run graph edges test - name: Run graph edges test
env: env:
@ -297,4 +297,4 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_edge_ingestion.py run: uv run python ./cognee/tests/test_edge_ingestion.py

View file

@ -20,7 +20,7 @@ jobs:
env: env:
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: poetry run python ./examples/python/multimedia_example.py run: uv run python ./examples/python/multimedia_example.py
test-eval-example: test-eval-example:
name: Run Eval Example name: Run Eval Example
@ -36,7 +36,7 @@ jobs:
- name: Install specific eval dependency - name: Install specific eval dependency
run: | run: |
poetry install -E deepeval uv sync --extra deepeval
- name: Run Evaluation Framework Example - name: Run Evaluation Framework Example
env: env:
@ -49,7 +49,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/eval_framework/run_eval.py run: uv run python ./cognee/eval_framework/run_eval.py
test-descriptive-metrics: test-descriptive-metrics:
name: Run Descriptive Metrics Example name: Run Descriptive Metrics Example
@ -74,7 +74,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/tasks/descriptive_metrics/networkx_metrics_test.py run: uv run python ./cognee/tests/tasks/descriptive_metrics/networkx_metrics_test.py
test-dynamic-steps-metrics: test-dynamic-steps-metrics:
@ -100,4 +100,4 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./examples/python/dynamic_steps_example.py run: uv run python ./examples/python/dynamic_steps_example.py

View file

@ -30,7 +30,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install uv sync
- name: Run Kuzu Tests - name: Run Kuzu Tests
env: env:
@ -43,7 +43,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_kuzu.py run: uv run python ./cognee/tests/test_kuzu.py
- name: Run Weighted Edges Tests with Kuzu - name: Run Weighted Edges Tests with Kuzu
env: env:
@ -57,7 +57,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v run: uv run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v
run-neo4j-tests: run-neo4j-tests:
name: Neo4j Tests name: Neo4j Tests
@ -74,7 +74,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E neo4j uv sync --extra neo4j
- name: Run default Neo4j - name: Run default Neo4j
env: env:
@ -91,7 +91,7 @@ jobs:
GRAPH_DATABASE_URL: ${{ secrets.NEO4J_API_URL }} GRAPH_DATABASE_URL: ${{ secrets.NEO4J_API_URL }}
GRAPH_DATABASE_PASSWORD: ${{ secrets.NEO4J_API_KEY }} GRAPH_DATABASE_PASSWORD: ${{ secrets.NEO4J_API_KEY }}
GRAPH_DATABASE_USERNAME: "neo4j" GRAPH_DATABASE_USERNAME: "neo4j"
run: poetry run python ./cognee/tests/test_neo4j.py run: uv run python ./cognee/tests/test_neo4j.py
- name: Run Weighted Edges Tests with Neo4j - name: Run Weighted Edges Tests with Neo4j
env: env:
@ -108,4 +108,4 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v run: uv run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v

View file

@ -55,7 +55,7 @@ jobs:
- name: Run unit tests - name: Run unit tests
shell: bash shell: bash
run: poetry run pytest cognee/tests/unit/ run: uv run pytest cognee/tests/unit/
env: env:
PYTHONUTF8: 1 PYTHONUTF8: 1
LLM_PROVIDER: openai LLM_PROVIDER: openai
@ -73,7 +73,7 @@ jobs:
- name: Run integration tests - name: Run integration tests
if: ${{ !contains(matrix.os, 'windows') }} if: ${{ !contains(matrix.os, 'windows') }}
shell: bash shell: bash
run: poetry run pytest cognee/tests/integration/ run: uv run pytest cognee/tests/integration/
env: env:
PYTHONUTF8: 1 PYTHONUTF8: 1
LLM_PROVIDER: openai LLM_PROVIDER: openai
@ -103,11 +103,11 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_library.py run: uv run python ./cognee/tests/test_library.py
- name: Build with Poetry - name: Build with uv
shell: bash shell: bash
run: poetry build run: uv build
- name: Install Package - name: Install Package
if: ${{ !contains(matrix.os, 'windows') }} if: ${{ !contains(matrix.os, 'windows') }}

View file

@ -61,7 +61,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E postgres uv sync --extra postgres
- name: Run PostgreSQL Script to create test data (Chinook_PostgreSql.sql) - name: Run PostgreSQL Script to create test data (Chinook_PostgreSql.sql)
env: env:
@ -90,7 +90,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_relational_db_migration.py run: uv run python ./cognee/tests/test_relational_db_migration.py
run-relational-db-migration-test-kuzu: run-relational-db-migration-test-kuzu:
name: Kuzu Relational DB Migration Test name: Kuzu Relational DB Migration Test
@ -123,7 +123,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E postgres uv sync --extra postgres
- name: Run PostgreSQL Script to create test data (Chinook_PostgreSql.sql) - name: Run PostgreSQL Script to create test data (Chinook_PostgreSql.sql)
env: env:
@ -154,7 +154,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_relational_db_migration.py run: uv run python ./cognee/tests/test_relational_db_migration.py
run-relational-db-migration-test-neo4j: run-relational-db-migration-test-neo4j:
name: Neo4j Relational DB Migration Test name: Neo4j Relational DB Migration Test
@ -187,7 +187,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E postgres -E neo4j uv sync --extra postgres --extra neo4j
- name: Run PostgreSQL Script to create test data (Chinook_PostgreSql.sql) - name: Run PostgreSQL Script to create test data (Chinook_PostgreSql.sql)
env: env:
@ -221,4 +221,4 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_relational_db_migration.py run: uv run python ./cognee/tests/test_relational_db_migration.py

View file

@ -49,7 +49,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E notebook uv sync --extra notebook
- name: Execute Jupyter Notebook - name: Execute Jupyter Notebook
env: env:
@ -64,7 +64,7 @@ jobs:
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: | run: |
poetry run jupyter nbconvert \ uv run jupyter nbconvert \
--to notebook \ --to notebook \
--execute ${{ inputs.notebook-location }} \ --execute ${{ inputs.notebook-location }} \
--output executed_notebook.ipynb \ --output executed_notebook.ipynb \

View file

@ -30,7 +30,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install uv sync
- name: Run Kuzu search Tests - name: Run Kuzu search Tests
env: env:
@ -46,7 +46,7 @@ jobs:
GRAPH_DATABASE_PROVIDER: 'kuzu' GRAPH_DATABASE_PROVIDER: 'kuzu'
VECTOR_DB_PROVIDER: 'lancedb' VECTOR_DB_PROVIDER: 'lancedb'
DB_PROVIDER: 'sqlite' DB_PROVIDER: 'sqlite'
run: poetry run python ./cognee/tests/test_search_db.py run: uv run python ./cognee/tests/test_search_db.py
run-neo4j-lance-sqlite-search-tests: run-neo4j-lance-sqlite-search-tests:
name: Search test for Neo4j/LanceDB/Sqlite name: Search test for Neo4j/LanceDB/Sqlite
@ -80,7 +80,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E neo4j uv sync --extra neo4j
- name: Run Neo4j search Tests - name: Run Neo4j search Tests
env: env:
@ -99,7 +99,7 @@ jobs:
GRAPH_DATABASE_URL: bolt://localhost:7687 GRAPH_DATABASE_URL: bolt://localhost:7687
GRAPH_DATABASE_USERNAME: neo4j GRAPH_DATABASE_USERNAME: neo4j
GRAPH_DATABASE_PASSWORD: pleaseletmein GRAPH_DATABASE_PASSWORD: pleaseletmein
run: poetry run python ./cognee/tests/test_search_db.py run: uv run python ./cognee/tests/test_search_db.py
run-kuzu-pgvector-postgres-search-tests: run-kuzu-pgvector-postgres-search-tests:
name: Search test for Kuzu/PGVector/Postgres name: Search test for Kuzu/PGVector/Postgres
@ -131,7 +131,7 @@ jobs:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
- name: Install dependencies - name: Install dependencies
run: poetry install -E postgres run: uv sync --extra postgres
- name: Run Kuzu/PGVector/Postgres Tests - name: Run Kuzu/PGVector/Postgres Tests
env: env:
@ -152,7 +152,7 @@ jobs:
DB_PORT: 5432 DB_PORT: 5432
DB_USERNAME: cognee DB_USERNAME: cognee
DB_PASSWORD: cognee DB_PASSWORD: cognee
run: poetry run python ./cognee/tests/test_search_db.py run: uv run python ./cognee/tests/test_search_db.py
run-neo4j-pgvector-postgres-search-tests: run-neo4j-pgvector-postgres-search-tests:
name: Search test for Neo4j/PGVector/Postgres name: Search test for Neo4j/PGVector/Postgres
@ -198,7 +198,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
poetry install -E neo4j -E postgres uv sync --extra neo4j --extra postgres
- name: Run Neo4j + PGVector + Postgres search Tests - name: Run Neo4j + PGVector + Postgres search Tests
env: env:
@ -222,4 +222,4 @@ jobs:
DB_PORT: 5432 DB_PORT: 5432
DB_USERNAME: cognee DB_USERNAME: cognee
DB_PASSWORD: cognee DB_PASSWORD: cognee
run: poetry run python ./cognee/tests/test_search_db.py run: uv run python ./cognee/tests/test_search_db.py

View file

@ -26,4 +26,4 @@ jobs:
EMBEDDING_MODEL: "gemini/text-embedding-004" EMBEDDING_MODEL: "gemini/text-embedding-004"
EMBEDDING_DIMENSIONS: "768" EMBEDDING_DIMENSIONS: "768"
EMBEDDING_MAX_TOKENS: "8076" EMBEDDING_MAX_TOKENS: "8076"
run: poetry run python ./examples/python/simple_example.py run: uv run python ./examples/python/simple_example.py

View file

@ -26,7 +26,7 @@ jobs:
- name: Install torch dependency - name: Install torch dependency
run: | run: |
poetry add torch uv add torch
# - name: Install ollama # - name: Install ollama
# run: curl -fsSL https://ollama.com/install.sh | sh # run: curl -fsSL https://ollama.com/install.sh | sh
@ -101,4 +101,4 @@ jobs:
EMBEDDING_ENDPOINT: "http://localhost:11434/api/embeddings" EMBEDDING_ENDPOINT: "http://localhost:11434/api/embeddings"
EMBEDDING_DIMENSIONS: "4096" EMBEDDING_DIMENSIONS: "4096"
HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral" HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral"
run: poetry run python ./examples/python/simple_example.py run: uv run python ./examples/python/simple_example.py

View file

@ -36,4 +36,4 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_s3_file_storage.py run: uv run python ./cognee/tests/test_s3_file_storage.py

View file

@ -56,7 +56,7 @@ jobs:
# EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} # EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
# EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} # EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
# EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} # EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
# run: poetry run python ./cognee/tests/test_chromadb.py # run: uv run python ./cognee/tests/test_chromadb.py
run-postgres-tests: run-postgres-tests:
@ -90,7 +90,7 @@ jobs:
- name: Install specific db dependency - name: Install specific db dependency
run: | run: |
poetry install -E postgres uv sync --extra postgres
- name: Run PGVector Tests - name: Run PGVector Tests
env: env:
@ -103,4 +103,4 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: poetry run python ./cognee/tests/test_pgvector.py run: uv run python ./cognee/tests/test_pgvector.py

View file

@ -47,11 +47,11 @@ jobs:
- name: Run Weighted Edges Unit Tests - name: Run Weighted Edges Unit Tests
run: | run: |
poetry run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v --tb=short uv run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v --tb=short
- name: Run Standard Graph Tests (Regression) - name: Run Standard Graph Tests (Regression)
run: | run: |
poetry run pytest cognee/tests/unit/interfaces/graph/get_graph_from_model_unit_test.py -v --tb=short uv run pytest cognee/tests/unit/interfaces/graph/get_graph_from_model_unit_test.py -v --tb=short
test-with-different-databases: test-with-different-databases:
name: Test Weighted Edges with Different Graph Databases name: Test Weighted Edges with Different Graph Databases
@ -64,7 +64,7 @@ jobs:
install_extra: "" install_extra: ""
graph_db_provider: "kuzu" graph_db_provider: "kuzu"
- database: neo4j - database: neo4j
install_extra: "-E neo4j" install_extra: "--extra neo4j"
graph_db_provider: "neo4j" graph_db_provider: "neo4j"
env: env:
LLM_PROVIDER: openai LLM_PROVIDER: openai
@ -90,13 +90,13 @@ jobs:
- name: Install Database Dependencies - name: Install Database Dependencies
run: | run: |
poetry install ${{ matrix.install_extra }} uv sync ${{ matrix.install_extra }}
- name: Run Weighted Edges Tests - name: Run Weighted Edges Tests
env: env:
GRAPH_DATABASE_PROVIDER: ${{ matrix.graph_db_provider }} GRAPH_DATABASE_PROVIDER: ${{ matrix.graph_db_provider }}
run: | run: |
poetry run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v --tb=short uv run pytest cognee/tests/unit/interfaces/graph/test_weighted_edges.py -v --tb=short
test-examples: test-examples:
name: Test Weighted Edges Examples name: Test Weighted Edges Examples
@ -125,7 +125,7 @@ jobs:
- name: Test Weighted Edges Example - name: Test Weighted Edges Example
run: | run: |
poetry run python examples/python/weighted_edges_example.py uv run python examples/python/weighted_edges_example.py
- name: Verify Visualization File Created - name: Verify Visualization File Created
run: | run: |