Skip to content

Commit

Permalink
Switching to using uv as PIP installer. Various fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mindflayer committed May 7, 2024
1 parent ae39d9f commit 6c5ab8e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/make -f

install-dev-requirements:
pip install -U uv hatch
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv && uv pip install hatch

install-test-requirements:
uv pip install .[test]
Expand All @@ -12,22 +13,15 @@ services-up:
services-down:
docker compose down --remove-orphans

test-python:
@echo "Running Python tests"
wait-for-it --service httpbin.local:443 --service localhost:6379 --timeout 5 -- pytest tests/ || exit 1
@echo ""

lint-python:
@echo "Linting Python files"
flake8 --ignore=E501,E731,W503 --exclude=.git,compat.py --per-file-ignores='mocket/async_mocket.py:E999' mocket
@echo ""

setup: develop
pre-commit install

develop: install-dev-requirements install-test-requirements

test: lint-python test-python
test:
@echo "Running Python tests"
export VIRTUAL_ENV=.venv; .venv/bin/wait-for-it --service httpbin.local:443 --service localhost:6379 --timeout 5 -- .venv/bin/pytest tests/ || exit 1
@echo ""

safetest:
export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test
Expand Down

0 comments on commit 6c5ab8e

Please sign in to comment.