forked from dlt-hub/verified-sources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (40 loc) · 1.36 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.PHONY: install-poetry has-poetry dev lint test
.SILENT:has-poetry
help:
@echo "make"
@echo " install-poetry"
@echo " installs newest poetry version"
@echo " dev"
@echo " prepares development env"
@echo " lint"
@echo " runs flake and mypy on all sources"
@echo " test"
@echo " tests all the components including destinations"
install-poetry:
ifneq ($(VIRTUAL_ENV),)
$(error you cannot be under virtual environment $(VIRTUAL_ENV))
endif
curl -sSL https://install.python-poetry.org | python3 -
has-poetry:
poetry --version
dev: has-poetry
poetry install --without unstructured_data
lint-dlt-init:
poetry run ./check-requirements.py
poetry run pytest tests/test_dlt_init.py --no-header
lint-code:
./check-package.sh
poetry run mypy --config-file mypy.ini ./sources
# poetry run mypy --config-file mypy.ini ./tests/rest_api
poetry run mypy --config-file mypy.ini ./tools
poetry run flake8 --max-line-length=200 --extend-ignore=W503 sources init --show-source
poetry run flake8 --max-line-length=200 --extend-ignore=W503 tests --show-source
poetry run black ./ --diff
lint: lint-code lint-dlt-init
format:
poetry run black ./
format-lint: format lint
test:
poetry run pytest tests
test-local:
ALL_DESTINATIONS='["duckdb", "postgres"]' DESTINATION__POSTGRES__CREDENTIALS=postgresql://loader:loader@localhost:5432/dlt_data poetry run pytest tests