Skip to content

Commit a6e0a01

Browse files
committed
fix: precommit, dynamic version
1 parent cc75e62 commit a6e0a01

4 files changed

Lines changed: 2022 additions & 2034 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2325

2426
- name: Set up Python
2527
uses: actions/setup-python@v5

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ repos:
1515
args: [--fix]
1616
- id: ruff-format
1717

18-
- repo: local
18+
- repo: https://github.com/astral-sh/uv-pre-commit
19+
rev: 0.6.1
1920
hooks:
20-
- id: uv-lock-check
21-
name: uv lock check
22-
entry: uv lock --check
23-
language: system
24-
pass_filenames: false
21+
- id: uv-lock
22+
# Ensures uv.lock is up to date with pyproject.toml
2523

24+
- repo: local
25+
hooks:
2626
- id: mypy
2727
name: mypy
2828
entry: uv run mypy src/

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["hatchling"]
2+
requires = ["hatchling", "hatch-vcs"]
33
build-backend = "hatchling.build"
44

55
[project]
66
name = "cocoindex-code"
7-
version = "0.1.0"
7+
dynamic = ["version"]
88
description = "MCP server for indexing and querying codebases using CocoIndex"
99
readme = "README.md"
1010
license = "MIT"
@@ -48,6 +48,9 @@ Homepage = "https://github.com/cocoindex-io/cocoindex-code"
4848
Repository = "https://github.com/cocoindex-io/cocoindex-code"
4949
Issues = "https://github.com/cocoindex-io/cocoindex-code/issues"
5050

51+
[tool.hatch.version]
52+
source = "vcs"
53+
5154
[tool.hatch.build.targets.wheel]
5255
packages = ["src/cocoindex_code"]
5356

0 commit comments

Comments
 (0)