Skip to content

Conversation

@KacemMathlouthi
Copy link
Collaborator

@KacemMathlouthi KacemMathlouthi commented Aug 14, 2025

Summary:

This PR mainly addresses the issue #8 by implementing these changes:

  • Removed obsolete test files that no longer worked due to major architecture changes
  • Added unit tests for VCell DB service functions
  • Enhanced VCell DB service with connectivity check and retry logic for VCML file fetching
  • Added unit tests for LLMs service functions (response generation and analysis)
  • Updated GitHub workflow to run the new tests
  • Action required: @Ezequiel-Valencia please add the following secret keys in GitHub secrets so these tests can run:
    echo "AZURE_API_VERSION=${{ secrets.AZURE_API_VERSION }}" >> backend/app/.env
    echo "AZURE_ENDPOINT=${{ secrets.AZURE_ENDPOINT }}" >> backend/app/.env
    echo "AZURE_API_KEY=${{ secrets.AZURE_API_KEY }}" >> backend/app/.env
    echo "AZURE_DEPLOYMENT_NAME=${{ secrets.AZURE_DEPLOYMENT_NAME }}" >> backend/app/.env

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces unit test infrastructure and initial test coverage for the backend services. The main purpose is to establish a testing framework using pytest and pytest-asyncio, along with creating comprehensive unit tests for the VCell database service and LLM service functionalities.

  • Adds pytest and pytest-asyncio dependencies for testing framework
  • Creates new unit test files for core services (vcelldb_service and llms_service)
  • Removes old API integration test files and replaces with focused unit tests
  • Enhances error handling and logging in vcelldb_service with connectivity checks and retry logic

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
backend/pyproject.toml Adds pytest testing dependencies
backend/app/utils/tools_utils.py Reformats import statements for better readability
backend/app/tests/vcelldb_api_tests.py Removes old integration tests
backend/app/tests/tool_calling_tests.py Removes old integration tests
backend/app/tests/test_vcelldb_service.py Adds comprehensive unit tests for VCell DB service functions
backend/app/tests/test_llms_service.py Adds unit tests for LLM service functions
backend/app/services/vcelldb_service.py Enhances error handling with connectivity checks and retry logic
backend/app/services/llms_service.py Improves logging in VCML analysis function
backend/app/services/knowledge_base_service.py Minor formatting improvements
backend/app/schemas/tool_schema.py Adds blank lines for better code structure
backend/app/routes/llms_router.py Reformats function call for better readability
backend/app/main.py Reformats import statements and adds blank lines

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KacemMathlouthi KacemMathlouthi marked this pull request as ready for review August 17, 2025 22:08
@KacemMathlouthi KacemMathlouthi changed the title Draft: Feat/unit tests Add new tests for VCell DB and LLMs services, enhance VCell DB connectivity, and update GitHub workflow Aug 17, 2025
@KacemMathlouthi KacemMathlouthi merged commit 5b357ab into main Aug 17, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants