Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Update integration tests to use real APIs #5

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

erkinalp
Copy link
Owner

@erkinalp erkinalp commented Dec 20, 2024

Citation System Integration Test Improvements

Updates integration tests to properly validate citation system functionality:

Key Changes

  • Uses real APIs when available instead of always mocking
  • Tests rate limiting behavior with actual response time measurements
  • Validates error handling with real API error responses
  • Maintains ability to work with partial API availability
  • Improves test assertions with descriptive error messages

Testing Strategy

The tests now verify actual system behavior rather than using mocks:

  1. CitationAPIManager fixture checks for available API keys
  2. DOI lookup test validates real API responses
  3. Rate limiting test measures actual response times
  4. Error handling test uses real invalid DOIs

Implementation Details

  • Tests skip when no APIs are available
  • Rate limiting detection through response time analysis
  • Comprehensive error case coverage (invalid DOI, malformed DOI, empty DOI)
  • Graceful handling of partial API availability

Link to Devin run: https://app.devin.ai/sessions/c75521a812964cdb852d794c4797fba4

devin-ai-integration bot and others added 12 commits December 18, 2024 17:36
- Add version specifications for all packages
- Categorize dependencies (LLM APIs, Viz, Core, Optional)
- Add development dependencies
- Include system monitoring tools
- Add helpful comments for clarity

Part of SakanaAI#158

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add minimum hardware requirements
- Add recommended hardware requirements
- Include detailed explanations for each requirement
- Add notes about GPU requirements
- Document storage requirements breakdown

Part of SakanaAI#158

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add system requirement verification in launch_scientist.py
- Update requirements.txt with psutil for system monitoring
- Create comprehensive model configuration documentation
- Add hardware requirements documentation
- Update README with improved installation instructions

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add pyproject.toml with project metadata
- Add setup.py with improved requirements parsing
- Handle comments and version specifiers in requirements.txt

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Remove category-based dependency filtering
- Install all requirements by default
- Fix dependency installation issues

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Modified CitationAPIManager fixture to use available APIs
- Updated assertions to handle partial API availability
- Tests now pass without requiring Scopus API key
- Added cite_key column to Citation model
- Improved rate limiter initialization

Co-Authored-By: Erkin Alp Güney <[email protected]>
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

devin-ai-integration bot and others added 2 commits December 20, 2024 15:06
…odified CitationAPIManager fixture to use real APIs\n- Updated DOI lookup test to validate real responses\n- Added comprehensive rate limiting validation\n- Enhanced error handling tests with real error cases

Co-Authored-By: Erkin Alp Güney <[email protected]>
@erkinalp erkinalp changed the title test: Update integration tests to work without API keys test: Update integration tests to use real APIs Dec 20, 2024
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.

1 participant