-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
43 lines (30 loc) · 1.17 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
run:
SPELLCHECK_DICTIONARIES_PATH=/tmp/sm-dicts/ SPELLCHECK_API_KEY=debug uvicorn whole_app.__main__:SPELL_APP --reload
build:
docker build -t spellcheck-microservice .
prepare-buildx:
docker buildx create --use --name newbuilder
build-buildx:
docker buildx build --platform linux/amd64,linux/arm64 -t spellcheck-microservice .
exec:
docker run -it spellcheck-microservice bash
test:
pytest . -n3
test-in-docker:
docker run -t spellcheck-microservice bash -c "COVERAGE_FILE=/tmp/junk.coverage pytest . -n3"
lint:
ruff . --no-fix
mypy .
vulture whole_app --min-confidence 100
lint-in-docker:
docker run -t spellcheck-microservice bash -c "RUFF_CACHE_DIR=/tmp/ruff-cache ruff . --no-fix && mypy . && vulture whole_app --min-confidence 100"
run-prod:
docker run -p 10113:10113 -e SPELLCHECK_WORKERS=1 -t spellcheck-microservice:latest
check-languages:
python -c "import enchant; print(enchant.Broker().list_languages());"
check-languages-docker:
docker run -it spellcheck-microservice python -c "import enchant; print(enchant.Broker().list_languages());"
update-readme:
python -m scripts update-readme
update-dockerhub-readme:
python -m scripts update-dockerhub-readme