Merge branch 'main' into asyncio
This commit is contained in:
commit
ca6ae7d6e9
47 changed files with 3285 additions and 760 deletions
50
Makefile
50
Makefile
|
@ -1,4 +1,5 @@
|
|||
NAME := redis_om
|
||||
NAME := aredis_om
|
||||
SYNC_NAME := redis_om
|
||||
INSTALL_STAMP := .install.stamp
|
||||
POETRY := $(shell command -v poetry 2> /dev/null)
|
||||
|
||||
|
@ -19,7 +20,7 @@ help:
|
|||
@echo "Check the Makefile to know exactly what each target is doing."
|
||||
|
||||
install: $(INSTALL_STAMP)
|
||||
$(INSTALL_STAMP): pyproject.toml poetry.lock
|
||||
$(INSTALL_STAMP): pyproject.toml
|
||||
@if [ -z $(POETRY) ]; then echo "Poetry could not be found. See https://python-poetry.org/docs/"; exit 2; fi
|
||||
$(POETRY) install
|
||||
touch $(INSTALL_STAMP)
|
||||
|
@ -28,23 +29,48 @@ $(INSTALL_STAMP): pyproject.toml poetry.lock
|
|||
clean:
|
||||
find . -type d -name "__pycache__" | xargs rm -rf {};
|
||||
rm -rf $(INSTALL_STAMP) .coverage .mypy_cache
|
||||
rm -rf build
|
||||
rm -rf dist
|
||||
rm -rf redis_om
|
||||
|
||||
|
||||
.PHONY: dist
|
||||
dist: $(INSTALL_STAMP) clean sync
|
||||
$(POETRY) build
|
||||
|
||||
.PHONY: sync
|
||||
sync: $(INSTALL_STAMP)
|
||||
$(POETRY) run python make_sync.py
|
||||
|
||||
.PHONY: upload
|
||||
upload: dist
|
||||
$(POETRY) run twine upload dist/*
|
||||
|
||||
.PHONY: lint
|
||||
lint: $(INSTALL_STAMP)
|
||||
$(POETRY) run isort --profile=black --lines-after-imports=2 ./tests/ $(NAME)
|
||||
lint: $(INSTALL_STAMP) dist
|
||||
$(POETRY) run isort --profile=black --lines-after-imports=2 ./tests/ $(NAME) $(SYNC_NAME)
|
||||
$(POETRY) run black ./tests/ $(NAME)
|
||||
$(POETRY) run flake8 --ignore=W503,E501,F401,E731 ./tests/ $(NAME)
|
||||
$(POETRY) run mypy ./tests/ $(NAME) --ignore-missing-imports
|
||||
$(POETRY) run bandit -r $(NAME) -s B608
|
||||
$(POETRY) run flake8 --ignore=W503,E501,F401,E731 ./tests/ $(NAME) $(SYNC_NAME)
|
||||
$(POETRY) run mypy ./tests/ $(NAME) $(SYNC_NAME) --ignore-missing-imports
|
||||
$(POETRY) run bandit -r $(NAME) $(SYNC_NAME) -s B608
|
||||
$(POETRY) run twine check dist/*
|
||||
|
||||
.PHONY: format
|
||||
format: $(INSTALL_STAMP)
|
||||
$(POETRY) run isort --profile=black --lines-after-imports=2 ./tests/ $(NAME)
|
||||
$(POETRY) run black ./tests/ $(NAME)
|
||||
format: $(INSTALL_STAMP) sync
|
||||
$(POETRY) run isort --profile=black --lines-after-imports=2 ./tests/ $(NAME) $(SYNC_NAME)
|
||||
$(POETRY) run black ./tests/ $(NAME) $(SYNC_NAME)
|
||||
|
||||
.PHONY: test
|
||||
test: $(INSTALL_STAMP)
|
||||
$(POETRY) run pytest -n auto -s -vv ./tests/ --cov-report term-missing --cov $(NAME)
|
||||
test: $(INSTALL_STAMP) sync
|
||||
$(POETRY) run pytest -n auto -s -vv ./tests/ --cov-report term-missing --cov $(NAME) $(SYNC_NAME)
|
||||
|
||||
.PHONY: test_oss
|
||||
test_oss: $(INSTALL_STAMP) sync
|
||||
# Specifically tests against a local OSS Redis instance via
|
||||
# docker-compose.yml. Do not use this for CI testing, where we should
|
||||
# instead have a matrix of Docker images.
|
||||
REDIS_OM_URL="redis://localhost:6381" $(POETRY) run pytest -n auto -s -vv ./tests/ --cov-report term-missing --cov $(NAME)
|
||||
|
||||
|
||||
.PHONY: shell
|
||||
shell: $(INSTALL_STAMP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue