-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
62 lines (53 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
52
53
54
55
56
57
58
59
60
61
62
WORKDIR = $(shell pwd)
LIBRARIES = scaleway-core scaleway-async scaleway
build:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry build; \
done
install-dependencies:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry install --no-root; \
done
install-only-root:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry install --only-root; \
done
format:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry run ruff --version && \
poetry run ruff format; \
done
format-check:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry run ruff --version && \
poetry run ruff format --check; \
done
typing:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry run mypy --version && \
poetry run mypy --install-types --non-interactive --strict $$(echo $$lib | tr "-" "_"); \
done
lint:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry run ruff --version && \
poetry run ruff check . --ignore E721 --ignore F541; \
done
test:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry run python -m unittest discover -s tests -v; \
done
publish: install-dependencies
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry version "${PACKAGE_VERSION}" && \
poetry build && \
poetry publish --repository "${PYPI_REPOSITORY}" --no-interaction; \
done