From 0fe16939c1df7721b9c7c8c694736280695b9f86 Mon Sep 17 00:00:00 2001 From: Andrej Milicevic Date: Wed, 26 Nov 2025 12:32:17 +0100 Subject: [PATCH] remove code_graph example after dev merge --- .github/workflows/basic_tests.yml | 30 ------------- examples/python/code_graph_example.py | 63 --------------------------- 2 files changed, 93 deletions(-) delete mode 100644 examples/python/code_graph_example.py diff --git a/.github/workflows/basic_tests.yml b/.github/workflows/basic_tests.yml index 98ced21dc..1fc20a148 100644 --- a/.github/workflows/basic_tests.yml +++ b/.github/workflows/basic_tests.yml @@ -197,33 +197,3 @@ jobs: - name: Run Simple Examples run: uv run python ./examples/python/simple_example.py - - graph-tests: - name: Run Basic Graph Tests - runs-on: ubuntu-22.04 - env: - ENV: 'dev' - LLM_PROVIDER: openai - LLM_MODEL: ${{ secrets.LLM_MODEL }} - LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} - LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} - - EMBEDDING_PROVIDER: openai - EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} - EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} - EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} - EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Cognee Setup - uses: ./.github/actions/cognee_setup - with: - python-version: ${{ inputs.python-version }} - - - name: Run Graph Tests - run: uv run python ./examples/python/code_graph_example.py --repo_path ./cognee/tasks/graph diff --git a/examples/python/code_graph_example.py b/examples/python/code_graph_example.py deleted file mode 100644 index 1b476a2c3..000000000 --- a/examples/python/code_graph_example.py +++ /dev/null @@ -1,63 +0,0 @@ -import argparse -import asyncio -import os - -import cognee -from cognee import SearchType -from cognee.shared.logging_utils import setup_logging, ERROR - -from cognee.api.v1.cognify.code_graph_pipeline import run_code_graph_pipeline - - -async def main(repo_path, include_docs): - # Disable permissions feature for this example - os.environ["ENABLE_BACKEND_ACCESS_CONTROL"] = "false" - - run_status = False - async for run_status in run_code_graph_pipeline(repo_path, include_docs=include_docs): - run_status = run_status - - # Test CODE search - search_results = await cognee.search(query_type=SearchType.CODE, query_text="test") - assert len(search_results) != 0, "The search results list is empty." - print("\n\nSearch results are:\n") - for result in search_results: - print(f"{result}\n") - - return run_status - - -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument("--repo_path", type=str, required=True, help="Path to the repository") - parser.add_argument( - "--include_docs", - type=lambda x: x.lower() in ("true", "1"), - default=False, - help="Whether or not to process non-code files", - ) - parser.add_argument( - "--time", - type=lambda x: x.lower() in ("true", "1"), - default=True, - help="Whether or not to time the pipeline run", - ) - return parser.parse_args() - - -if __name__ == "__main__": - logger = setup_logging(log_level=ERROR) - - args = parse_args() - - if args.time: - import time - - start_time = time.time() - asyncio.run(main(args.repo_path, args.include_docs)) - end_time = time.time() - print("\n" + "=" * 50) - print(f"Pipeline Execution Time: {end_time - start_time:.2f} seconds") - print("=" * 50 + "\n") - else: - asyncio.run(main(args.repo_path, args.include_docs))