forked from openedx-unsupported/edx-analytics-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (65 loc) · 2.83 KB
/
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
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
.PHONY: requirements
ROOT = $(shell echo "$$PWD")
COVERAGE = $(ROOT)/build/coverage
NODE_BIN=./node_modules/.bin
DJANGO_SETTINGS_MODULE ?= "analytics_dashboard.settings.local"
.PHONY: requirements clean
requirements: requirements.js
pip install -q -r requirements/base.txt --exists-action w
requirements.js:
npm install
$(NODE_BIN)/bower install
test.requirements: requirements
pip install -q -r requirements/test.txt --exists-action w
develop: test.requirements
pip install -q -r requirements/local.txt --exists-action w
migrate:
python manage.py migrate --run-syncdb
clean:
find . -name '*.pyc' -delete
coverage erase
test_python_no_compress: clean
python manage.py test analytics_dashboard common --settings=analytics_dashboard.settings.test --with-coverage \
--cover-package=analytics_dashboard --cover-package=common --cover-branches --cover-html --cover-html-dir=$(COVERAGE)/html/ \
--with-ignore-docstrings --cover-xml --cover-xml-file=$(COVERAGE)/coverage.xml
test_compress:
python manage.py compress --settings=analytics_dashboard.settings.test
test_python: test_compress test_python_no_compress
accept:
./scripts/runTests.sh acceptance_tests
# local acceptance tests are typically run with by passing in environment variables on the commandline
# e.g. API_SERVER_URL="http://localhost:9001/api/v0" API_AUTH_TOKEN="edx" make accept_local
accept_local:
nosetests -v acceptance_tests --exclude-dir=acceptance_tests/course_validation
a11y:
BOKCHOY_A11Y_CUSTOM_RULES_FILE=./node_modules/edx-custom-a11y-rules/lib/custom_a11y_rules.js SELENIUM_BROWSER=phantomjs ./scripts/runTests.sh a11y_tests
course_validation:
python -m acceptance_tests.course_validation.generate_report
quality:
pep8 acceptance_tests analytics_dashboard common
PYTHONPATH=".:./analytics_dashboard:$PYTHONPATH" pylint --rcfile=pylintrc acceptance_tests analytics_dashboard common
validate_python: test.requirements test_python quality
validate_js: requirements.js
$(NODE_BIN)/gulp test
$(NODE_BIN)/gulp lint
validate: validate_python validate_js
demo:
python manage.py switch show_engagement_forum_activity off --create
python manage.py switch enable_course_api off --create
python manage.py switch display_names_for_course_index off --create
python manage.py switch display_course_name_in_nav off --create
compile_translations:
cd analytics_dashboard && i18n_tool generate -v
extract_translations:
cd analytics_dashboard && i18n_tool extract -v
dummy_translations:
cd analytics_dashboard && i18n_tool dummy -v
generate_fake_translations: extract_translations dummy_translations compile_translations
pull_translations:
cd analytics_dashboard && tx pull -a
update_translations: pull_translations generate_fake_translations
static_no_compress:
$(NODE_BIN)/r.js -o build.js
python manage.py collectstatic --noinput
static: static_no_compress
python manage.py compress