-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
29 lines (22 loc) · 823 Bytes
/
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
SHELL := /bin/bash
help:
@echo "Available Commands:"
@echo ""
@echo "format: apply all available formatters"
@echo ""
@echo "test: run all tests"
@echo ""
@echo "update-examples: update outputs for every example directory"
@echo ""
py_warn = PYTHONDEVMODE=1
# 'shopt -s globstar' allows us to run **/*.py globs. By default bash can't do recursive globs
format:
shopt -s globstar; \
poetry run pyupgrade autograder/**/*.py --py38-plus --exit-zero-even-if-changed; \
poetry run autoflake autograder --in-place --recursive --remove-all-unused-imports --ignore-init-module-imports --verbose; \
poetry run isort autograder; \
poetry run black autograder;
test:
poetry run pytest -v --cov=autograder --cov-report=term-missing:skip-covered --cov-report=xml tests;
update-examples:
bash update_examples.bash