diff --git a/AGENTS.md b/AGENTS.md index 9f86e362..95100f68 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,8 +37,7 @@ cortex install nginx --dry-run ```bash python3 -m venv venv source venv/bin/activate -pip install -e . -pip install -r requirements-dev.txt +pip install -e ".[dev]" pytest tests/ -v ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2edaebf..3048d5dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -123,24 +123,19 @@ git remote add upstream https://github.com/cortexlinux/cortex.git python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -# Install dependencies -pip install -r requirements.txt -pip install -r requirements-dev.txt - -# Install in development mode -pip install -e . +# Install in development mode (includes all dependencies) +pip install -e ".[dev]" # Run tests to verify setup pytest tests/ -v ``` -### Requirements Files - -If `requirements-dev.txt` doesn't exist, install these manually: +### Dependencies -```bash -pip install pytest pytest-cov pytest-mock black pylint mypy bandit -``` +All dependencies are defined in `pyproject.toml`. To install: +- **Core dependencies**: `pip install -e .` +- **With dev tools**: `pip install -e ".[dev]"` +- **All extras**: `pip install -e ".[all]"` ### IDE Setup diff --git a/Makefile b/Makefile index 35aab6c9..0074bdd5 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,7 @@ help: dev: $(PYTHON) -m pip install -U pip - $(PYTHON) -m pip install -e . - $(PYTHON) -m pip install -r requirements-dev.txt + $(PYTHON) -m pip install -e ".[dev]" @echo "✅ Dev environment ready" test: diff --git a/docs/guides/Developer-Guide.md b/docs/guides/Developer-Guide.md index 99e5ab7a..4a06cead 100644 --- a/docs/guides/Developer-Guide.md +++ b/docs/guides/Developer-Guide.md @@ -11,8 +11,7 @@ python3 -m venv venv source venv/bin/activate # Install dev dependencies -pip install -r requirements.txt -pip install -r requirements-dev.txt +pip install -e ".[dev]" # Run tests pytest tests/ diff --git a/docs/guides/Getting-Started.md b/docs/guides/Getting-Started.md index 89b84ce9..5984a413 100644 --- a/docs/guides/Getting-Started.md +++ b/docs/guides/Getting-Started.md @@ -12,8 +12,8 @@ git clone https://github.com/cortexlinux/cortex.git cd cortex -# Install dependencies -pip install -r requirements.txt +# Install Cortex +pip install -e . # Configure API key export ANTHROPIC_API_KEY="your-key-here" diff --git a/pyproject.toml b/pyproject.toml index e59f5b83..5333fe48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,21 +44,26 @@ requires-python = ">=3.10" dependencies = [ "anthropic>=0.18.0", "openai>=1.0.0", - "rich>=13.0.0", - "pyyaml>=6.0.0", + "requests>=2.32.4", + "PyYAML>=6.0.3", "python-dotenv>=1.0.0", + "cryptography>=44.0.1", + "rich>=13.0.0", + "typing-extensions>=4.0.0", ] [project.optional-dependencies] dev = [ "pytest>=7.0.0", "pytest-cov>=4.0.0", - "pytest-timeout>=2.0.0", - "black>=23.0.0", - "ruff>=0.1.0", + "pytest-asyncio>=0.23.0", + "pytest-mock>=3.12.0", + "pytest-timeout>=2.3.1", + "black>=24.0.0", + "ruff>=0.8.0", "mypy>=1.0.0", "pre-commit>=3.0.0", - "isort>=5.0.0", + "isort>=5.13.0", ] security = [ "bandit>=1.7.0", diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 2ccb0205..00000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Development Dependencies -pytest>=7.0.0 -pytest-cov>=4.0.0 -pytest-asyncio>=0.23.0 -pytest-mock>=3.12.0 -pytest-timeout>=2.3.1 -black>=24.0.0 -ruff>=0.8.0 -isort>=5.13.0 -pre-commit>=3.0.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 166a777e..00000000 --- a/requirements.txt +++ /dev/null @@ -1,25 +0,0 @@ -# Cortex Linux - Core Dependencies - -# LLM Provider APIs -anthropic>=0.18.0 -openai>=1.0.0 -requests>=2.32.4 - -# Configuration -PyYAML>=6.0.0 - -# Environment variable loading from .env files -python-dotenv>=1.0.0 - -# Encryption for environment variable secrets -cryptography>=42.0.0 - -# Terminal UI -rich>=13.0.0 - -# Configuration -pyyaml>=6.0.0 - -# Type hints for older Python versions -typing-extensions>=4.0.0 -PyYAML==6.0.3 diff --git a/setup.py b/setup.py index 3a218042..63b9b318 100644 --- a/setup.py +++ b/setup.py @@ -5,20 +5,18 @@ with open("README.md", encoding="utf-8") as fh: long_description = fh.read() -# Try to read requirements from root, fallback to LLM directory -requirements_path = "requirements.txt" -if not os.path.exists(requirements_path): - requirements_path = os.path.join("LLM", "requirements.txt") - -if os.path.exists(requirements_path): - with open(requirements_path, encoding="utf-8") as fh: - requirements = [ - line.strip() - for line in fh - if line.strip() and not line.startswith("#") and not line.startswith("-r") - ] -else: - requirements = ["anthropic>=0.18.0", "openai>=1.0.0"] +# Dependencies are now defined in pyproject.toml +# This is kept for backward compatibility but pyproject.toml is the source of truth +requirements = [ + "anthropic>=0.18.0", + "openai>=1.0.0", + "requests>=2.32.4", + "PyYAML>=6.0.3", + "python-dotenv>=1.0.0", + "cryptography>=44.0.1", + "rich>=13.0.0", + "typing-extensions>=4.0.0", +] setup( name="cortex-linux",