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
4 changes: 4 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# API Keys for LLM Providers
# Copy this file to .env and fill in the values.
GOOGLE_GEMINI_API_KEY=your_api_key_here
OPENAI_API_KEY=your_api_key_here
45 changes: 45 additions & 0 deletions .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Setup Python Environment'
description: 'Checks out code, sets up Python, caches dependencies, and installs them.'
inputs:
python-version:
description: 'The Python version to use.'
required: true
default: '3.11'
install-dev-reqs:
description: 'Whether to install requirements-dev.txt'
required: false
default: 'true'
install-docs-reqs:
description: 'Whether to install requirements-docs.txt'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
# Include all requirements files in the cache key
key: ${{ runner.os }}-pip-${{ inputs.python-version }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ inputs.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
if [ "${{ inputs.install-dev-reqs }}" == "true" ] && [ -f requirements-dev.txt ]; then
pip install -r requirements-dev.txt
fi
if [ "${{ inputs.install-docs-reqs }}" == "true" ] && [ -f requirements-docs.txt ]; then
pip install -r requirements-docs.txt
fi
6 changes: 4 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ setup.py → Python package setup (currently empty)
1. **Install dependencies**: `pip install pytest pytest-cov mypy pylint`
2. **Set Python path**: `export PYTHONPATH=.` or prefix commands with `PYTHONPATH=.`
3. **Test before changing**: `PYTHONPATH=. python -m pytest test/ -v` to validate current state
4. **Check module imports**: Ensure new Python modules have proper `__init__.py` files
5. **Follow branch naming**: Use `dev/<alias>/<feature>` pattern for feature branches
4. **Configure the agent**: Edit `config/model_config.yaml` to configure the agent before running it.
5. **Check module imports**: Ensure new Python modules have proper `__init__.py` files
6. **Follow branch naming**: Use `dev/<alias>/<feature>` pattern for feature branches
7. **Fill out the PR template**: Ensure the PR template at `.github/PULL_REQUEST_TEMPLATE.md` is filled out before submitting a new PR.

**NEVER do the following:**
- Run tests without setting PYTHONPATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- language: actions
build-mode: none
- language: c-cpp
build-mode: manual
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
30 changes: 30 additions & 0 deletions .github/workflows/docker-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Docker Image Scan'
on:
push:
branches: [ main ]
pull_request:

permissions:
contents: read

jobs:
build-and-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build an image from Dockerfile
id: build-image
run: |
docker build -t ${{ github.repository }}:latest .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ github.repository }}:latest'
format: 'table'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
8 changes: 2 additions & 6 deletions .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# GoSec Security Checker
# This workflow runs gosec to check Go code for security issues
# It is currently disabled from running automatically.
name: GoSec Security Checker
permissions:
contents: read

on:
push:
paths:
- '**.go'
pull_request:
paths:
- '**.go'
workflow_dispatch:

jobs:
gosec:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/prompt-evaluation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
permissions:
contents: read
name: 'Prompt Evaluation'

on:
workflow_dispatch:
inputs:
prompt_file:
description: 'Path to the prompt file (e.g., data/prompts/default.yaml)'
required: true
default: 'data/prompts/default.yaml'
provider:
description: 'LLM provider to use (gemini, openai, ollama)'
required: true
default: 'gemini'
model:
description: 'Model name to use'
required: false

jobs:
evaluate:
runs-on: ubuntu-latest
steps:
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: '3.11'

- name: Run prompt evaluation
env:
GOOGLE_GEMINI_API_KEY: ${{ secrets.GOOGLE_GEMINI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PYTHONPATH: .
run: |
python scripts/evaluate-prompt.py \
--prompt-file ${{ github.event.inputs.prompt_file }} \
--provider ${{ github.event.inputs.provider }} \
--model ${{ github.event.inputs.model }} \
--output-file prompt-output.txt

- name: Upload prompt output
uses: actions/upload-artifact@v4
with:
name: prompt-output-${{ github.event.inputs.provider }}-${{ github.event.inputs.model || 'default' }}
path: prompt-output.txt
12 changes: 4 additions & 8 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ permissions:
contents: read
name: Pylint

on: [push]
on:
pull_request:

jobs:
build:
Expand All @@ -11,15 +12,10 @@ jobs:
matrix:
python-version: ["3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
11 changes: 4 additions & 7 deletions .github/workflows/python-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-autodoc-typehints
install-dev-reqs: 'false'
install-docs-reqs: 'true'
- name: Generate Sphinx docs
run: |
sphinx-apidoc -o docs/ src/
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/python-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ jobs:
flake8-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: '3.11'
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics
7 changes: 0 additions & 7 deletions .github/workflows/python-test-static.yml

This file was deleted.

94 changes: 15 additions & 79 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,12 @@ jobs:
name: Static analysis & unit tests (one python)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: '3.11'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies for static
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov mypy
- name: Run ruff (lint)
run: |
python -m pip install ruff
python -m ruff check src/
- name: Run unit tests with coverage
run: |
Expand All @@ -64,25 +50,10 @@ jobs:
matrix:
python-version: [3.11, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv .venv_ci
. .venv_ci/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Run tests
env:
PYTHONPATH: .
Expand All @@ -94,25 +65,10 @@ jobs:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: 3.12
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.12-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install test deps only
run: |
python -m pip install --upgrade pip
python -m venv .venv_ci
. .venv_ci/bin/activate
pip install --upgrade pip setuptools wheel
pip install pytest python-dotenv
python-version: '3.12'
- name: Run deepagent unit tests
env:
PYTHONPATH: .
Expand All @@ -124,25 +80,14 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: 3.12
python-version: '3.12'
install-dev-reqs: 'false' # python-dotenv is in dev-reqs, but we want to install it manually
- name: Install provider packages
run: |
python -m pip install --upgrade pip
python -m venv .venv_ci
. .venv_ci/bin/activate
pip install --upgrade pip setuptools wheel
pip install langchain-google-genai langchain-community langchain-ollama python-dotenv
- name: Cache pip for provider-smoke
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-provider-smoke-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Quick deepagent smoke (dry-run disabled)
env:
PYTHONPATH: .
Expand All @@ -157,22 +102,13 @@ jobs:
matrix:
provider: [gemini, openai, ollama]
steps:
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-providers-${{ matrix.provider }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v4
- name: Setup Python Environment
uses: ./.github/actions/setup-python-env
with:
python-version: 3.12
python-version: '3.12'
install-dev-reqs: 'false'
- name: Install provider packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install langchain-google-genai langchain-community langchain-ollama
- name: Run provider smoke for matrix provider
env:
Expand Down
Loading
Loading