Skip to content

chore: add uv project metadata (issue #42, PR-A) - #418

Draft
OktavianusKokoh wants to merge 2 commits into
shiyu-coder:masterfrom
OktavianusKokoh:ai-team/demo
Draft

OktavianusKokoh wants to merge 2 commits into
shiyu-coder:masterfrom
OktavianusKokoh:ai-team/demo

Conversation

@OktavianusKokoh

Copy link
Copy Markdown

Summary

Part of #42 (PR-A only): add uv project metadata (pyproject.toml + uv.lock) while keeping a pip-friendly requirements.txt, and document uv sync / uv sync --extra dev next to pip install -r requirements.txt in the README.

Problem solved: the repo had no lockable project metadata for reproducible installs; this focused PR introduces uv without replacing the documented pip path.

Final changes

  • pyproject.toml — project metadata, runtime deps, optional extras (dev/webui/finetune), hatchling packages = ["model"]
  • uv.lock — locked resolution
  • requirements.txt — synced to pyproject pins (duplicate unpinned pandas removed; pandas==2.2.2 kept)
  • README.md — Installation section: pip + uv

Public API unchanged (Kronos, KronosTokenizer, KronosPredictor). model/ and tests/ untouched.

Acceptance criteria (PR-A) & verification

Criterion Result
uv sync works; pip path works or README documents uv PASS — uv sync --extra dev exit 0; README documents both
Baseline pytest → 4 passed PASS
No HF/model weight pin changes PASS — huggingface_hub==0.33.1, safetensors==0.6.2 unchanged
ruff / pre-commit Deferred to PR-B / PR-C (not in this PR)

Code review: PASS on candidate SHA below.

Verified commit SHA

2b08409a4432b5a96844ba18dbafac1e15ae0b86

Test commands & evidence

git rev-parse HEAD → 2b08409a4432b5a96844ba18dbafac1e15ae0b86 (exit 0)
git status --short → clean (exit 0)
uv --version → uv 0.13.5 (exit 0)
UV_PROJECT_ENVIRONMENT=…/.venv uv sync --extra dev → exit 0
…/python -m pytest tests/ -q → 4 passed, 1 warning (exit 0)
…/python -c "from model import Kronos, KronosTokenizer, KronosPredictor" → OK (exit 0)
…/python -m pip install -r requirements.txt → exit 1 (No module named pip in shared uv-managed .venv; non-blocking — README prefers uv)

Known limitations / human review notes

  • PR-A only — ruff and pre-commit come in later focused PRs.
  • Shared CI/dev envs managed solely by uv may lack pip; use uv sync (documented) or ensure pip exists for the README pip line.
  • Related older draft on branch ai-team/issue-42-pra-uv: chore: add uv project metadata (issue #42, PR-A) #417 — this PR supersedes that tip for the batch based on 918f5c1.
  • Please do not merge until maintainer review; agents will not merge.

Test plan

  • uv sync --extra dev
  • python -m pytest tests/ -q → 4 passed
  • Maintainer: fresh clone uv sync --extra dev && python -m pytest tests/ -q
Introduce pyproject.toml and uv.lock while keeping a pip-friendly
requirements.txt. Document uv sync / uv sync --extra dev alongside pip
in the README installation section. Stacked on batch base 918f5c1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant