Skip to content
Merged

uv #194

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,22 @@ git clone https://github.com/nirtal85/Playwright-Python-Example
cd playwright-python
```

### Create and activate a virtual environment
### Create and activate a virtual environment then Install project dependencies

#### For Windows:
```bash
py -m pip install --user virtualenv
py -m venv env
pip install uv
uv venv
.\env\Scripts\activate
uv pip sync uv.lock
```
Comment on lines +46 to 54
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Clarify and standardize virtual environment instructions.
The updated instructions correctly replace Poetry commands with UV commands. However, there is an inconsistency: the Windows instructions show activation via .\env\Scripts\activate (line 52) while the Unix/Mac instructions activate with .venv (line 60). For consistency with workflows (which use .venv), update the Windows activation command to use .venv\Scripts\activate.

- .\env\Scripts\activate
+ .\.venv\Scripts\activate

Actionable: Update Windows Virtual Environment Activation Command

  • In the file .github/README.md, please update the Windows activation command from:
    .\env\Scripts\activate
    to:
    .\.venv\Scripts\activate
  • This change ensures consistency with Unix/Mac instructions that use .venv.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~46-~46: Possible missing comma found.
Context: ... ``` ### Create and activate a virtual environment then Install project dependencies ####...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 markdownlint-cli2 (0.17.2)

48-48: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


#### For Mac:
```bash
python3 -m pip install --user virtualenv
python3 -m venv venv
source venv/bin/activate
```

### Install Poetry

```bash
pip install poetry
```

### Install Project Dependencies

```bash
poetry install --no-root
python3 -m pip install uv
uv venv
source .venv/bin/activate
uv pip sync uv.lock
```

### Install playwright
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/devRun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
virtualenvs-path: .venv
- name: Install Dependencies
run: poetry install --no-interaction --no-root
enable-cache: true
- name: Create venv & install dependencies
run: |
uv venv
uv pip sync uv.lock
- name: Install Playwright Browsers
run: |
PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/')
Expand All @@ -33,12 +32,6 @@ jobs:
run: |
source .venv/bin/activate
xvfb-run pytest -m devRun --base-url ${{ vars.BASE_URL }}
- name: Cache dependencies if tests pass
if: success()
uses: actions/cache/save@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Auto-assign reviewers
uses: kentaro-m/auto-assign-action@v2.0.0
if: success()
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
virtualenvs-path: .venv
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
enable-cache: true
- name: Create venv & install dependencies
run: |
uv venv
uv pip sync uv.lock
- name: Install Playwright Browsers
run: |
PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/')
Expand Down
Loading