Skip to content

Commit 226be1c

Browse files
committed
workflow: pre-commit and CI
1 parent d5a3a86 commit 226be1c

5 files changed

Lines changed: 62 additions & 75 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: ['3.11', '3.14t']
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
allow-prereleases: true
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
enable-cache: true
30+
31+
- name: Install dependencies
32+
run: uv sync
33+
34+
- name: Run prek
35+
run: uv run prek run --all-files

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dev = [
3737
"pytest-cov>=4.0.0",
3838
"ruff>=0.1.0",
3939
"mypy>=1.0.0",
40+
"prek>=0.1.0",
4041
]
4142

4243
[project.scripts]
@@ -60,7 +61,7 @@ dev = [
6061
"pytest-cov>=4.0.0",
6162
"ruff>=0.1.0",
6263
"mypy>=1.0.0",
63-
"pre-commit>=3.0.0",
64+
"prek>=0.1.0",
6465
]
6566

6667
[tool.uv]

src/cocoindex_code/indexer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import asyncio
44

5-
import cocoindex as coco
65
import cocoindex.asyncio as coco_aio
76
from cocoindex.connectors import localfs, sqlite
87
from cocoindex.ops.text import RecursiveSplitter, detect_code_language

src/cocoindex_code/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"cocoindex-code",
1414
instructions="""
1515
This server provides semantic code search for the codebase.
16-
This allows you to quickly and cheaply search for code related to a concept or functionality across the entire codebase.
16+
This allows you to quickly and cheaply search for code related to a concept or functionality
17+
across the entire codebase.
1718
1819
Use the `query` tool when you need to:
1920
- Find code related to a concept or functionality

uv.lock

Lines changed: 23 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)