-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (55 loc) · 2.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
default:
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-30s %s\n" $$help_command $$help_info ; \
done
clean-pyc: ## Delete all py[co] files and __pycache__ dir
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
clean-build: ## Removes python build and cache dirs
rm --force --recursive build/
rm --force --recursive dist/
rm --force --recursive *.egg-info
bootstrap: ## Install required system packages for this project
pip install --user -U pipenv pre-commit
pre-commit install
curl -o \
/usr/local/bin/circleci \
https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci &&\
chmod +x /usr/local/bin/circleci
install: ## Install project deps
pipenv install --dev
install-deploy: ## Same as "install" but verify Pipfile.lock is up-to-date
pipenv install --deploy
install-deploy-dev: ## Same as "install-deploy" but also install dev deps
pipenv install --deploy --dev
clean-env: ## Delete the virtual env
rm -rf .venv
format: ## Run Black formatter
pipenv run black ms tests
lint: ## Check formatting with Black
pipenv run black --check ms tests
test: ## Run unit tests
pipenv run pytest --cov ms --junitxml test-results/junit/results.xml tests
gen-doc: ## Generate Sphinx documentation
@echo "Not implemented"
run-local: ## Start app locally
pipenv run python ms/app.py
docker-build: ## Build docker container
docker build -t ms-exp .
docker-push: ## Login, tag and push latest image
docker login -u ${DOCKER_AUTH_USERNAME} -p ${DOCKER_AUTH_PASSWORD}
docker tag ms-exp:latest marcdufresne/ms-exploration:latest
docker push marcdufresne/ms-exploration:latest
docker-run: ## Run docker container
docker run -d -p 8000:8000 --name ms-exp ms-exp
docker-clean: ## Kill and remove app container
docker kill ms-exp
docker rm ms-exp
circleci-validate: ## Validate CircleCI config file
circleci config validate