-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
49 lines (38 loc) · 1.2 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
ifeq (, $(shell which poetry))
$(error "No poetry found in PATH, check out: https://github.com/python-poetry/poetry#installation")
endif
.PHONY: lint clean publish install check test
help:
@echo "\n%% aiosnow dev tools %%"
@echo - install: create venv and install dependencies
@echo - update: update dependencies
@echo - shell: activate virtual environment
@echo - test: run tests
@echo - publish: publish to pypi
@echo - clean: remove cache and bytecode files
@echo - lint: check code formatting
@echo - reformat: reformat
@echo ""
update:
poetry update
install:
poetry update
shell:
poetry shell
test:
poetry run python -m pytest
clean:
rm -rf dist .mypy_cache docs/build .pytest_cache
find aiosnow -type d -name __pycache__ -exec rm -rv {} +
find aiosnow -type f -name "*.py[co]" -delete
publish:
make clean
poetry publish --build
lint:
poetry run mypy aiosnow --disallow-untyped-defs
poetry run autoflake --recursive aiosnow tests
poetry run black aiosnow tests --check
reformat:
poetry run autoflake --in-place --recursive aiosnow tests
poetry run black aiosnow tests examples
poetry run isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 aiosnow tests