-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 720 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 720 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
38
39
# Makefile consists:
# Install requirements
# Run script
# pytest
# unittest
# Variables
PYTHON = python
MAIN_SCRIPT = main.py
# Set default make option
.DEFAULT_GOAL:=menu
# Targets
.PHONY: menu install run pytest unittest
# Print Makefile menu
menu:
@echo Makefile Menu:
@echo 1. Install requirements (make install)
@echo 2. Run the script (make run)
@echo 3. Run pytest on all tests (make pytest)
@echo 4. Run unittest (make unittest)
# Install dependencies
install:
pip install -r requirements.txt
# Run the Python script
run:
$(PYTHON) $(MAIN_SCRIPT)
# Run pytest on tests
pytest:
$(PYTHON) -m pytest tests/
# Run unittest
unittest:
$(PYTHON) -m unittest tests/test_do_sparql_qyery_unittest.py