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
20 changes: 10 additions & 10 deletions .github/agents/code-quality.agent.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
name: code-quality-agent
description: Fixes linting, formatting, and type checking issues by running make commands until all checks pass
description: Fixes linting, formatting, and type checking issues by running invoke commands until all checks pass
tools: ['execute/getTerminalOutput', 'execute/runInTerminal', 'execute/runTests', 'read', 'edit', 'search']
---

# Code Quality Agent

Fix all code quality issues by running make commands iteratively and addressing any remaining problems until all checks pass.
Fix all code quality issues by running invoke commands iteratively and addressing any remaining problems until all checks pass.

## Workflow

1. Run `make format` then `make lint` (auto-fixes 60-80% of issues)
2. Run `make mypy-check` to find type errors
1. Run `invoke format` then `invoke lint` (auto-fixes 60-80% of issues)
2. Run `invoke mypy-check` to find type errors
3. Fix remaining issues manually
4. Verify: All checks must pass with exit code 0

## Commands

```bash
make format # Auto-format with Ruff
make lint # Auto-fix linting with Ruff
make mypy-check # Type check with mypy
invoke format # Auto-format with Ruff
invoke lint # Auto-fix linting with Ruff
invoke mypy-check # Type check with mypy
```

## Common Mypy Fixes
Expand Down Expand Up @@ -71,7 +71,7 @@ class Child(Parent):
## Success Criteria

```bash
make format-check # No changes needed
make lint-check # No issues found
make mypy-check # No type errors
invoke format-check # No changes needed
invoke lint-check # No issues found
invoke mypy-check # No type errors
```
42 changes: 21 additions & 21 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,86 +17,86 @@ jobs:
formatting:
name: Code Formatting
runs-on: ubuntu-latest

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

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Configure Git for private repos
run: |
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync

- name: Check code formatting
run: make format-check
run: uv run invoke format-check

linting:
name: Linting
runs-on: ubuntu-latest

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

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Configure Git for private repos
run: |
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync

- name: Check linting
run: make lint-check
run: uv run invoke lint-check

type-checking:
name: Type Checking
runs-on: ubuntu-latest

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

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Configure Git for private repos
run: |
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync

- name: Check type hints
run: make mypy-check
run: uv run invoke mypy-check
125 changes: 0 additions & 125 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:

- name: Run tests
run: |
make run-tests
uv run invoke run-tests
6 changes: 3 additions & 3 deletions .github/workflows/tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:

- name: Run tests
run: |
make run-tests
uv run invoke run-tests

- name: Run linting
run: |
make lint-check
uv run invoke lint-check
continue-on-error: true

- name: Run type checking
run: |
make mypy-check
uv run invoke mypy-check
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:

- name: Run tests
run: |
make run-tests
uv run invoke run-tests
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ QUICKSTART_STARTUP_SCRIPT.md
# OS files
.DS_Store
Thumbs.db

# Robust
.git/
16 changes: 14 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
repos:
- repo: local
hooks:
- id: shredguard-check
name: shredguard check
entry: shredguard check
language: system
types: [text]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run --only-group dev mypy .
language: system
types: [python]
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand Down
Loading
Loading