Skip to content

Commit

Permalink
Merge pull request #568 from edx/feanil/unpin_drf
Browse files Browse the repository at this point in the history
Feanil/unpin drf
  • Loading branch information
feanil authored May 2, 2019
2 parents 447c0bf + 91032d8 commit 8e4878e
Show file tree
Hide file tree
Showing 19 changed files with 91 additions and 73 deletions.
21 changes: 13 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ cache: pip
python:
- 2.7
env:
- DJANGO_SETTINGS_MODULE=test_settings
- DJANGO_SETTINGS_MODULE=test_setting TOXENV=django111-drf37
- DJANGO_SETTINGS_MODULE=test_setting TOXENV=django111-drf38
- DJANGO_SETTINGS_MODULE=test_setting TOXENV=django111-drf39
- DJANGO_SETTINGS_MODULE=test_setting TOXENV=django111-drflatest
- DJANGO_SETTINGS_MODULE=test_setting TOXENV=quality
- TOXENV=js
- TOXENV=translations
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- pip install --upgrade pip
install:
- pip install setuptools>=32.3.1 # need newer version than Travis default
- make install
- pip install tox-travis
- pip install -r requirements/test.txt
- npm install
before_script:
- npm install -g gulp-cli
script:
- make validate_translations
- make test-all
- make test-js
- make lint-js
- tox
after_success:
- coverage xml
- bash <(curl -s https://codecov.io/bash) -cF python -f coverage.xml
Expand All @@ -28,6 +31,7 @@ deploy:
distributions: sdist bdist_wheel
on:
tags: true
condition: '$TOXENV=quality'
password:
secure: Xx0ya0JKOzPEX5fL389UQxiSnu46D/tVWwdgKXGT+g9GceQsxUWyshqC8uPF1KgKQfMynmC4C/XQOktfQj4LEv2EQPfnYP7Aog+swxS23jHevQYC7H0mlc5pyzTqfGbb5nr1gVtq2pjfsvC2RSgrZGigpCympyD1qKb6HBb3xcCpaUpLBMJFO+uUCIKYe6zJ0zxykW1Z66qE7igNyfvDqMbB/Sn6VO9PBrQOnTNnl4JyLer6gN+nztJTvpgwcKT7jUjtJtBDoTqj9ia/jJLGhAYNppCdLwmjNU1aN+e6X7J0HXBizOgqL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21SJQmIaJIUSOoM+r1lQ=
on:
tags: true
condition: '$TOXENV=quality'
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
pip-compile --upgrade -o requirements/doc.txt requirements/doc.in
pip-compile --upgrade -o requirements/quality.txt requirements/quality.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
# Let tox control the Django version for tests
sed '/^django==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt
# Let tox control the Django and djangorestframework versions for tests
sed -i.tmp '/^[d|D]jango==/d' requirements/test.txt
sed -i.tmp '/^djangorestframework==/d' requirements/test.txt
rm requirements/test.txt.tmp

requirements: ## install development environment requirements
pip install -qr requirements/dev.txt --exists-action w
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
from __future__ import absolute_import

# Be sure to update the version number in edx_proctoring/package.json
__version__ = '1.7.1'
__version__ = '2.0.0'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
8 changes: 2 additions & 6 deletions edx_proctoring/tests/test_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@ def test_boolean_fields(self):
serializer = ProctoredExamSerializer(data=data)

self.assertFalse(serializer.is_valid())
self.assertDictEqual(
{
'is_proctored': [u'"bla" is not a valid boolean.'],
'is_practice_exam': [u'"bla" is not a valid boolean.'],
}, serializer.errors
)
self.assertIn('is_proctored', serializer.errors)
self.assertIn('is_practice_exam', serializer.errors)
8 changes: 4 additions & 4 deletions edx_proctoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,10 @@ def put(self, request, attempt_id):
)
else:
exam_attempt_id = False
LOG.warn(u'Browser JS reported problem with proctoring desktop '
u'application. Did block user: %s, for attempt: %s',
should_block_user,
attempt['id'])
LOG.warning(u'Browser JS reported problem with proctoring desktop '
u'application. Did block user: %s, for attempt: %s',
should_block_user,
attempt['id'])
elif action == 'decline':
exam_attempt_id = update_attempt_status(
attempt['proctored_exam']['id'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@edx/edx-proctoring",
"//": "Be sure to update the version number in edx_proctoring/__init__.py",
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "1.7.1",
"version": "2.0.0",
"main": "edx_proctoring/static/index.js",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Core requirements for using this application
-c constraints.txt

# Django/Framework Packages
django<2,>=1.11
django-model-utils>=2.3.1
djangorestframework>=3.1,<3.7
djangorestframework
django-ipware>=1.1.0
jsonfield>=2.0.2
pytz>=2018
Expand Down
7 changes: 2 additions & 5 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --upgrade -o requirements/base.txt requirements/base.in
#
appdirs==1.4.3 # via fs
backports.os==0.1.1 # via fs
certifi==2019.3.9 # via requests
chardet==3.0.4 # via requests
django-crum==0.7.3
Expand All @@ -15,16 +14,15 @@ django-waffle==0.16.0
django-webpack-loader==0.6.0
django==1.11.20
djangorestframework-jwt==1.11.0 # via edx-drf-extensions
djangorestframework==3.6.4
djangorestframework==3.9.3
edx-django-utils==1.0.3 # via edx-drf-extensions
edx-drf-extensions==2.2.0
edx-opaque-keys==0.4.4
edx-rest-api-client==1.9.2
edx-when==0.1.3
enum34==1.1.6 # via fs
event-tracking==0.2.8
fs==2.4.4 # via xblock
future==0.17.1 # via backports.os, pyjwkest
future==0.17.1 # via pyjwkest
idna==2.8 # via requests
jsonfield==2.0.2
lxml==4.3.3 # via xblock
Expand All @@ -46,7 +44,6 @@ semantic-version==2.6.0 # via edx-drf-extensions
six==1.12.0 # via edx-drf-extensions, edx-opaque-keys, event-tracking, fs, pyjwkest, python-dateutil, stevedore, xblock
slumber==0.7.1 # via edx-rest-api-client
stevedore==1.30.1 # via edx-opaque-keys
typing==3.6.6 # via fs
urllib3==1.24.2 # via requests
web-fragments==0.3.0 # via xblock
webob==1.8.5 # via xblock
Expand Down
19 changes: 19 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Version constraints for pip installation.
#
# This file doesn't install any packages. It specifies version constraints
# that will be applied if a package is needed.
#
# When pinning something here, please provide an explanation of why. Ideally,
# link to other information that will help people in the future to remove the
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

# Sphinx 2.0.0 drops support for python 2.7 which we still need.
Sphinx<2.0.0


# A dependency of pytest. Pytest doesn't constrain it and 6.0.0 onward
# only works with python 3
more-itertools<6.0.0

path.py<12.0 # path.py 12.0 drops support for python 2.7
3 changes: 2 additions & 1 deletion requirements/dev.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Additional requirements for development of this application
-c constraints.txt

-r quality.in

Expand All @@ -10,5 +11,5 @@ tox # virtualenv management for tests
tox-battery # Makes tox aware of requirements file changes
twine # Utility for PyPI package uploads
wheel # For generation of wheels for PyPI
path.py==11.5.0 # pinned because of python 3 incompatibility
path.py
django>=1.11,<2.0
15 changes: 3 additions & 12 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,21 @@
#
argparse==1.4.0 # via caniusepython3
astroid==1.5.2 # via edx-lint, pylint, pylint-celery
backports.functools-lru-cache==1.5 # via astroid, caniusepython3, isort, pylint
backports.functools-lru-cache==1.5 # via caniusepython3
bleach==3.1.0 # via readme-renderer
caniusepython3==7.0.0
certifi==2019.3.9 # via requests
chardet==3.0.4 # via requests
click-log==0.1.8 # via edx-lint
click==7.0 # via click-log, edx-lint, pip-tools
configparser==3.7.4 # via importlib-metadata, pydocstyle, pylint
contextlib2==0.5.5 # via importlib-metadata
diff-cover==2.0.0
distlib==0.2.8 # via caniusepython3
django==1.11.20
docutils==0.14 # via readme-renderer
edx-i18n-tools==0.4.8
edx_lint==0.5.5
enum34==1.1.6 # via astroid
filelock==3.0.10 # via tox
futures==3.2.0 # via caniusepython3, isort
idna==2.8 # via requests
importlib-metadata==0.9 # via path.py
inflect==2.1.0 # via jinja2-pluralize
isort==4.3.17
jinja2-pluralize==0.3.0 # via diff-cover
Expand All @@ -34,8 +29,7 @@ lazy-object-proxy==1.3.1 # via astroid
markupsafe==1.1.1 # via jinja2
mccabe==0.6.1 # via pylint
packaging==19.0 # via caniusepython3
path.py==11.5.0
pathlib2==2.3.3 # via importlib-metadata
path.py==11.5.2
pip-tools==3.6.1
pkginfo==1.5.0.1 # via twine
pluggy==0.9.0 # via tox
Expand All @@ -54,9 +48,7 @@ pyyaml==5.1 # via edx-i18n-tools
readme-renderer==24.0 # via twine
requests-toolbelt==0.9.1 # via twine
requests==2.21.0 # via caniusepython3, requests-toolbelt, twine
scandir==1.10.0 # via pathlib2
singledispatch==3.4.0.3 # via astroid, pylint
six==1.12.0 # via astroid, bleach, diff-cover, edx-i18n-tools, edx-lint, packaging, pathlib2, pip-tools, pydocstyle, pylint, readme-renderer, singledispatch, tox
six==1.12.0 # via astroid, bleach, diff-cover, edx-i18n-tools, edx-lint, packaging, pip-tools, pydocstyle, pylint, readme-renderer, tox
snowballstemmer==1.2.1 # via pydocstyle
toml==0.10.0 # via tox
tox-battery==0.5.1
Expand All @@ -68,4 +60,3 @@ virtualenv==16.5.0 # via tox
webencodings==0.5.1 # via bleach
wheel==0.33.1
wrapt==1.11.1 # via astroid
zipp==0.4.0 # via importlib-metadata
1 change: 1 addition & 0 deletions requirements/doc.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Requirements for documentation validation
-c constraints.txt

-r base.in

Expand Down
7 changes: 2 additions & 5 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
alabaster==0.7.12 # via sphinx
appdirs==1.4.3 # via fs
babel==2.6.0 # via sphinx
backports.os==0.1.1 # via fs
bleach==3.1.0 # via readme-renderer
certifi==2019.3.9 # via requests
chardet==3.0.4 # via doc8, requests
Expand All @@ -18,7 +17,7 @@ django-waffle==0.16.0
django-webpack-loader==0.6.0
django==1.11.20
djangorestframework-jwt==1.11.0 # via edx-drf-extensions
djangorestframework==3.6.4
djangorestframework==3.9.3
doc8==0.8.0
docutils==0.14 # via doc8, readme-renderer, restructuredtext-lint, sphinx
edx-django-utils==1.0.3 # via edx-drf-extensions
Expand All @@ -27,10 +26,9 @@ edx-opaque-keys==0.4.4
edx-rest-api-client==1.9.2
edx-sphinx-theme==1.4.0
edx-when==0.1.3
enum34==1.1.6 # via fs
event-tracking==0.2.8
fs==2.4.4 # via xblock
future==0.17.1 # via backports.os, pyjwkest
future==0.17.1 # via pyjwkest
idna==2.8 # via requests
imagesize==1.1.0 # via sphinx
jinja2==2.10.1 # via sphinx
Expand Down Expand Up @@ -64,7 +62,6 @@ sphinx==1.8.5
sphinxcontrib-napoleon==0.7
sphinxcontrib-websupport==1.1.0 # via sphinx
stevedore==1.30.1 # via doc8, edx-opaque-keys
typing==3.6.6 # via fs, sphinx
urllib3==1.24.2 # via requests
web-fragments==0.3.0 # via xblock
webencodings==0.5.1 # via bleach
Expand Down
3 changes: 2 additions & 1 deletion requirements/quality.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Requirements for code quality checks
-c constraints.txt

caniusepython3 # Additional Python 3 compatibility pylint checks
edx_lint==0.5.5 # Python code linting rules
isort # to standardize order of imports
pycodestyle # PEP 8 compliance validation
pydocstyle # PEP 257 compliance validation
django<2.0
django<2.0
8 changes: 2 additions & 6 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@
#
argparse==1.4.0 # via caniusepython3
astroid==1.5.2 # via edx-lint, pylint, pylint-celery
backports.functools-lru-cache==1.5 # via astroid, caniusepython3, isort, pylint
backports.functools-lru-cache==1.5 # via caniusepython3
caniusepython3==7.0.0
certifi==2019.3.9 # via requests
chardet==3.0.4 # via requests
click-log==0.1.8 # via edx-lint
click==7.0 # via click-log, edx-lint
configparser==3.7.4 # via pydocstyle, pylint
distlib==0.2.8 # via caniusepython3
django==1.11.20
edx_lint==0.5.5
enum34==1.1.6 # via astroid
futures==3.2.0 # via caniusepython3, isort
idna==2.8 # via requests
isort==4.3.17
lazy-object-proxy==1.3.1 # via astroid
Expand All @@ -32,8 +29,7 @@ pylint==1.7.1 # via edx-lint, pylint-celery, pylint-django, pylint-p
pyparsing==2.4.0 # via packaging
pytz==2019.1 # via django
requests==2.21.0 # via caniusepython3
singledispatch==3.4.0.3 # via astroid, pylint
six==1.12.0 # via astroid, edx-lint, packaging, pydocstyle, pylint, singledispatch
six==1.12.0 # via astroid, edx-lint, packaging, pydocstyle, pylint
snowballstemmer==1.2.1 # via pydocstyle
urllib3==1.24.2 # via requests
wrapt==1.11.1 # via astroid
3 changes: 3 additions & 0 deletions requirements/test.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Requirements for test runs.
-c constraints.txt

-r base.in

edx-i18n-tools # be able to run `make validate_translations`
pytest-cov # pytest extension for code coverage statistics
pytest-django # pytest extension for better Django support
pytest-xdist # pytest extension for parallel execution


bok-choy>=0.3.1
ddt>=0.8.0
freezegun>=0.3.1
Expand Down
Loading

0 comments on commit 8e4878e

Please sign in to comment.