Skip to content

Commit

Permalink
Revert "[BD] Move to tox"
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 authored Jun 11, 2020
1 parent f436b9f commit d61e794
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
31 changes: 14 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,30 +94,27 @@ quality: tox.requirements run_pylint run_check_isort run_pycodestyle

validate: test.requirements test quality

static: tox.requirements
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-static
static:
python manage.py collectstatic --noinput

migrate: tox.requirements
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-migrate -- --run-syncdb --database=default
migrate:
./manage.py migrate --noinput --run-syncdb --database=default

migrate-all: tox.requirements
$(foreach db_name,$(DATABASES),\
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-migrate -- --run-syncdb --database=$(db_name);\
)
migrate-all:
$(foreach db_name,$(DATABASES),./manage.py migrate --noinput --run-syncdb --database=$(db_name);)

loaddata: migrate
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-loaddata
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-generate_fake_course_data

demo: clean loaddata
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-set_api_key
python manage.py loaddata problem_response_answer_distribution --database=analytics
python manage.py generate_fake_course_data

demo: clean requirements loaddata
python manage.py set_api_key edx edx

# Target used by edx-analytics-dashboard during its testing.
travis: clean migrate-all
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-set_api_key
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-loaddata
tox -e $(PYTHON_ENV)-$(DJANGO_VERSION)-generate_fake_course_data -- --num-weeks=2 --no-videos --course-id "edX/DemoX/Demo_Course"
travis: clean test.requirements migrate-all
python manage.py set_api_key edx edx
python manage.py loaddata problem_response_answer_distribution --database=analytics
python manage.py generate_fake_course_data --num-weeks=2 --no-videos --course-id "edX/DemoX/Demo_Course"
docker_build:
docker build . -f Dockerfile -t openedx/analytics-data-api
docker build . -f Dockerfile --target newrelic -t openedx/analytics-data-api:latest-newrelic
Expand Down
5 changes: 0 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,3 @@ commands =
tests: python -Wd -m pytest {posargs}
coverage: coverage html
coverage: coverage xml
generate_fake_course_data: python manage.py generate_fake_course_data {posargs}
loaddata: python manage.py loaddata problem_response_answer_distribution --database=analytics
migrate: python manage.py migrate --noinput {posargs}
set_api_key: python manage.py set_api_key edx edx
static: python manage.py collectstatic --noinput

0 comments on commit d61e794

Please sign in to comment.