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
40 changes: 38 additions & 2 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,48 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "poetry run python-claude session start"
},
{
"type": "command",
"command": "poetry run python-claude git status"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "poetry run python-claude ruff check"
},
{
"type": "command",
"command": "poetry run python-claude pytest"
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "jq -r .tool_input.file_path | { read file_path; if echo \"$file_path\" | grep -qE \"\\.(py)$\"; then scripts/lint.sh \"$file_path\"; fi; }"
"command": "poetry run python-claude ruff format"
},
{
"type": "command",
"command": "poetry run python-claude edited"
},
{
"type": "command",
"command": "poetry run python-claude mypy"
}
]
}
Expand Down
68 changes: 21 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,33 @@
name: Python CI
name: Continuous Integration

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths:
- .github/workflows/ci.yml
- poetry.lock
- pyproject.toml
- src/**
- tests/**
push:
paths:
- .github/workflows/ci.yml
- poetry.lock
- pyproject.toml
- src/**
- tests/**

jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install project
run: poetry install --no-interaction

- name: Ruff lint check
run: |
poetry run ruff check .

- name: Ruff format check
run: |
poetry run ruff format --check .
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Type check
run: |
poetry run mypy --strict .

- name: Run tests
run: |
poetry run pytest
- uses: CVector-Energy/python-test@main
with:
python-version: ${{ matrix.python-version }}
src-dirs: .
Loading