Spaces:
Sleeping
Sleeping
| """Pytest configuration and fixtures.""" | |
| import pytest | |
| import os | |
| from pathlib import Path | |
| import tempfile | |
| import shutil | |
| def sample_meeting_md(): | |
| """Sample meeting markdown content.""" | |
| return """# Meeting: Sprint Planning | |
| Date: 2025-01-15 | |
| Participants: Alice, Bob, Charlie | |
| ## Discussion | |
| We discussed the new feature requirements and timeline. | |
| The team agreed on the architecture approach. | |
| ## Decisions | |
| - Use PostgreSQL for the database | |
| - Deploy on AWS ECS | |
| ## Action Items | |
| - [ ] Alice: Implement login page by 2025-01-20 | |
| - [ ] Bob: Set up CI/CD pipeline by 2025-01-18 | |
| - [x] Charlie: Review requirements (completed) | |
| ## Blockers | |
| - Waiting for API credentials from vendor | |
| - Need design approval from stakeholders | |
| """ | |
| def temp_data_dir(sample_meeting_md): | |
| """Create a temporary data directory with sample meetings.""" | |
| temp_dir = tempfile.mkdtemp() | |
| data_dir = Path(temp_dir) / "data" | |
| # Create project structure | |
| project_dir = data_dir / "test_project" / "meetings" | |
| project_dir.mkdir(parents=True) | |
| # Write sample meeting | |
| meeting_file = project_dir / "2025-01-15-sprint-planning.md" | |
| meeting_file.write_text(sample_meeting_md) | |
| yield data_dir | |
| # Cleanup | |
| shutil.rmtree(temp_dir) | |
| def hf_token(): | |
| """Get HuggingFace token from environment.""" | |
| token = os.getenv("HF_TOKEN") | |
| if not token: | |
| pytest.skip("HF_TOKEN not set - skipping HuggingFace tests") | |
| return token | |
| def google_api_key(): | |
| """Get Google API key from environment.""" | |
| key = os.getenv("GOOGLE_API_KEY") | |
| if not key: | |
| pytest.skip("GOOGLE_API_KEY not set - skipping Google API tests") | |
| return key | |