|
1 |
| -.PHONY: clean install-dev build publish-to-pypi lint type-check unit-tests unit-tests-cov integration-tests format check-code build-api-reference run-docs |
| 1 | +.PHONY: clean install-dev build publish-to-pypi lint type-check unit-tests unit-tests-cov \ |
| 2 | + integration-tests format check-code build-api-reference run-docs |
2 | 3 |
|
3 | 4 | # This is default for local testing, but GitHub workflows override it to a higher value in CI
|
4 | 5 | INTEGRATION_TESTS_CONCURRENCY = 1
|
|
7 | 8 | rm -rf .mypy_cache .pytest_cache .ruff_cache build dist htmlcov .coverage
|
8 | 9 |
|
9 | 10 | install-dev:
|
10 |
| - poetry install --all-extras |
11 |
| - poetry run pre-commit install |
12 |
| - poetry run playwright install |
13 |
| - poetry run python -m browserforge update |
| 11 | + uv sync --all-extras |
| 12 | + uv run pre-commit install |
| 13 | + uv run playwright install |
| 14 | + uv run python -m browserforge update |
14 | 15 |
|
15 | 16 | build:
|
16 |
| - poetry build --no-interaction -vv |
| 17 | + uv build --verbose |
17 | 18 |
|
18 | 19 | # APIFY_PYPI_TOKEN_CRAWLEE is expected to be set in the environment
|
19 | 20 | publish-to-pypi:
|
20 |
| - poetry config pypi-token.pypi "${APIFY_PYPI_TOKEN_CRAWLEE}" |
21 |
| - poetry publish --no-interaction -vv |
| 21 | + uv publish --verbose --token "${APIFY_PYPI_TOKEN_CRAWLEE}" |
22 | 22 |
|
23 | 23 | lint:
|
24 |
| - poetry run ruff format --check |
25 |
| - poetry run ruff check |
| 24 | + uv run ruff format --check |
| 25 | + uv run ruff check |
26 | 26 |
|
27 | 27 | type-check:
|
28 |
| - poetry run mypy |
| 28 | + uv run mypy |
29 | 29 |
|
30 | 30 | unit-tests:
|
31 |
| - poetry run pytest --numprocesses=auto --verbose --cov=src/crawlee tests/unit |
| 31 | + uv run pytest --numprocesses=auto --verbose --cov=src/crawlee tests/unit |
32 | 32 |
|
33 | 33 | unit-tests-cov:
|
34 |
| - poetry run pytest --numprocesses=auto --verbose --cov=src/crawlee --cov-report=html tests/unit |
| 34 | + uv run pytest --numprocesses=auto --verbose --cov=src/crawlee --cov-report=html tests/unit |
35 | 35 |
|
36 | 36 | integration-tests:
|
37 |
| - poetry run pytest --numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) tests/integration |
| 37 | + uv run pytest --numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) --verbose tests/integration |
38 | 38 |
|
39 | 39 | format:
|
40 |
| - poetry run ruff check --fix |
41 |
| - poetry run ruff format |
| 40 | + uv run ruff check --fix |
| 41 | + uv run ruff format |
42 | 42 |
|
43 | 43 | # The check-code target runs a series of checks equivalent to those performed by pre-commit hooks
|
44 | 44 | # and the run_checks.yaml GitHub Actions workflow.
|
45 | 45 | check-code: lint type-check unit-tests
|
46 | 46 |
|
47 | 47 | build-api-reference:
|
48 |
| - cd website && poetry run ./build_api_reference.sh |
| 48 | + cd website && uv run ./build_api_reference.sh |
49 | 49 |
|
50 | 50 | build-docs:
|
51 |
| - cd website && corepack enable && yarn && poetry run yarn build |
| 51 | + cd website && corepack enable && yarn && uv run yarn build |
52 | 52 |
|
53 | 53 | run-docs: build-api-reference
|
54 |
| - cd website && corepack enable && yarn && poetry run yarn start |
| 54 | + cd website && corepack enable && yarn && uv run yarn start |
0 commit comments