Daryl Lim Claude Opus 4.6 (1M context) commited on
Commit
03230b5
·
1 Parent(s): 421ec9c

docs: migrate setup instructions from pip/venv to uv

Browse files

Replace python -m venv and pip install with uv venv --python 3.12 and
uv pip install. Add uv to CLAUDE.md tooling section and README
requirements list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (2) hide show
  1. CLAUDE.md +3 -2
  2. README.md +3 -2
CLAUDE.md CHANGED
@@ -10,9 +10,9 @@ A Hugging Face Spaces app that translates English text to 22 production-ready la
10
 
11
  ```bash
12
  # Setup
13
- python -m venv .venv
14
  source .venv/bin/activate
15
- pip install -r requirements.txt
16
 
17
  # Run (launches on http://localhost:7860)
18
  python app.py
@@ -40,6 +40,7 @@ pytest -m slow # model tests only (CUDA only)
40
 
41
  ## Tooling
42
 
 
43
  - **Ruff** — linter and formatter (`ruff.toml`). Rules: `E`, `F`, `I`, `W`. Line length: 120.
44
  - **ty** — type checker (`ty.toml`). Python 3.12 target.
45
  - **pytest** — test runner (`pytest.ini`). Custom `slow` marker for CUDA-dependent tests.
 
10
 
11
  ```bash
12
  # Setup
13
+ uv venv --python 3.12
14
  source .venv/bin/activate
15
+ uv pip install -r requirements.txt
16
 
17
  # Run (launches on http://localhost:7860)
18
  python app.py
 
40
 
41
  ## Tooling
42
 
43
+ - **uv** — Python package manager. Used for venv creation and dependency installation from `requirements.txt`. No `pyproject.toml`; `requirements.txt` remains the single source of truth (required by HF Spaces).
44
  - **Ruff** — linter and formatter (`ruff.toml`). Rules: `E`, `F`, `I`, `W`. Line length: 120.
45
  - **ty** — type checker (`ty.toml`). Python 3.12 target.
46
  - **pytest** — test runner (`pytest.ini`). Custom `slow` marker for CUDA-dependent tests.
README.md CHANGED
@@ -17,15 +17,16 @@ Translate English text to 22 production-ready languages (BLEU 35+ both direction
17
 
18
  ## Requirements
19
 
 
20
  - Python 3.12
21
  - CUDA GPU (recommended) or CPU
22
 
23
  ## Setup
24
 
25
  ```bash
26
- python -m venv .venv
27
  source .venv/bin/activate
28
- pip install -r requirements.txt
29
  python app.py
30
  ```
31
 
 
17
 
18
  ## Requirements
19
 
20
+ - [uv](https://docs.astral.sh/uv/) (Python package manager)
21
  - Python 3.12
22
  - CUDA GPU (recommended) or CPU
23
 
24
  ## Setup
25
 
26
  ```bash
27
+ uv venv --python 3.12
28
  source .venv/bin/activate
29
+ uv pip install -r requirements.txt
30
  python app.py
31
  ```
32