Skip to content

Commit

Permalink
Merge pull request #14 from edx/jmbowman/PLAT-2063
Browse files Browse the repository at this point in the history
PLAT-2063 Fix dependency management
  • Loading branch information
Jeremy Bowman authored Mar 26, 2018
2 parents 8b028cd + 9860818 commit 02971bd
Show file tree
Hide file tree
Showing 29 changed files with 302 additions and 88 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pip-log.txt
.cache/
.coverage
.coverage.*
.pytest_cache/
.tox
coverage.xml
htmlcov/
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Simon Chen <[email protected]>
Gregory Martin <[email protected]>
Alessandro Roux <[email protected]>
Sofiya Semenova <[email protected]>
Jeremy Bowman <[email protected]>
7 changes: 6 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Change Log
Unreleased
~~~~~~~~~~

[0.1.2] - 2018-03-23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Fix management of dependency versions

[0.1.1] - 2018-03-23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Fixes wildly inefficient raw query in BlockCompletion.latest_blocks_completed_all_courses()
Expand Down Expand Up @@ -46,7 +51,7 @@ Unreleased

* Add settings and service method for determining completion-by-viewing delay.

[0.0.6] - 2018-02-13
[0.0.6] - 2018-02-13
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Add the additional completion logic into the service and models from edx-platform
Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE.txt
include README.rst
include requirements/*.txt
include requirements/base.in
include requirements/test.in
recursive-include completion *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ help: ## display this help message
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'

install:
pip install -r requirements/django.txt
pip install -r requirements/dev.txt

clean: ## remove generated byte code, coverage reports, and build artifacts
Expand All @@ -44,13 +43,13 @@ docs: ## generate Sphinx HTML documentation, including API docs

upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q pip-tools
pip-compile --upgrade -o requirements/dev.txt requirements/base.in requirements/dev.in requirements/quality.in
pip-compile --upgrade -o requirements/doc.txt requirements/base.in requirements/doc.in
pip-compile --upgrade -o requirements/dev.txt requirements/dev.in
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/base.in requirements/test.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/travis.txt requirements/travis.in
# Let tox control the Django version for tests
sed '/django==/d' requirements/test.txt > requirements/test.tmp
sed '/^django==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt

quality: ## check coding style with pycodestyle and pylint
Expand Down
2 changes: 1 addition & 1 deletion completion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
from __future__ import unicode_literals


__version__ = '0.1.1'
__version__ = '0.1.2'

default_app_config = 'completion.apps.CompletionAppConfig' # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion completion/api/permissions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Permissions classes for the API.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

from django.http import Http404
from rest_framework.permissions import BasePermission
Expand Down
2 changes: 1 addition & 1 deletion completion/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Api URLs.
"""

from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

from django.conf.urls import include, url

Expand Down
2 changes: 1 addition & 1 deletion completion/api/v1/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
API v1 URLs.
"""

from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

from django.conf.urls import url

Expand Down
2 changes: 1 addition & 1 deletion completion/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
API v1 views.
"""

from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

from django.contrib.auth.models import User
from django.core.exceptions import ValidationError, ObjectDoesNotExist
Expand Down
2 changes: 1 addition & 1 deletion completion/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Custom Django fields.
"""

from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

from django.db import models

Expand Down
2 changes: 1 addition & 1 deletion completion/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Runtime service for communicating completion information to the xblock system.
"""

from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

from django.conf import settings

Expand Down
2 changes: 1 addition & 1 deletion completion/tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Tests of completion xblock runtime services
"""

from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals

import ddt
from django.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion completion/tests/test_utilities.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
The unit tests for utilities.py.
'''
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from mock import patch

from django.test import TestCase
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def get_version(*file_paths):
VERSION = get_version('../completion', '__init__.py')

# Configure Django for autodoc usage
settings.configure()
django.setup()

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
8 changes: 8 additions & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Core requirements for using this application

Django>=1.8,<2.0 # Web application framework
django-model-utils # Provides TimeStampedModel abstract base class
djangorestframework>=3.2.0,<3.7.0 # REST API framework
edx-opaque-keys[django] # Create and introspect course and xblock identities
pytz # Time zone support
XBlock # Courseware component architecture
12 changes: 12 additions & 0 deletions requirements/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Additional requirements for development of this application

-r base.in # Dependencies for edx-completion itself
-r quality.in # Dependencies for code quality checks
-r test.in # Dependencies for test case execution

diff-cover # Changeset diff test coverage
edx-lint # For updating pylintrc
edx-i18n-tools # For i18n_tool dummy
pip-tools # Requirements file management
tox # virtualenv management for tests
tox-battery # Makes tox aware of requirements file changes
86 changes: 59 additions & 27 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,82 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements/dev.txt requirements/base.in requirements/dev.in requirements/quality.in
# pip-compile --output-file requirements/dev.txt requirements/dev.in
#
appdirs==1.4.3 # via fs
argparse==1.4.0 # via caniusepython3
backports.functools-lru-cache==1.4 # via caniusepython3
astroid==1.5.2 # via edx-lint, pylint, pylint-celery, pylint-plugin-utils
attrs==17.4.0 # via pytest
backports.functools-lru-cache==1.5 # via astroid, caniusepython3, pylint
caniusepython3==6.0.0
certifi==2018.1.18 # via requests
chardet==3.0.4 # via requests
click==6.7 # via pip-tools
configparser==3.5.0 # via pydocstyle
click-log==0.1.8 # via edx-lint
click==6.7 # via click-log, edx-lint, pip-tools
configparser==3.5.0 # via pylint
coverage==4.5.1 # via pytest-cov
ddt==1.1.2
diff-cover==1.0.2
distlib==0.2.6 # via caniusepython3
djangorestframework==3.6.3
django-model-utils==3.0.0
edx-opaque-keys[django]==0.4.2
django-model-utils==3.1.1
django==1.11.11
djangorestframework==3.6.4
edx-i18n-tools==0.4.3
edx-lint==0.5.5
edx-opaque-keys[django]==0.4.3
enum34==1.1.6 # via astroid, fs
factory-boy==2.10.0
faker==0.8.12 # via factory-boy
first==2.0.1 # via pip-tools
futures==3.2.0 ; python_version == "2.7"
freezegun==0.3.10
fs==2.0.20 # via xblock
funcsigs==1.0.2 # via mock, pytest
futures==3.1.1 ; python_version >= "3"
idna==2.6 # via requests
inflect==0.2.5 # via jinja2-pluralize
isort==4.2.15
ipaddress==1.0.19 # via faker
isort==4.3.4
jinja2-pluralize==0.3.0 # via diff-cover
jinja2==2.10 # via diff-cover, jinja2-pluralize
markupsafe==1.0 # via jinja2
packaging==16.8 # via caniusepython3
path.py>=8.2.1 # via edx-i18n-tools
lazy-object-proxy==1.3.1 # via astroid
lxml==4.2.1 # via xblock
markupsafe==1.0 # via jinja2, xblock
mccabe==0.6.1 # via pylint
mock==2.0.0
more-itertools==4.1.0 # via pytest
packaging==17.1 # via caniusepython3
path.py==11.0 # via edx-i18n-tools
pbr==3.1.1 # via mock, stevedore
pip-tools==1.11.0
pkginfo==1.4.1 # via twine
pluggy==0.6.0 # via tox
pluggy==0.6.0 # via pytest, tox
polib==1.1.0 # via edx-i18n-tools
py==1.5.2 # via tox
py==1.5.3 # via pytest, tox
pycodestyle==2.3.1
pydocstyle==2.1.1
pygments==2.2.0 # via diff-cover
pyparsing>=2.0.7 # via packaging
pytz==2016.7
pyyaml==3.12 # via edx-i18n-tools
requests-toolbelt==0.8.0 # via twine
requests==2.18.4 # via caniusepython3, requests-toolbelt, twine
six==1.11.0 # via diff-cover, edx-i18n-tools, packaging, pip-tools, pydocstyle, tox
pylint-celery==0.3 # via edx-lint
pylint-django==0.7.2 # via edx-lint
pylint-plugin-utils==0.2.6 # via pylint-celery, pylint-django
pylint==1.7.1 # via edx-lint, pylint-celery, pylint-django, pylint-plugin-utils
pymongo==3.6.1 # via edx-opaque-keys
pyparsing==2.2.0 # via packaging
pytest-cov==2.5.1
pytest-django==3.1.2
pytest==3.5.0 # via pytest-cov, pytest-django
python-dateutil==2.7.0 # via faker, freezegun, xblock
pytz==2018.3
pyyaml==3.12 # via edx-i18n-tools, xblock
requests==2.18.4 # via caniusepython3
singledispatch==3.4.0.3 # via astroid, pylint
six==1.11.0 # via astroid, diff-cover, edx-i18n-tools, edx-lint, edx-opaque-keys, faker, freezegun, fs, mock, more-itertools, packaging, pip-tools, pydocstyle, pylint, pytest, python-dateutil, singledispatch, stevedore, tox, xblock
snowballstemmer==1.2.1 # via pydocstyle
tox-battery==0.2
stevedore==1.28.0 # via edx-opaque-keys
text-unidecode==1.2 # via faker
tox-battery==0.5
tox==2.9.1
tqdm==4.19.5 # via twine
twine==1.9.1
urllib3==1.22 # via requests
virtualenv==15.1.0 # via tox
wheel==0.30.0
XBlock==1.1.1
virtualenv==15.2.0 # via tox
web-fragments==0.2.2 # via xblock
webob==1.7.4 # via xblock
wrapt==1.10.11 # via astroid
xblock==1.1.1
9 changes: 9 additions & 0 deletions requirements/doc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Requirements for documentation validation

-r base.in # Core requirements to allow imports during API doc generation
-r test.in # Test requirements to allow imports during API doc generation

doc8 # reStructuredText style checker
edx_sphinx_theme # edX theme for Sphinx output
readme_renderer # Validates README.rst for usage on PyPI
Sphinx # Documentation builder
66 changes: 52 additions & 14 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,66 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements/doc.txt requirements/base.in requirements/doc.in
# pip-compile --output-file requirements/doc.txt requirements/doc.in
#
alabaster==0.7.10 # via sphinx
appdirs==1.4.3 # via fs
attrs==17.4.0 # via pytest
babel==2.5.3 # via sphinx
bleach==2.1.2 # via readme-renderer
chardet==3.0.4 # via doc8
django-model-utils==3.0.0
django==1.8.18
bleach==2.1.3 # via readme-renderer
certifi==2018.1.18 # via requests
chardet==3.0.4 # via doc8, requests
commonmark==0.7.5 # via readme-renderer
coverage==4.5.1 # via pytest-cov
ddt==1.1.2
django-model-utils==3.1.1
django==1.11.11
djangorestframework==3.6.4
doc8==0.8.0
docutils==0.14 # via doc8, readme-renderer, restructuredtext-lint, sphinx
edx-opaque-keys[django]==0.4.3
edx-sphinx-theme==1.3.0
enum34==1.1.6 # via fs
factory-boy==2.10.0
faker==0.8.12 # via factory-boy
freezegun==0.3.10
fs==2.0.20 # via xblock
funcsigs==1.0.2 # via mock, pytest
future==0.16.0 # via commonmark
html5lib==1.0.1 # via bleach
imagesize==0.7.1 # via sphinx
idna==2.6 # via requests
imagesize==1.0.0 # via sphinx
ipaddress==1.0.19 # via faker
jinja2==2.10 # via sphinx
markupsafe==1.0 # via jinja2
pbr==3.1.1 # via stevedore
lxml==4.2.1 # via xblock
markupsafe==1.0 # via jinja2, xblock
mock==2.0.0
more-itertools==4.1.0 # via pytest
packaging==17.1 # via sphinx
pbr==3.1.1 # via mock, stevedore
pluggy==0.6.0 # via pytest
py==1.5.3 # via pytest
pygments==2.2.0 # via readme-renderer, sphinx
pytz==2017.3 # via babel
readme-renderer==17.2
restructuredtext-lint==1.1.2 # via doc8
six==1.11.0 # via bleach, doc8, edx-sphinx-theme, html5lib, readme-renderer, sphinx, stevedore
pymongo==3.6.1 # via edx-opaque-keys
pyparsing==2.2.0 # via packaging
pytest-cov==2.5.1
pytest-django==3.1.2
pytest==3.5.0 # via pytest-cov, pytest-django
python-dateutil==2.7.0 # via faker, freezegun, xblock
pytz==2018.3
pyyaml==3.12 # via xblock
readme-renderer==17.4
requests==2.18.4 # via sphinx
restructuredtext-lint==1.1.3 # via doc8
six==1.11.0 # via bleach, doc8, edx-opaque-keys, edx-sphinx-theme, faker, freezegun, fs, html5lib, mock, more-itertools, packaging, pytest, python-dateutil, readme-renderer, sphinx, stevedore, xblock
snowballstemmer==1.2.1 # via sphinx
sphinx==1.4.9
stevedore==1.28.0 # via doc8
sphinx==1.7.2
sphinxcontrib-websupport==1.0.1 # via sphinx
stevedore==1.28.0 # via doc8, edx-opaque-keys
text-unidecode==1.2 # via faker
typing==3.6.4 # via sphinx
urllib3==1.22 # via requests
web-fragments==0.2.2 # via xblock
webencodings==0.5.1 # via html5lib
webob==1.7.4 # via xblock
xblock==1.1.1
15 changes: 15 additions & 0 deletions requirements/private.readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# If there are any Python packages you want to keep in your virtualenv beyond
# those listed in the official requirements files, create a "private.in" file
# and list them there. Generate the corresponding "private.txt" file pinning
# all of their indirect dependencies to specific versions as follows:

# pip-compile private.in

# This allows you to use "pip-sync" without removing these packages:

# pip-sync requirements/*.txt

# "private.in" and "private.txt" aren't checked into git to avoid merge
# conflicts, and the presence of this file allows "private.*" to be
# included in scripted pip-sync usage without requiring that those files be
# created first.
Loading

0 comments on commit 02971bd

Please sign in to comment.