Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to uv #852

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
27 changes: 13 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,36 @@ clean:
rm -rf .mypy_cache .pytest_cache .ruff_cache build dist htmlcov .coverage

install-dev:
poetry install --all-extras
poetry run pre-commit install
poetry run playwright install
uv sync --group dev --all-extras
uv run pre-commit install
uv run playwright install

build:
poetry build --no-interaction -vv
uv build -v

# APIFY_PYPI_TOKEN_CRAWLEE is expected to be set in the environment
publish-to-pypi:
poetry config pypi-token.pypi "${APIFY_PYPI_TOKEN_CRAWLEE}"
poetry publish --no-interaction -vv
uv publish -v --token "${APIFY_PYPI_TOKEN_CRAWLEE}"

lint:
poetry run ruff format --check $(DIRS_WITH_CODE)
poetry run ruff check $(DIRS_WITH_CODE)
uv run ruff format --check $(DIRS_WITH_CODE)
uv run ruff check $(DIRS_WITH_CODE)

type-check:
poetry run mypy $(DIRS_WITH_CODE)
uv run mypy $(DIRS_WITH_CODE)

unit-tests:
poetry run pytest --numprocesses=auto --verbose --cov=src/crawlee tests/unit
uv run pytest --numprocesses=auto --verbose --cov=src/crawlee tests/unit

unit-tests-cov:
poetry run pytest --numprocesses=auto --verbose --cov=src/crawlee --cov-report=html tests/unit
uv run pytest --numprocesses=auto --verbose --cov=src/crawlee --cov-report=html tests/unit

integration-tests:
poetry run pytest --numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) tests/integration
uv run pytest --numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) tests/integration

format:
poetry run ruff check --fix $(DIRS_WITH_CODE)
poetry run ruff format $(DIRS_WITH_CODE)
uv run ruff check --fix $(DIRS_WITH_CODE)
uv run ruff format $(DIRS_WITH_CODE)

# The check-code target runs a series of checks equivalent to those performed by pre-commit hooks
# and the run_checks.yaml GitHub Actions workflow.
Expand Down
Loading
Loading