-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
68 lines (51 loc) · 2.23 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
SHELL := /bin/bash
.PHONY: all format format-fix format-tests format-src test-idiomatic test-idiomatic-unit test-idiomatic-integration build help
all: help
FMT_FLAGS ?= --check
format: format-src format-tests
format-tests:
poetry run ruff check tests
poetry run ruff format tests $(FMT_FLAGS)
poetry run mypy tests
format-src:
poetry run ruff check astrapy
poetry run ruff format astrapy $(FMT_FLAGS)
poetry run mypy astrapy
format-fix: format-fix-src format-fix-tests
format-fix-src: FMT_FLAGS=
format-fix-src: format-src
format-fix-tests: FMT_FLAGS=
format-fix-tests: format-tests
test-idiomatic:
poetry run pytest tests/idiomatic -vv
test-idiomatic-unit:
poetry run pytest tests/idiomatic/unit -vv
test-idiomatic-integration:
poetry run pytest tests/idiomatic/integration -vv
docker-test-idiomatic:
DOCKER_COMPOSE_LOCAL_DATA_API="yes" poetry run pytest tests/idiomatic -vv
docker-test-idiomatic-unit:
DOCKER_COMPOSE_LOCAL_DATA_API="yes" poetry run pytest tests/idiomatic/unit -vv
docker-test-idiomatic-integration:
DOCKER_COMPOSE_LOCAL_DATA_API="yes" poetry run pytest tests/idiomatic/integration -vv
build:
rm -f dist/astrapy*
poetry build
help:
@echo "======================================================================"
@echo "AstraPy make command purpose"
@echo "----------------------------------------------------------------------"
@echo "format full lint and format checks"
@echo " format-src limited to source"
@echo " format-tests limited to tests"
@echo " format-fix fixing imports and style"
@echo " format-fix-src limited to source"
@echo " format-fix-tests limited to tests"
@echo "test-idiomatic run idiomatic tests"
@echo " test-idiomatic-unit unit only"
@echo " test-idiomatic-integration integration only"
@echo "docker-test-idiomatic same, on docker container"
@echo " docker-test-idiomatic-unit same"
@echo " docker-test-idiomatic-integration same"
@echo "build build package ready for PyPI"
@echo "======================================================================"