File tree Expand file tree Collapse file tree 6 files changed +2138
-6
lines changed
demo-assignments/A2-ABC/egypt Expand file tree Collapse file tree 6 files changed +2138
-6
lines changed Original file line number Diff line number Diff line change 11PLANTUML = java -jar ~/plantuml.jar
22
3- all : check-style check_types unittest create-uml localtest
4-
3+ all : check-style check_types run-test run-test-coverage create-docs create- uml localtest clean
4+ DOCS = docs
55
66.PHONY : check-style
77check-style :
@@ -17,10 +17,28 @@ check-types:
1717 mypy --disallow-untyped-defs --strict .
1818 @echo " Static type check done."
1919
20- .PHONY : unittest
21- unittest :
22- pytest --verbose --color=yes --cov --cov-report term-missing --cov-report html tests/
23- @echo " Unittest done."
20+ .PHONY : create-doc-folder
21+ create-doc-folder :
22+ @mkdir -p $(DOCS ) # creates all folder(s) if not exists
23+
24+ .PHONY : run-test
25+ run-test :
26+ ifeq ($(shell which pytest) , ) # if pytest not found
27+ @echo "pytest not found. Installing..."
28+ pip install pytest
29+ endif
30+ pytest --verbose --color=yes tests/
31+ @echo "All unittests passed!"
32+
33+ .PHONY : run-test-coverage
34+ run-test-coverage : create-doc-folder
35+ pytest --verbose --color=yes --cov --cov-report term-missing --cov-report=html:$(DOCS ) /htmlcov tests/
36+ @echo " All unittests passed!"
37+
38+ .PHONY : create-docs
39+ create-docs : create-doc-folder
40+ pdoc --output-dir $(DOCS ) /code-docs egypt.py kattis.py triangle.py # creates html docs
41+ @echo " html docs created and saved in $( DOCS) /code-docs"
2442
2543.PHONY : create-uml
2644create-uml :
You can’t perform that action at this time.
0 commit comments