Skip to content

Commit e9dc9af

Browse files
Fix: Update requirements.txt files and README.md with proper uv instructions
Co-Authored-By: [email protected] <[email protected]>
1 parent a4c9689 commit e9dc9af

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

python/README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,31 @@
44

55
## Contributing
66

7-
Dependencies are managed using uv:
8-
- Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
9-
- Then cd into each directory and run:
10-
- Install: uv pip install -r requirements.txt -r dev-requirements.txt
11-
- Tests: ./scripts/run-tests.sh
12-
- Type checking: ./scripts/run-typecheck.sh
13-
- Linting: ./scripts/run-lint.sh
14-
- Auto-fix formatting: uv python -m ruff format && uv python -m ruff check --fix
7+
Dependencies are managed using Python's venv and uv:
8+
9+
1. Create and activate virtual environment:
10+
```bash
11+
python -m venv .venv
12+
# On Windows:
13+
.venv\Scripts\activate
14+
# On Unix:
15+
source .venv/bin/activate
16+
```
17+
18+
2. Install dependencies:
19+
```bash
20+
python -m pip install --upgrade pip
21+
pip install uv
22+
uv pip install -r requirements.txt -r dev-requirements.txt
23+
```
24+
25+
3. Run checks:
26+
```bash
27+
python -m pytest -vv
28+
python -m pyright
29+
python -m ruff format --check && python -m ruff check
30+
```
31+
- To fix formatting: `python -m ruff format && python -m ruff check --fix`
1532

1633
Our CI server runs these checks for all Python packages (`selfie-lib`, `pytest-selfie`, and `example-pytest-selfie`).
1734

python/example-pytest-selfie/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
python>=3.9
21
flask>=3.0.3
32
openai>=1.0.0
43
-e ../selfie-lib
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
-e ../selfie-lib
21
pytest>=8.0.0
3-
python>=3.9
2+
-e ../selfie-lib

python/selfie-lib/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python>=3.9
1+

0 commit comments

Comments
 (0)