"""Setup script for Device Doctor."""

from setuptools import setup, find_packages
from pathlib import Path

# Read README
readme_file = Path(__file__).parent / "README.md"
long_description = readme_file.read_text() if readme_file.exists() else ""

setup(
    name="device-doctor",
    version="1.0.0",
    description="Read-only system diagnostics dashboard with AI-powered explanations",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Dhanush-adk",
    author_email="danthara@uncc.edu",
    url="https://github.com/Dhanush-adk/device-doctor",
    project_urls={
        "Bug Reports": "https://github.com/Dhanush-adk/device-doctor/issues",
        "Source": "https://github.com/Dhanush-adk/device-doctor",
        "Documentation": "https://github.com/Dhanush-adk/device-doctor#readme",
    },
    packages=find_packages(),
    py_modules=['api_server'],  # Include api_server.py as a module
    install_requires=[
        "psutil>=5.9.0",
        "pydantic>=2.0.0",
        "requests>=2.31.0",
        "openai>=1.0.0",
        "google-generativeai>=0.3.0",
        "anthropic>=0.18.0",
    ],
    extras_require={
        "dev": [
            "pytest>=7.0.0",
            "black>=23.0.0",
            "flake8>=6.0.0",
        ],
    },
    entry_points={
        "console_scripts": [
            "device-doctor=doctor.main:main",
            "device-doctor-server=api_server:run_server",
        ],
    },
    include_package_data=True,
    package_data={
        "": [
            "dashboard/**/*.html",
            "dashboard/**/*.css",
            "dashboard/**/*.js",
        ],
    },
    python_requires=">=3.8",
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: System :: Monitoring",
        "Topic :: System :: Systems Administration",
    ],
)
