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
84 changes: 75 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,91 @@ on:
push:
pull_request:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install
run: |
python -m pip install -U pip
pip install -e '.[dev]'
- name: Lint
- name: Ruff lint
run: ruff check .
- name: Ruff format check
run: ruff format --check .

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Install
run: |
ruff check .
black --check .
- name: Type check
python -m pip install -U pip
pip install -e '.[dev]'
- name: Mypy
run: mypy --install-types --non-interactive src/

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install
run: |
mypy ollama_chat/
- name: Tests
python -m pip install -U pip
pip install -e '.[dev]'
- name: Pytest
run: pytest --cov=ollama_chat --cov-report=xml -q
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml

build:
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Install build tools
run: |
pytest -q
python -m pip install -U pip
pip install build twine
- name: Build sdist and wheel
run: python -m build
- name: Twine check
run: twine check dist/*
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,4 @@ __marimo__/

DEVELOPMENT_WORKFLOW.md
docs/
toolcalling.txt
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Pre-commit hooks for linting, formatting, and type-checking
# - Ruff handles linting and formatting
# - Mypy performs type checking
# Excludes prevent scanning generated/build artifacts and virtualenvs
exclude: |
^(build/|dist/|\.venv/|\.mypy_cache/|\.ruff_cache/|\.pytest_cache/|docs/|build/lib/).*

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: []
8 changes: 3 additions & 5 deletions .windsurf/rules/python-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ repos:

### 3.1 Prefer Language Features Over Formal Patterns

**RULE:** Always use Python's native features before implementing classical patterns.
**RULE:** Always use Python's native features before implementing classical patterns assigned to you.

| Pattern | Python Approach |
|---------|----------------|
Expand Down Expand Up @@ -211,8 +211,6 @@ service = NotificationService(EmailSender())
### 4.1 Core Rules

- **DRY (Don't Repeat Yourself):** Extract duplicated logic, but follow Rule of Three (wait for 3 occurrences)
- **KISS (Keep It Simple):** When DRY and KISS conflict, KISS wins
- **YAGNI (You Aren't Gonna Need It):** Don't build for hypothetical future requirements
- **Composition > Inheritance:** Assemble behavior from components
- **Early Returns:** Reduce nesting, fail fast

Expand Down Expand Up @@ -683,6 +681,6 @@ When deviating, document the reason with inline comments or ADRs (Architecture D

---

**Last Updated:** 2025-02-24
**Target Python Version:** 3.10+
**Last Updated:** 2026-02-24
**Target Python Version:** 3.13+
**Toolchain:** Ruff 0.8+, mypy 1.13+, pytest 8.0+, uv 0.5+
210 changes: 0 additions & 210 deletions AGENTS.md

This file was deleted.

2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgname=ollamaterm
pkgver=0.2.0
pkgrel=1
pkgdesc='ChatGPT-style TUI for Ollama local LLMs'
pkgdesc='Chat TUI for Ollama local LLMs'
arch=('any')
url='https://github.com/brian/Arch-Linux-Ollama-LLM-Chat'
license=('MIT')
Expand Down
Loading
Loading