Skip to content

refactor(uv): make uv usage idiomatic (hatchling, dependency-groups, Docker, docs) - #16

Merged
mambo-wang merged 3 commits into
mambo-wang:developfrom
LiberiFatali:chore/uv-idiomatic
Aug 25, 2026
Merged

refactor(uv): make uv usage idiomatic (hatchling, dependency-groups, Docker, docs)#16
mambo-wang merged 3 commits into
mambo-wang:developfrom
LiberiFatali:chore/uv-idiomatic

Conversation

@LiberiFatali

@LiberiFatali LiberiFatali commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #15: uv.lock was added but usage stayed half-migrated — Docker and CI still used pip/--extra, docs were fragile and reproducibility was not pinned.

Goal: make the repo idiomatically uv-native while keeping pip as fallback.

Changes

  • Build: setuptoolshatchling (uv-recommended, faster, auto-discovers packages)
  • Deps: pip --extra devdependency-groups (PEP 735) with tool.uv.default-groups; pip install -e .[dev] still works
  • Tests: remove global --cov from addopts → CI-only coverage, so uv run pytest -q works without -o addopts=""
  • Python: pin .python-version to 3.12.13 for reproducible dev; requires-python >=3.12 unchanged so 3.13+ still supported
  • Git: stop ignoring tests/ (was hiding new tests)
  • Docker: pip installuv sync --frozen --no-group dev on ghcr.io/astral-sh/uv:python3.12-bookworm-slim with layer cache
  • CI: actions/checkout@v4v5 (Node 24) + sync README/CI/Docker docs; removed tracked .DS_Store

No change for pip install codewiki-plus users.

LiberiFatali and others added 3 commits August 25, 2026 18:52
…Docker, docs)

- build: setuptools -> hatchling (pyproject.toml:1) with tool.hatch.build, tool.uv.managed + default-groups
- deps: optional-dependencies.dev -> dependency-groups.dev (PEP 735) as canonical, keep pip [dev] extra as fallback; uv sync --frozen --extra dev -> uv sync --frozen (default-groups) (README.md:105, ci.yml:27)
- pytest: remove global --cov from addopts (pyproject.toml:140) -> CI-only --cov (ci.yml:30); local uv run pytest -q works without pytest-cov
- python: .python-version 3.12 -> 3.12.13 pinned (reproducible)
- gitignore: drop tests/* + !test_latest_compat.py (was hiding new tests) ( .gitignore:41)
- docker: pip install . -> uv sync --frozen --no-group dev on ghcr.io/astral-sh/uv:python3.12-bookworm-slim with layer-cache (docker/Dockerfile:1)
- docs: sync README zh/en, DOCKER_README, ci.yml to new workflow; uv lock regenerated
FSoft-AI4Code/CodeWiki#89 bumped checkout@v4->v5 and setup-python@v5->v6 for Node 20 EOL.
Apply checkout bump to CodeWiki-Plus (setup-uv already v6).
Also remove tracked .DS_Store (now .gitignore'd at .gitignore:77).

No input changes; fetch-depth and runner support unchanged (Node 24 requires runner v2.327.1+).
develop 在 merge-base 后新增 !tests/test_review_changes.py 例外(依附于
tests/* 规则)。按 PR mambo-wang#16 意图(stop ignoring tests/),tests 规则与
两个例外一并删除,tests/ 下所有文件均被 git 跟踪。
@mambo-wang
mambo-wang merged commit bb58b8d into mambo-wang:develop Aug 25, 2026
1 of 2 checks passed
@LiberiFatali
LiberiFatali deleted the chore/uv-idiomatic branch August 26, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants