Skip to content

Commit

Permalink
Restore [django] extra (#119)
Browse files Browse the repository at this point in the history
This also changes the purpose of `django.in` from being a "core + django
+ django" deps collection to just being the extra deps required for
django support.

- Modifies Tox/Travis configs. The pytest-pyNN test envs were breaking
  since they didn't specify a Django version, and I removed them.
- Puts Tox and Travis into  sync on which test environments to use.
- Moves pytest-django dependency from django.in to test.in
  • Loading branch information
timmc-edx authored Mar 25, 2020
1 parent 2f31dc8 commit 085963d
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 134 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ matrix:
include:
- python: "3.5"
env: TOXENV=quality
- python: "2.7"
env: TOXENV=pytest-py27
- python: "3.5"
env: TOXENV=pytest-py35
env: TOXENV=without-django

install:
- make requirements
Expand All @@ -42,4 +40,4 @@ deploy:
python: "3.5"
condition: "$TOXENV = django111"
distributions: sdist bdist_wheel
repo: edx/opaque-keys
repo: edx/opaque-keys
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include CHANGELOG.rst
include LICENSE
include README.rst
include requirements/base.in
include requirements/django.in
recursive-include opaque_keys *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
pip install -qr requirements/pip-tools.txt
pip-compile --rebuild --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip-compile --rebuild --upgrade -o requirements/base.txt requirements/base.in
pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in
pip-compile --rebuild --upgrade -o requirements/django.txt requirements/django.in
pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in
pip-compile --rebuild --upgrade -o requirements/django-test.txt requirements/django-test.in
pip-compile --rebuild --upgrade -o requirements/doc.txt requirements/doc.in
pip-compile --rebuild --upgrade -o requirements/travis.txt requirements/travis.in
pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/dev.in
# Let tox control the Django version for tests
sed '/^[dD]jango==/d' requirements/django.txt > requirements/django.tmp
mv requirements/django.tmp requirements/django.txt
sed '/^[dD]jango==/d' requirements/django-test.txt > requirements/django-test.tmp
mv requirements/django-test.tmp requirements/django-test.txt
7 changes: 3 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mccabe==0.6.1 # via -r requirements/doc.txt, pylint
mock==3.0.5 # via -r requirements/doc.txt
more-itertools==5.0.0 # via -r requirements/doc.txt, pytest
packaging==20.3 # via -r requirements/doc.txt, -r requirements/travis.txt, pytest, sphinx, tox
pathlib2==2.3.5 # via -r requirements/doc.txt, -r requirements/travis.txt, importlib-metadata, importlib-resources, pytest, pytest-django, virtualenv
pathlib2==2.3.5 # via -r requirements/doc.txt, -r requirements/travis.txt, importlib-metadata, importlib-resources, pytest, virtualenv
pbr==5.4.4 # via -r requirements/doc.txt, stevedore
pep8==1.7.1 # via -r requirements/doc.txt, pytest-pep8
pip-tools==4.5.1 # via -r requirements/pip-tools.txt
Expand All @@ -66,12 +66,11 @@ pyopenssl==19.1.0 # via -r requirements/travis.txt, urllib3
pyparsing==2.4.6 # via -r requirements/doc.txt, -r requirements/travis.txt, packaging
pytest-cache==1.0 # via -r requirements/doc.txt, pytest-pep8
pytest-cov==2.8.1 # via -r requirements/doc.txt
pytest-django==3.8.0 # via -r requirements/doc.txt
pytest-forked==1.1.3 # via -r requirements/doc.txt, pytest-xdist
pytest-pep8==1.0.6 # via -r requirements/doc.txt
pytest-pylint==0.14.1 # via -r requirements/doc.txt
pytest-xdist==1.31.0 # via -r requirements/doc.txt
pytest==4.6.9 # via -r requirements/doc.txt, pytest-cache, pytest-cov, pytest-django, pytest-forked, pytest-pep8, pytest-pylint, pytest-xdist
pytest==4.6.9 # via -r requirements/doc.txt, pytest-cache, pytest-cov, pytest-forked, pytest-pep8, pytest-pylint, pytest-xdist
pytz==2019.3 # via -r requirements/doc.txt, babel
readme-renderer==25.0 # via -r requirements/doc.txt
requests==2.23.0 # via -r requirements/doc.txt, -r requirements/travis.txt, coveralls, sphinx
Expand All @@ -89,7 +88,7 @@ tox==3.14.5 # via -r requirements/travis.txt, tox-battery
typing==3.7.4.1 # via -r requirements/doc.txt, -r requirements/travis.txt, importlib-resources, sphinx
urllib3[secure]==1.25.8 # via -r requirements/doc.txt, -r requirements/travis.txt, coveralls, requests
virtualenv==20.0.13 # via -r requirements/travis.txt, tox
wcwidth==0.1.8 # via -r requirements/doc.txt, pytest
wcwidth==0.1.9 # via -r requirements/doc.txt, pytest
webencodings==0.5.1 # via -r requirements/doc.txt, bleach
wrapt==1.12.1 # via -r requirements/doc.txt, astroid
zipp==1.2.0 # via -r requirements/doc.txt, -r requirements/travis.txt, importlib-metadata, importlib-resources
Expand Down
7 changes: 7 additions & 0 deletions requirements/django-test.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Requirements for test runs, including the django aspects.
-c constraints.txt

-r test.txt # Core dependencies
-r django.txt # Dependencies for [django] extra

pytest-django # For testing with the [django] extra
59 changes: 59 additions & 0 deletions requirements/django-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# make upgrade
#
apipkg==1.5 # via -r requirements/test.txt, execnet
astroid==1.6.6 # via -r requirements/test.txt, pylint, pylint-celery
atomicwrites==1.3.0 # via -r requirements/test.txt, pytest
attrs==19.3.0 # via -r requirements/test.txt, hypothesis, pytest
backports.functools-lru-cache==1.6.1 # via -r requirements/test.txt, astroid, isort, pylint
click-log==0.3.2 # via -r requirements/test.txt, edx-lint
click==7.1.1 # via -r requirements/test.txt, click-log, edx-lint
configparser==4.0.2 # via -r requirements/test.txt, importlib-metadata, pylint
contextlib2==0.6.0.post1 # via -r requirements/test.txt, importlib-metadata, zipp
coverage==5.0.4 # via -r requirements/test.txt, pytest-cov
ddt==1.3.1 # via -r requirements/test.txt
edx-lint==1.4.1 # via -r requirements/test.txt
enum34==1.1.10 # via -r requirements/test.txt, astroid, hypothesis
execnet==1.7.1 # via -r requirements/test.txt, pytest-cache, pytest-xdist
funcsigs==1.0.2 # via -r requirements/test.txt, mock, pytest
futures==3.3.0 ; python_version == "2.7" # via -c requirements/constraints.txt, -r requirements/test.txt, isort
hypothesis==4.57.1 # via -r requirements/test.txt
importlib-metadata==1.5.0 # via -r requirements/test.txt, pluggy, pytest
isort==4.3.21 # via -r requirements/test.txt, pylint
lazy-object-proxy==1.4.3 # via -r requirements/test.txt, astroid
mccabe==0.6.1 # via -r requirements/test.txt, pylint
mock==3.0.5 # via -r requirements/test.txt
more-itertools==5.0.0 # via -r requirements/test.txt, pytest
packaging==20.3 # via -r requirements/test.txt, pytest
pathlib2==2.3.5 # via -r requirements/test.txt, importlib-metadata, pytest, pytest-django
pbr==5.4.4 # via -r requirements/test.txt, stevedore
pep8==1.7.1 # via -r requirements/test.txt, pytest-pep8
pluggy==0.13.1 # via -r requirements/test.txt, pytest
py==1.8.1 # via -r requirements/test.txt, pytest
pycodestyle==2.5.0 # via -r requirements/test.txt
pylint-celery==0.3 # via -r requirements/test.txt, edx-lint
pylint-django==0.11.1 # via -r requirements/test.txt, edx-lint
pylint-plugin-utils==0.6 # via -r requirements/test.txt, pylint-celery, pylint-django
pylint==1.9.5 # via -r requirements/test.txt, edx-lint, pylint-celery, pylint-django, pylint-plugin-utils, pytest-pylint
pymongo==3.10.1 # via -r requirements/test.txt
pyparsing==2.4.6 # via -r requirements/test.txt, packaging
pytest-cache==1.0 # via -r requirements/test.txt, pytest-pep8
pytest-cov==2.8.1 # via -r requirements/test.txt
pytest-django==3.8.0 # via -r requirements/django-test.in
pytest-forked==1.1.3 # via -r requirements/test.txt, pytest-xdist
pytest-pep8==1.0.6 # via -r requirements/test.txt
pytest-pylint==0.14.1 # via -r requirements/test.txt
pytest-xdist==1.31.0 # via -r requirements/test.txt
pytest==4.6.9 # via -r requirements/test.txt, pytest-cache, pytest-cov, pytest-django, pytest-forked, pytest-pep8, pytest-pylint, pytest-xdist
pytz==2019.3 # via -r requirements/django.txt, django
scandir==1.10.0 # via -r requirements/test.txt, pathlib2
singledispatch==3.4.0.3 # via -r requirements/test.txt, astroid, pylint
six==1.14.0 # via -r requirements/test.txt, astroid, edx-lint, mock, more-itertools, packaging, pathlib2, pylint, pytest, pytest-pylint, pytest-xdist, singledispatch, stevedore
sortedcontainers==2.1.0 # via -r requirements/test.txt, hypothesis
stevedore==1.32.0 # via -r requirements/test.txt
wcwidth==0.1.9 # via -r requirements/test.txt, pytest
wrapt==1.12.1 # via -r requirements/test.txt, astroid
zipp==1.2.0 # via -r requirements/test.txt, importlib-metadata
8 changes: 5 additions & 3 deletions requirements/django.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Requirements for test runs utilizing Django support
# Requirements for [django] extra, not including base deps
-c constraints.txt

-r test.txt # Non-Django testing dependencies
# Match resolved versions of core dependencies (doesn't actually pull them in)
-c base.txt

pytest-django

Django>=1.11
54 changes: 2 additions & 52 deletions requirements/django.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,5 @@
#
# make upgrade
#
apipkg==1.5 # via -r requirements/test.txt, execnet
astroid==1.6.6 # via -r requirements/test.txt, pylint, pylint-celery
atomicwrites==1.3.0 # via -r requirements/test.txt, pytest
attrs==19.3.0 # via -r requirements/test.txt, hypothesis, pytest
backports.functools-lru-cache==1.6.1 # via -r requirements/test.txt, astroid, isort, pylint
click-log==0.3.2 # via -r requirements/test.txt, edx-lint
click==7.1.1 # via -r requirements/test.txt, click-log, edx-lint
configparser==4.0.2 # via -r requirements/test.txt, importlib-metadata, pylint
contextlib2==0.6.0.post1 # via -r requirements/test.txt, importlib-metadata, zipp
coverage==5.0.4 # via -r requirements/test.txt, pytest-cov
ddt==1.3.1 # via -r requirements/test.txt
edx-lint==1.4.1 # via -r requirements/test.txt
enum34==1.1.10 # via -r requirements/test.txt, astroid, hypothesis
execnet==1.7.1 # via -r requirements/test.txt, pytest-cache, pytest-xdist
funcsigs==1.0.2 # via -r requirements/test.txt, mock, pytest
futures==3.3.0 ; python_version == "2.7" # via -c requirements/constraints.txt, -r requirements/test.txt, isort
hypothesis==4.57.1 # via -r requirements/test.txt
importlib-metadata==1.5.0 # via -r requirements/test.txt, pluggy, pytest
isort==4.3.21 # via -r requirements/test.txt, pylint
lazy-object-proxy==1.4.3 # via -r requirements/test.txt, astroid
mccabe==0.6.1 # via -r requirements/test.txt, pylint
mock==3.0.5 # via -r requirements/test.txt
more-itertools==5.0.0 # via -r requirements/test.txt, pytest
packaging==20.3 # via -r requirements/test.txt, pytest
pathlib2==2.3.5 # via -r requirements/test.txt, importlib-metadata, pytest, pytest-django
pbr==5.4.4 # via -r requirements/test.txt, stevedore
pep8==1.7.1 # via -r requirements/test.txt, pytest-pep8
pluggy==0.13.1 # via -r requirements/test.txt, pytest
py==1.8.1 # via -r requirements/test.txt, pytest
pycodestyle==2.5.0 # via -r requirements/test.txt
pylint-celery==0.3 # via -r requirements/test.txt, edx-lint
pylint-django==0.11.1 # via -r requirements/test.txt, edx-lint
pylint-plugin-utils==0.6 # via -r requirements/test.txt, pylint-celery, pylint-django
pylint==1.9.5 # via -r requirements/test.txt, edx-lint, pylint-celery, pylint-django, pylint-plugin-utils, pytest-pylint
pymongo==3.10.1 # via -r requirements/test.txt
pyparsing==2.4.6 # via -r requirements/test.txt, packaging
pytest-cache==1.0 # via -r requirements/test.txt, pytest-pep8
pytest-cov==2.8.1 # via -r requirements/test.txt
pytest-django==3.8.0 # via -r requirements/django.in
pytest-forked==1.1.3 # via -r requirements/test.txt, pytest-xdist
pytest-pep8==1.0.6 # via -r requirements/test.txt
pytest-pylint==0.14.1 # via -r requirements/test.txt
pytest-xdist==1.31.0 # via -r requirements/test.txt
pytest==4.6.9 # via -r requirements/test.txt, pytest-cache, pytest-cov, pytest-django, pytest-forked, pytest-pep8, pytest-pylint, pytest-xdist
scandir==1.10.0 # via -r requirements/test.txt, pathlib2
singledispatch==3.4.0.3 # via -r requirements/test.txt, astroid, pylint
six==1.14.0 # via -r requirements/test.txt, astroid, edx-lint, mock, more-itertools, packaging, pathlib2, pylint, pytest, pytest-pylint, pytest-xdist, singledispatch, stevedore
sortedcontainers==2.1.0 # via -r requirements/test.txt, hypothesis
stevedore==1.32.0 # via -r requirements/test.txt
wcwidth==0.1.8 # via -r requirements/test.txt, pytest
wrapt==1.12.1 # via -r requirements/test.txt, astroid
zipp==1.2.0 # via -r requirements/test.txt, importlib-metadata
django==1.11.29 # via -r requirements/django.in
pytz==2019.3 # via django
2 changes: 1 addition & 1 deletion requirements/doc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Requirements for documentation generation and validation
-c constraints.txt

-r django.txt # Core and testing dependencies for this package
-r test.txt # Core and testing dependencies for this package

edx_sphinx_theme # edX theme for Sphinx output
readme_renderer # Validates README.rst for usage on PyPI
Expand Down
Loading

0 comments on commit 085963d

Please sign in to comment.