Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install pytest pytest-cov pytest-mock pytest-asyncio pytest-timeout
pip install -e ".[dev]"

- name: Run tests
env:
Expand Down Expand Up @@ -97,5 +95,5 @@ jobs:

- name: Check dependencies with safety
run: |
pip install -r requirements.txt
pip install -e ".[dev]"
safety check --full-report || echo "::warning::Vulnerable dependencies found."
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,15 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements*.txt') }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
pip install pytest pytest-cov pytest-timeout pytest-asyncio pytest-mock
pip install -e ".[dev]"

- name: Run tests with coverage
env:
Expand Down
3 changes: 1 addition & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
19 changes: 7 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ python3 -m venv venv
source venv/bin/activate

# 3. Install Cortex
# Using pyproject.toml (recommended)
pip install -e .

# Or install with dev dependencies
pip install -e ".[dev]"

# 4. Configure AI Provider (choose one):

## Option A: Ollama (FREE - Local LLM, no API key needed)
Expand Down
3 changes: 1 addition & 2 deletions docs/guides/Developer-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 17 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,36 @@ classifiers = [
]
requires-python = ">=3.10"
dependencies = [
# LLM Provider APIs
"anthropic>=0.18.0",
"openai>=1.0.0",
"rich>=13.0.0",
# HTTP requests (for GitHub API, network operations)
"requests>=2.32.4",
# Configuration file parsing
"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 and formatting
"rich>=13.0.0",
# Type hints for older Python versions
"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.0",
"black>=24.0.0",
"ruff>=0.8.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
"isort>=5.0.0",
"build>=0.10.0",
]
security = [
"bandit>=1.7.0",
Expand Down
10 changes: 0 additions & 10 deletions requirements-dev.txt

This file was deleted.

25 changes: 0 additions & 25 deletions requirements.txt

This file was deleted.

54 changes: 0 additions & 54 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/integration/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"PYTHONPATH": "/workspace",
"PYTHONDONTWRITEBYTECODE": "1",
}
PIP_BOOTSTRAP = "python -m pip install --quiet --upgrade pip setuptools && python -m pip install --quiet --no-cache-dir -r /workspace/requirements.txt"
PIP_BOOTSTRAP_DEV = "python -m pip install --quiet --upgrade pip setuptools && python -m pip install --quiet --no-cache-dir -r /workspace/requirements.txt -r /workspace/requirements-dev.txt"
PIP_BOOTSTRAP = "python -m pip install --quiet --upgrade pip setuptools build && python -m pip install --quiet --no-cache-dir -e /workspace"
PIP_BOOTSTRAP_DEV = "python -m pip install --quiet --upgrade pip setuptools build && python -m pip install --quiet --no-cache-dir -e /workspace[dev]"


@unittest.skipUnless(docker_available(), "Docker is required for integration tests")
Expand Down
Loading