From 2dbd33e14d603f882c2b7dce8f3158f05a02d625 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 24 Jul 2020 18:25:41 +0900 Subject: [PATCH] BB-2659 juniper xblock html and xblock completable (#4) * Update requirements * Fix some pydocstyle errors * Comment on the requirement for Python 3.5 * Update the CircleCI configuration to use Python 3.5 * Install requirements in correct order * Update versions --- .circleci/config.yml | 2 +- Makefile | 8 +++++--- README.md | 2 ++ completable_html_xblock/__init__.py | 2 +- requirements.txt | 1 + requirements/base.txt | 13 +++++++------ requirements/quality.txt | 14 +++++++------- requirements/test.txt | 14 +++++++------- setup.py | 4 ++-- tests/__init__.py | 2 +- 10 files changed, 34 insertions(+), 28 deletions(-) create mode 100644 requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index d5bc58e..ad93ea0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ defaults: &DEFAULT working_directory: /home/circleci/xblock-html docker: - - image: circleci/python:2.7 + - image: circleci/python:3.5 version: 2 diff --git a/Makefile b/Makefile index 4fb85f3..35e36cc 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,14 @@ clean: ## Remove generated byte code, coverage reports, and build artifacts selfcheck: ## Check that the Makefile is well-formed @echo "The Makefile is well-formed." -test_requirements: ## Install requirements needed by test environment +base_requirements: ## Install base requirements needed at all times + pip install -q -r requirements/base.txt --exists-action w + +test_requirements: base_requirements ## Install requirements needed by test environment pip install -q -r requirements/quality.txt --exists-action w pip install -q -r requirements/test.txt --exists-action w -requirements: test_requirements ## Installs all requirements needed by developmenent and test environments - pip install -q -r requirements/base.txt --exists-action w +requirements: base_requirements test_requirements ## Installs all requirements needed by developmenent and test environments pip install -e . @echo "Finished installing requirements." diff --git a/README.md b/README.md index 2237dce..447426d 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ pip install https://github.com/open-craft/xblock-html-completable ``` You may specify the `-e` flag if you intend to develop on the repo. +Note that as of version 1.0.0, Python 2.7 is no longer supported. The current minimum Python version is 3.5. + To enable this block type, add `completable_html5` to course's advanced module list. ## Development diff --git a/completable_html_xblock/__init__.py b/completable_html_xblock/__init__.py index 5f8a390..6a7058c 100644 --- a/completable_html_xblock/__init__.py +++ b/completable_html_xblock/__init__.py @@ -1,4 +1,4 @@ -"""Completable HTML XBlock module""" +"""Completable HTML XBlock module.""" from __future__ import absolute_import from .html import CompletableHTML5XBlock diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5603c37 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +-r requirements/base.txt diff --git a/requirements/base.txt b/requirements/base.txt index 454f6b9..b4f6312 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,8 +1,9 @@ # Requirements for app run -git+https://github.com/edx/xblock-utils.git@v1.1.1#egg=xblock-utils==1.1.1 -django-statici18n==1.8.0 -edx-i18n-tools==0.4.7 -Mako==1.0.7 -bleach==2.1.4 -html-xblock~=0.1.1 +git+https://github.com/edx/xblock-utils.git@2.1.1#egg=xblock-utils==2.1.1 +django-statici18n==1.9.0 +edx-i18n-tools==0.5.3 +Mako==1.1.3 +bleach==3.1.5 +html-xblock~=1.0.0 +django~=2.2 diff --git a/requirements/quality.txt b/requirements/quality.txt index 361c995..b50d128 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,9 +1,9 @@ # Requirements for code quality checks -isort==4.3.4 -astroid==1.5.2 -pycodestyle==2.4.0 -pydocstyle==2.1.1 -pylint==1.7.1 -caniusepython3==7.0.0 -edx_lint==0.5.5 +isort==4.3.21 +astroid==2.3.3 +pycodestyle==2.6.0 +pydocstyle==5.0.2 +pylint==2.4.2 +caniusepython3==7.2.0 +edx-lint==1.4.1 diff --git a/requirements/test.txt b/requirements/test.txt index e5ea954..41de6d2 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,14 +1,14 @@ # Requirements for test runs codecov==2.0.15 -diff-cover==1.0.4 +diff-cover==2.6.1 django-nose==1.4.4 -lazy==1.1 -pytest-cov==2.6.0 -tox==3.1.3 -tox-battery==0.5.1 +lazy==1.4 +pytest-cov==2.8.1 +tox==3.15.0 +tox-battery==0.6.0 mock==3.0.5 # Github requirements -git+https://github.com/edx/django-pyfs.git@1.0.3#egg=django-pyfs==1.0.3 -git+https://github.com/edx/xblock-sdk.git#egg=xblock-sdk +git+https://github.com/edx/django-pyfs.git@2.1#egg=django-pyfs==2.1 +xblock-sdk diff --git a/setup.py b/setup.py index 9115afd..dbb6b09 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def package_data(pkg, roots): setup( name='completable-html-xblock', - version='0.1.2', + version='1.0.0', description='HTML XBlock will help creating and using a secure, easy-to-use and completable HTML blocks', license='AGPL v3', packages=[ @@ -32,7 +32,7 @@ def package_data(pkg, roots): install_requires=[ 'XBlock', 'bleach', - 'html-xblock~=0.1.1', + 'html-xblock~=1.0.0', ], entry_points={ 'xblock.v1': [ diff --git a/tests/__init__.py b/tests/__init__.py index b13d5c8..f1b390f 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ -"""Tests module""" +"""Tests module."""