Query-Movies / Makefile
Shubham Krishna
Movie-search demo
4e264f1
SHELL := /bin/bash
venv:
python -m venv venv
.PHONY: install
install: ## Install main dependencies
poetry install --sync
.PHONY: install-dev
install: ## Install dependencies including dev dependencies such as test and docs
poetry install --sync --with test,docs
.PHONY: ruff
ruff:
ruff check .
.PHONY: bandit
bandit:
bandit -r . -c pyproject.toml
.PHONY: mypy
mypy:
mypy . --config-file pyproject.toml
.PHONY: style
style:
ruff check . --fix
mypy . --config-file pyproject.toml
bandit -r . -c pyproject.toml
.PHONY: run
run:
python -m $(demo).app
.PHONY: build
build:
docker build -t $(CONTAINER_REGISTRY)/$(IMAGE_NAME):$(or $(tag), $(DEFAULT_IMAGE_TAG)) .
.PHONY: push
push:
docker push $(CONTAINER_REGISTRY)/$(IMAGE_NAME):$(or $(tag), $(DEFAULT_IMAGE_TAG))
.PHONY: docker-run
docker-run:
docker run -it --rm -p 7860:7860 \
$(CONTAINER_REGISTRY)/$(IMAGE_NAME):$(or $(tag), $(DEFAULT_IMAGE_TAG)) \
python -m $(demo).app
.PHONY: clean
clean:
find . -type f -name "*.DS_Store" -ls -delete
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf
find . | grep -E ".pytest_cache" | xargs rm -rf
find . | grep -E ".mypy_cache" | xargs rm -rf
find . | grep -E ".ruff_cache" | xargs rm -rf
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf