-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
102 lines (76 loc) · 2.61 KB
/
Makefile
File metadata and controls
102 lines (76 loc) · 2.61 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
init:
mkdir -p application/static/javascripts application/static/stylesheets
npm install
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements/requirements.txt -r requirements/dev-requirements.txt
clean:
@echo "Cleaning up node modules and generated assets..."
rm -rf node_modules
rm -rf application/static/stylesheets
rm -rf application/static/javascripts
rm -rf application/static/images
rm -rf application/static/govuk
rm -rf src/css/application.css
@pip freeze --exclude pip --exclude setuptools --exclude wheel > /tmp/pip-packages.txt 2>/dev/null || true
@pip uninstall -y -r /tmp/pip-packages.txt 2>/dev/null || true
@rm -f /tmp/pip-packages.txt
@echo "Clean complete! Run 'make init' or 'npm install' to rebuild."
reqs:
python -m piptools compile requirements/requirements.in
python -m piptools compile requirements/dev-requirements.in
sync:
python -m piptools sync requirements/requirements.txt requirements/dev-requirements.txt
upgrade:
python -m piptools compile --upgrade requirements/requirements.in
python -m piptools compile --upgrade requirements/dev-requirements.in
python -m piptools sync requirements/requirements.txt requirements/dev-requirements.txt
black:
black .
black-check:
black --check .
flake8:
flake8 .
isort:
isort --profile black .
lint: black-check flake8
run::
flask run
watch:
npm run watch
upgrade-db:
@echo "Now running 'upgrade-db'....."
flask db upgrade
downgrade-db:
flask db downgrade
load-data:
flask data load --spec 1 --config 1
drop-data:
flask data drop
test-unit:
@echo "Running Unit tests...."
python -m pytest tests/unit/ -v
test-integration:
@echo "Running Integration tests...."
# @echo "Not yet implemented"
python -m pytest tests/integration/ -v
test-acceptance:
@echo "Running Acceptance tests...."
# @echo "Not yet implemented"
python -m pytest tests/acceptance/ -v
test-accessibility:
@echo "Running Accessibility tests...."
@echo "Not yet implemented"
test:: test-coverage
# @echo "Running all tests...."
# python -m pytest tests/ -v
test-coverage:: coverage-unit coverage-integration coverage-acceptance
coverage-unit:
pytest --cov=application.blueprints.datamanager tests/unit/ -v --cov-report=term-missing
coverage-integration:
pytest --cov=application.blueprints.datamanager --cov-append tests/integration/ -v --cov-report=term-missing
coverage-acceptance:
pytest --cov=application.blueprints.datamanager --cov-append --cov-fail-under=70 tests/acceptance/ -v --cov-report=term-missing
dev-up:
docker-compose -f docker-compose-dev.yaml up -d
dev-down:
docker-compose -f docker-compose-dev.yaml down