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