Skip to content
Closed
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
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Base image with Python 3.12 slim
FROM mcr.microsoft.com/devcontainers/python:3.12-bullseye

# Clean apt cache and reduce layers
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git curl wget build-essential && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Optional: remove unwanted preinstalled Python packages to save space
RUN pip freeze | xargs pip uninstall -y || true

# Create workspace directory
WORKDIR /workspace

# Set default shell
SHELL ["/bin/bash", "-c"]
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Python Codespaces Starter",
"dockerFile": "Dockerfile",
"context": "..",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-pyright.pyright",
"ms-python.python"
],
"settings": {
"python.analysis.typeCheckingMode": "basic",
"python.languageServer": "Pylance"
}
}
},
"postCreateCommand": "bash .devcontainer/setup.sh",
"remoteUser": "codespaces"
}
15 changes: 15 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# Ensure script exits on error
set -e

echo "=== Cleaning Python caches and pip cache ==="
rm -rf ~/.cache/pip
rm -rf ~/.cache/pypoetry
rm -rf ~/.local/share/virtualenvs

echo "=== Installing project dependencies ==="
if [ -f /workspaces/requirements.txt ]; then
pip install --no-cache-dir -r /workspaces/requirements.txt
fi

echo "=== Environment ready ==="
30 changes: 27 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
name: pre-commit

on:
workflow_dispatch:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit ruff uv

- name: Run pre-commit auto-fix
run: |
# Auto-fix all hooks including Ruff
make format
pre-commit run --all-files --show-diff-on-failure --hook-stage manual --exclude 'webui/*'

# Configure git for GitHub Actions bot
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Commit & push changes if any
git add .
git commit -m "Apply pre-commit fixes" || echo "No changes to commit"
git push || echo "Push failed (nothing to push)"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: bash scripts/test-cov.sh

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
fail_ci_if_error: false
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,12 @@ htmlcov/
.tox/
.nox/
.hypothesis/
__pycache__/
*.pyc
*.pyo
*.pyd
.env
.venv/
dist/
build/
*.egg-info/
1 change: 1 addition & 0 deletions data/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/agents/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/knowledge/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/knowledge/main/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/knowledge/solutions/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/plugins/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/skills/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions data/usr/workdir/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions logs/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading