33
44uninstall :
55 pip install -r requirements/pip.txt
6- while pip uninstall -y edx.analytics.tasks; do true ; done
6+ pip uninstall -y edx.analytics.tasks
77 python setup.py clean
88
99install : requirements uninstall
@@ -28,7 +28,7 @@ docker-shell:
2828system-requirements :
2929ifeq (,$(wildcard /usr/bin/yum) )
3030 # This is not great, we can't use these libraries on slave nodes using this method.
31- sudo apt-get install -y -q libmysqlclient-dev libpq-dev python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev
31+ sudo apt-get install -y -q libmysqlclient-dev libpq-dev python-dev python3-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev
3232else
3333 sudo yum install -y -q postgresql-devel libffi-devel
3434endif
@@ -56,20 +56,48 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
5656 CUSTOM_COMPILE_COMMAND=" make upgrade" pip-compile --upgrade -o requirements/docs.txt requirements/docs.in
5757 CUSTOM_COMPILE_COMMAND=" make upgrade" pip-compile --upgrade -o requirements/test.txt requirements/test.in
5858
59- test-docker-local :
60- docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make develop-local test-local
61-
59+ # Entry point for running python 2 unit tests in CI.
6260test-docker :
63- docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make reset-virtualenv test-requirements develop-local test-local
61+ docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make system-requirements reset-virtualenv test-requirements develop-local test-local
6462
63+ # Entry point for running python 3 unit tests in CI.
6564test-docker-py3 :
66- docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make reset-virtualenv-py3 test-requirements develop-local test-local
65+ docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make system-requirements reset-virtualenv-py3 test-requirements develop-local test-local
66+
67+ # Entry point for running python 3 unit tests in CI. Only invokes a subset
68+ # (whitelist) of unit tests which are known to pass under python 3.
69+ test-docker-py3-whitelist :
70+ docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make system-requirements reset-virtualenv-py3 test-requirements develop-local test-local-py3-whitelist
6771
6872test-local :
6973 # TODO: when we have better coverage, modify this to actually fail when coverage is too low.
7074 rm -rf .coverage
7175 LUIGI_CONFIG_PATH=' config/test.cfg' python -m coverage run --rcfile=./.coveragerc -m nose --with-xunit --xunit-file=unittests.xml -A ' not acceptance'
7276
77+ # Speical test-local target specifically for running a whitelist of tests which
78+ # are known to pass under python 3
79+ test-local-py3-whitelist :
80+ # TODO: when we have better coverage, modify this to actually fail when coverage is too low.
81+ rm -rf .coverage
82+ LUIGI_CONFIG_PATH=' config/test.cfg' python -m coverage run --rcfile=./.coveragerc -m nose --with-xunit --xunit-file=unittests.xml -A ' not acceptance' \
83+ edx.analytics.tasks.enterprise.tests \
84+ edx.analytics.tasks.insights.tests.test_database_imports \
85+ edx.analytics.tasks.insights.tests.test_grades \
86+ edx.analytics.tasks.monitor.tests.test_overall_events \
87+ edx.analytics.tasks.tests \
88+ edx.analytics.tasks.util.tests.helpers \
89+ edx.analytics.tasks.util.tests.opaque_key_mixins \
90+ edx.analytics.tasks.util.tests.test_decorators \
91+ edx.analytics.tasks.util.tests.test_geolocation \
92+ edx.analytics.tasks.util.tests.test_hive \
93+ edx.analytics.tasks.util.tests.test_retry \
94+ edx.analytics.tasks.util.tests.test_s3_util \
95+ edx.analytics.tasks.util.tests.test_url \
96+ edx.analytics.tasks.warehouse.financial.tests \
97+ edx.analytics.tasks.warehouse.tests.test_internal_reporting_active_users \
98+ edx.analytics.tasks.warehouse.tests.test_internal_reporting_database \
99+ edx.analytics.tasks.warehouse.tests.test_run_vertica_sql_scripts
100+
73101test : test-requirements develop test-local
74102
75103test-acceptance : test-requirements
@@ -98,7 +126,7 @@ quality-docker-local:
98126 docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make develop-local quality-local
99127
100128quality-docker :
101- docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make reset-virtualenv test-requirements develop-local quality-local
129+ docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest make system-requirements reset-virtualenv test-requirements develop-local quality-local
102130
103131coverage-docker :
104132 docker run --rm -u root -v ` (pwd)` :/edx/app/analytics_pipeline/analytics_pipeline -it edxops/analytics_pipeline:latest coverage xml
0 commit comments