Skip to content

Commit 74cebc7

Browse files
committed
Make test dependencies required instead of optional
This change moves pytest and anyio from optional dev dependencies to required dependencies to prevent issues when running `uv sync` without `--all-extras`. Changes: - Moved pytest and anyio to main dependencies in pyproject.toml - Removed `--all-extras` flag from CI workflow since it's no longer needed - This prevents developers from accidentally running sync without test deps The `--all-extras` flag was previously required in CI and local development, which was error-prone since running `uv sync` would remove test dependencies, breaking the ability to run tests.
1 parent 6f2cd0c commit 74cebc7

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/shared.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
enable-cache: true
2121
version: 0.9.5
2222
- name: Install dependencies
23-
run: uv sync --frozen --all-extras --python 3.10
23+
run: uv sync --frozen --python 3.10
2424

2525
- uses: pre-commit/action@v3.0.1
2626
with:
@@ -53,7 +53,7 @@ jobs:
5353
version: 0.9.5
5454

5555
- name: Install the project
56-
run: uv sync ${{ matrix.dep-resolution.install-flags }} --all-extras --python ${{ matrix.python-version }}
56+
run: uv sync ${{ matrix.dep-resolution.install-flags }} --python ${{ matrix.python-version }}
5757

5858
- name: Run pytest
5959
run: uv run ${{ matrix.dep-resolution.install-flags }} --no-sync pytest
@@ -71,7 +71,7 @@ jobs:
7171
version: 0.9.5
7272

7373
- name: Install dependencies
74-
run: uv sync --frozen --all-extras --python 3.10
74+
run: uv sync --frozen --python 3.10
7575

7676
- name: Check README snippets are up to date
7777
run: uv run --frozen scripts/update_readme_snippets.py --check

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ dev = [
6060
"pytest-pretty>=1.2.0",
6161
"inline-snapshot>=0.23.0",
6262
"dirty-equals>=0.9.0",
63+
# Optional dependencies needed for testing
64+
"rich>=13.9.4",
65+
"typer>=0.16.0",
66+
"python-dotenv>=1.0.0",
67+
"websockets>=15.0.1",
6368
]
6469
docs = [
6570
"mkdocs>=1.6.1",

uv.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)