# tests/schemas/syndarix/conftest.py
"""
Shared fixtures for Syndarix schema tests.
"""

import uuid
from datetime import date, timedelta

import pytest


@pytest.fixture
def valid_uuid():
    """Return a valid UUID for testing."""
    return uuid.uuid4()


@pytest.fixture
def valid_project_data():
    """Return valid project data for schema testing."""
    return {
        "name": "Test Project",
        "slug": "test-project",
        "description": "A test project",
    }


@pytest.fixture
def valid_agent_type_data():
    """Return valid agent type data for schema testing."""
    return {
        "name": "Backend Engineer",
        "slug": "backend-engineer",
        "personality_prompt": "You are an expert backend engineer.",
        "primary_model": "claude-opus-4-5-20251101",
    }


@pytest.fixture
def valid_sprint_data(valid_uuid):
    """Return valid sprint data for schema testing."""
    today = date.today()
    return {
        "project_id": valid_uuid,
        "name": "Sprint 1",
        "number": 1,
        "start_date": today,
        "end_date": today + timedelta(days=14),
    }


@pytest.fixture
def valid_issue_data(valid_uuid):
    """Return valid issue data for schema testing."""
    return {
        "project_id": valid_uuid,
        "title": "Test Issue",
        "body": "Issue description",
    }


@pytest.fixture
def valid_agent_instance_data(valid_uuid):
    """Return valid agent instance data for schema testing."""
    return {
        "agent_type_id": valid_uuid,
        "project_id": valid_uuid,
        "name": "TestAgent",
    }
