-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 1.2 KB
/
Makefile
File metadata and controls
41 lines (32 loc) · 1.2 KB
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
.PHONY: mypy-check lint format format-check install
CURRENT_UID := $(shell id -u):$(shell id -g)
install:
@#@ Install env variables
cp .env.example .env
.PHONY: prereq
prereq:
test -f .env || echo >> .env
docker network create deps-network || true
.PHONY: build
build:
docker compose build
mypy-check:
@#@ Run typechecking using mypy
docker compose run --rm --no-deps -u "$(CURRENT_UID)" object-storage mypy deps_object_storage --ignore-missing-imports
lint:
@#@ Run linter
docker compose run --rm --no-deps -u "$(CURRENT_UID)" object-storage flake8 deps_object_storage
format:
docker compose run --rm --no-deps -u "$(CURRENT_UID)" object-storage python -m black -l 120 .
docker compose run --rm --no-deps -u "$(CURRENT_UID)" object-storage isort --settings-path /app/setup.cfg .
format-check:
docker compose run --rm --no-deps -u "$(CURRENT_UID)" object-storage black -l 120 --check .
docker compose run --rm --no-deps -u "$(CURRENT_UID)" object-storage isort --settings-path /app/setup.cfg --check-only .
ci: | prereq format-check lint mypy-check
@#@ Run CI checks
@echo "Done"
clean:
@#@ Clean junk files
find . -name \*.pyc -delete
find . -name __pycache__ -exec rm -rf {} \;
rm -rf *.egg-info