Skip to content

Commit

Permalink
Fix: Update requirements.txt files and README.md with proper uv instr…
Browse files Browse the repository at this point in the history
…uctions

Co-Authored-By: ned.twigg@diffplug.com <ned.twigg@diffplug.com>
  • Loading branch information
devin-ai-integration[bot] and nedtwigg committed Dec 11, 2024
1 parent a4c9689 commit e9dc9af
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
33 changes: 25 additions & 8 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,31 @@

## Contributing

Dependencies are managed using uv:
- Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
- Then cd into each directory and run:
- Install: uv pip install -r requirements.txt -r dev-requirements.txt
- Tests: ./scripts/run-tests.sh
- Type checking: ./scripts/run-typecheck.sh
- Linting: ./scripts/run-lint.sh
- Auto-fix formatting: uv python -m ruff format && uv python -m ruff check --fix
Dependencies are managed using Python's venv and uv:

1. Create and activate virtual environment:
```bash
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Unix:
source .venv/bin/activate
```

2. Install dependencies:
```bash
python -m pip install --upgrade pip
pip install uv
uv pip install -r requirements.txt -r dev-requirements.txt
```

3. Run checks:
```bash
python -m pytest -vv
python -m pyright
python -m ruff format --check && python -m ruff check
```
- To fix formatting: `python -m ruff format && python -m ruff check --fix`

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

Expand Down
1 change: 0 additions & 1 deletion python/example-pytest-selfie/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
python>=3.9
flask>=3.0.3
openai>=1.0.0
-e ../selfie-lib
Expand Down
3 changes: 1 addition & 2 deletions python/pytest-selfie/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-e ../selfie-lib
pytest>=8.0.0
python>=3.9
-e ../selfie-lib
2 changes: 1 addition & 1 deletion python/selfie-lib/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python>=3.9

0 comments on commit e9dc9af

Please sign in to comment.