-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 1014 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 1014 Bytes
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
# Variables
PACKAGE_NAME=cli_parser
DOCKER_IMAGE_NAME=cli_parser
PYTHON=python3
PIP=pip3
ARGS?=--help
# Targets
.PHONY: all build_image run_tests install_local run_script clean help
all: build_image run_tests install_local run_script
build_image:
docker build -t $(DOCKER_IMAGE_NAME) .
run_tests:
PYTHONPATH=src pytest tests/ --verbose
install_local:
$(PIP) install .
run_script:
$(PYTHON) -m src.parser $(ARGS)
clean:
find . -type d -name "__pycache__" -exec rm -r {} +
rm -rf build dist *.egg-info
help:
@echo "Makefile targets:"
@echo " all - Build the Docker image, run tests, install package locally, and run the script"
@echo " build_image - Build the Docker image from the Dockerfile"
@echo " run_tests - Run the tests with pytest"
@echo " install_local - Install the package locally using pip"
@echo " run_script - Run the parser script locally"
@echo " clean - Remove temporary files and directories"
@echo " help - Show this help message"