From 11d3db0a9b0477f702311d641b4a923333816d13 Mon Sep 17 00:00:00 2001 From: Pooja Kulkarni <13742492+pkulkark@users.noreply.github.com> Date: Wed, 1 Feb 2023 12:34:07 -0500 Subject: [PATCH] feat: Add package publishing workflow (#99) Also adds github ci workflow and removes circleci config as part of https://github.com/open-craft/xblock-poll/pull/100 --- .circleci/config.yml | 78 ---------- .github/workflows/ci.yml | 41 +++++ .github/workflows/pypi-publish.yml | 34 ++++ Makefile | 47 ++++-- poll/poll.py | 2 +- poll/settings.py | 2 +- pylintrc | 5 +- requirements-dev.txt | 5 +- requirements.txt | 3 +- requirements/base.in | 8 + requirements/base.txt | 58 +++++++ requirements/ci.in | 9 ++ requirements/ci.txt | 73 +++++++++ requirements/constraints.txt | 12 ++ requirements/dev.in | 13 ++ requirements/dev.txt | 240 +++++++++++++++++++++++++++++ requirements/pip-tools.in | 5 + requirements/pip-tools.txt | 24 +++ requirements/pip.in | 6 + requirements/pip.txt | 12 ++ run_tests.py | 3 - setup.py | 4 +- tox.ini | 11 +- 23 files changed, 585 insertions(+), 110 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/pypi-publish.yml create mode 100644 requirements/base.in create mode 100644 requirements/base.txt create mode 100644 requirements/ci.in create mode 100644 requirements/ci.txt create mode 100644 requirements/constraints.txt create mode 100644 requirements/dev.in create mode 100644 requirements/dev.txt create mode 100644 requirements/pip-tools.in create mode 100644 requirements/pip-tools.txt create mode 100644 requirements/pip.in create mode 100644 requirements/pip.txt diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a2d9d19..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,78 +0,0 @@ -version: 2.1 - -orbs: - browser-tools: circleci/browser-tools@1.2.3 - -commands: - install-dependencies: - steps: - - run: - name: Install OS dependencies - command: | - sudo apt update && sudo apt install -y nodejs npm gettext - # Upgrade nodejs after node-gyp installed properly - curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - - sudo apt install -y nodejs - - run: - name: Install project dependencies - command: | - pip install tox - make requirements - -jobs: - quality: - docker: - # Always run with the minimum supported version - # to avoid new language feature checkes like f-strings - - image: cimg/python:2.7 - steps: - - checkout - - install-dependencies - - run: - name: Check code quality - command: | - tox -e quality - test: - parameters: - image: - type: string - tox-env: - type: string - docker: - - image: << parameters.image >> - steps: - - checkout - - browser-tools/install-firefox - - browser-tools/install-geckodriver - - install-dependencies - - run: - name: Test << parameters.tox-env >> - command: | - tox -e << parameters.tox-env >> - -workflows: - version: 2 - main: - jobs: - - quality - - test: - requires: - - quality - matrix: - parameters: - image: ["cimg/python:2.7-browsers"] - tox-env: ["py27-django111"] - - test: - requires: - - quality - matrix: - parameters: - image: ["cimg/python:3.6-browsers"] - tox-env: ["py36-django22", "py36-django32"] - - test: - requires: - - quality - matrix: - parameters: - image: ["cimg/python:3.8-browsers"] - tox-env: ["py38-django22", "py38-django32"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..11d5cd4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Python CI +on: + pull_request: {} + workflow_dispatch: {} + push: + branches: [master] + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + commitlint: + uses: openedx/.github/.github/workflows/commitlint.yml@master + + run_tests: + name: tests + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + python-version: ['3.8'] + toxenv: [py38-django32, quality] + + steps: + - uses: actions/checkout@v3 + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..2cdf32f --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,34 @@ +name: pypi-publish + +on: + release: + types: [published] + workflow_dispatch: {} + +jobs: + publish-package: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: setup python + uses: actions/setup-python@v3 + with: + python-version: 3.8 + + - name: Install pip + run: pip install pip + + - name: Install Dependencies + run: pip install setuptools wheel + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_PUBLISH_TOKEN }} diff --git a/Makefile b/Makefile index 5038251..36d23d6 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ .DEFAULT_GOAL := help -FIREFOX_VERSION := "94.0.1" +FIREFOX_VERSION := "67.0" FIREFOX_LINUX_ARCH := $(shell uname -m) help: ## display this help message @@ -24,6 +24,21 @@ clean: ## remove generated byte code, coverage reports, and build artifacts rm -fr dist/ rm -fr *.egg-info +# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade. +PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS) + +upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade +upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in + pip install -qr requirements/pip-tools.txt + # Make sure to compile files after any other files they include! + $(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in + $(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in + pip install -qr requirements/pip.txt + pip install -qr requirements/pip-tools.txt + $(PIP_COMPILE) -o requirements/base.txt requirements/base.in + $(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in + $(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in + quality: ## check coding style with pycodestyle and pylint pycodestyle poll --max-line-length=120 pylint poll @@ -31,12 +46,21 @@ quality: ## check coding style with pycodestyle and pylint node_requirements: ## Install requirements for handlebar templates i18n extraction npm install -python_requirements: ## install development environment requirements - pip install -r requirements.txt --exists-action w - pip install -r requirements-dev.txt --exists-action w +python_requirements: install_linux_dev_firefox ## install development environment requirements + pip install wheel + pip install -r requirements/base.txt --exists-action w + pip install -r requirements/dev.txt --exists-action w +ifeq ($(VIRTUAL_ENV),) cd ./src/xblock-sdk && \ - pip install -r requirements/base.txt && \ - pip install -r requirements/test.txt + pip install -r requirements/base.txt && \ + pip install -r requirements/test.txt +else + cd $(VIRTUAL_ENV)/src/xblock-sdk && \ + pip install -r requirements/base.txt && \ + pip install -r requirements/test.txt +endif + pip uninstall -y selenium + pip install selenium==3.4.1 pip install -e . requirements: node_requirements python_requirements ## install development environment requirements @@ -52,15 +76,16 @@ install_linux_dev_firefox: ## Downloads custom version of firefox for Selenium i --output .firefox/firefox.tar.bz2 cd .firefox && tar -xvjf firefox.tar.bz2 - cd .geckodriver && wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz - cd .geckodriver && tar -xzf geckodriver-v0.15.0-linux64.tar.gz + cd .geckodriver && wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz + cd .geckodriver && tar -xzf geckodriver-v0.26.0-linux64.tar.gz linux_dev_test: ## Run tests in development environment to use custom firefox - PATH=.firefox/firefox/:.geckodriver/:$(PATH) make test + mkdir -p var + PATH=.firefox/firefox/:.geckodriver/:$(PATH) xvfb-run python run_tests.py test: ## run tests in the current virtualenv - mkdir -p var # for var/workbench.log - python run_tests.py --with-coverage --cover-package=poll + mkdir -p var + DJANGO_SETTINGS_MODULE=workbench.settings pytest selfcheck: ## check that the Makefile is well-formed @echo "The Makefile is well-formed." diff --git a/poll/poll.py b/poll/poll.py index 2998a3d..dca03ad 100644 --- a/poll/poll.py +++ b/poll/poll.py @@ -1220,7 +1220,7 @@ def vote(self, data, suffix=''): # Make sure the answer values are sane. for key, value in data.items(): - if value not in answers.keys(): + if value not in answers: result['success'] = False result['errors'].append( self.ugettext( diff --git a/poll/settings.py b/poll/settings.py index ce20e43..da38d42 100644 --- a/poll/settings.py +++ b/poll/settings.py @@ -65,7 +65,7 @@ # http://django-statici18n.readthedocs.io/en/latest/settings.html with open(os.path.join(BASE_DIR, 'poll/translations/config.yaml'), 'r') as locale_config_file: - locale_config = yaml.load(locale_config_file) + locale_config = yaml.load(locale_config_file, Loader=yaml.SafeLoader) LANGUAGES = [ (code, code,) diff --git a/pylintrc b/pylintrc index 5d3a397..58d64a3 100644 --- a/pylintrc +++ b/pylintrc @@ -24,7 +24,10 @@ disable= unused-argument, useless-object-inheritance, import-outside-toplevel, - super-with-arguments + super-with-arguments, + consider-using-f-string, + unspecified-encoding, + redundant-u-string-prefix [SIMILARITIES] min-similarity-lines=8 diff --git a/requirements-dev.txt b/requirements-dev.txt index e872bfc..fe0abf9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ # Internationalization and Localization requirements --e 'git://github.com/edx/xblock-sdk.git@v0.1.6#egg=xblock-sdk==v0.1.6 ; python_version == "2.7"' --e 'git://github.com/edx/xblock-sdk.git#egg=xblock-sdk ; python_version > "2.7"' +-e 'git+https://github.com/openedx/xblock-sdk.git@v0.1.6#egg=xblock-sdk==v0.1.6 ; python_version == "2.7"' +-e 'git+https://github.com/openedx/xblock-sdk.git@0.4.0#egg=xblock-sdk==0.4.0 ; python_version > "2.7"' Django~=1.11; python_version == '2.7' Django>=2.2, <3.3; python_version > '2.7' @@ -15,4 +15,3 @@ edx-i18n-tools==0.5.0 pycodestyle==2.4.0 pylint tox==3.14.0 -django-nose==1.4.6 diff --git a/requirements.txt b/requirements.txt index bf062e7..13531e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ markdown --e git://github.com/edx/xblock-utils.git@2.1.0#egg=xblock-utils +-e git+https://github.com/openedx/xblock-utils.git@2.2.0#egg=xblock-utils ddt mock -django-nose==1.4.6 bleach==3.1.5 -e . diff --git a/requirements/base.in b/requirements/base.in new file mode 100644 index 0000000..f35389f --- /dev/null +++ b/requirements/base.in @@ -0,0 +1,8 @@ +# Core requirements for using this application +-c constraints.txt + +markdown +-e git+https://github.com/openedx/xblock-utils.git@2.2.0#egg=xblock-utils +ddt +mock +bleach==5.0.0 diff --git a/requirements/base.txt b/requirements/base.txt new file mode 100644 index 0000000..0a32990 --- /dev/null +++ b/requirements/base.txt @@ -0,0 +1,58 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +-e git+https://github.com/openedx/xblock-utils.git@2.2.0#egg=xblock-utils + # via -r requirements/base.in +appdirs==1.4.4 + # via fs +bleach==5.0.0 + # via -r requirements/base.in +ddt==1.6.0 + # via -r requirements/base.in +fs==2.4.16 + # via xblock +importlib-metadata==6.0.0 + # via markdown +lxml==4.9.2 + # via xblock +mako==1.2.4 + # via xblock-utils +markdown==3.4.1 + # via -r requirements/base.in +markupsafe==2.1.2 + # via + # mako + # xblock +mock==5.0.1 + # via -r requirements/base.in +python-dateutil==2.8.2 + # via xblock +pytz==2022.7.1 + # via xblock +pyyaml==6.0 + # via xblock +simplejson==3.18.1 + # via xblock-utils +six==1.16.0 + # via + # bleach + # fs + # python-dateutil +web-fragments==2.0.0 + # via + # xblock + # xblock-utils +webencodings==0.5.1 + # via bleach +webob==1.8.7 + # via xblock +xblock==1.6.1 + # via xblock-utils +zipp==3.11.0 + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/ci.in b/requirements/ci.in new file mode 100644 index 0000000..f442c6b --- /dev/null +++ b/requirements/ci.in @@ -0,0 +1,9 @@ +# Requirements for running tests in CI + +-c constraints.txt + +codecov # Code coverage reporting +tox # Virtualenv management for tests +tox-battery # Makes tox aware of requirements file changes +pycodestyle==2.4.0 +pylint \ No newline at end of file diff --git a/requirements/ci.txt b/requirements/ci.txt new file mode 100644 index 0000000..6952544 --- /dev/null +++ b/requirements/ci.txt @@ -0,0 +1,73 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +astroid==2.13.2 + # via pylint +certifi==2022.12.7 + # via requests +charset-normalizer==3.0.1 + # via requests +codecov==2.1.12 + # via -r requirements/ci.in +coverage==7.0.5 + # via codecov +dill==0.3.6 + # via pylint +distlib==0.3.6 + # via virtualenv +filelock==3.9.0 + # via + # tox + # virtualenv +idna==3.4 + # via requests +isort==5.11.4 + # via pylint +lazy-object-proxy==1.9.0 + # via astroid +mccabe==0.7.0 + # via pylint +packaging==23.0 + # via tox +platformdirs==2.6.2 + # via + # pylint + # virtualenv +pluggy==1.0.0 + # via tox +py==1.11.0 + # via tox +pycodestyle==2.4.0 + # via -r requirements/ci.in +pylint==2.15.10 + # via -r requirements/ci.in +requests==2.28.2 + # via codecov +six==1.16.0 + # via tox +tomli==2.0.1 + # via + # pylint + # tox +tomlkit==0.11.6 + # via pylint +tox==3.28.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/ci.in + # tox-battery +tox-battery==0.6.1 + # via -r requirements/ci.in +typing-extensions==4.4.0 + # via + # astroid + # pylint +urllib3==1.26.14 + # via requests +virtualenv==20.17.1 + # via tox +wrapt==1.14.1 + # via astroid diff --git a/requirements/constraints.txt b/requirements/constraints.txt new file mode 100644 index 0000000..6d20fa4 --- /dev/null +++ b/requirements/constraints.txt @@ -0,0 +1,12 @@ +# 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. + +# Common constraints for edx repos +-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt \ No newline at end of file diff --git a/requirements/dev.in b/requirements/dev.in new file mode 100644 index 0000000..366f8b6 --- /dev/null +++ b/requirements/dev.in @@ -0,0 +1,13 @@ +-c constraints.txt +-r ci.txt # dependencies for setting up testing in CI + +# Internationalization and Localization requirements +-e 'git+https://github.com/openedx/xblock-sdk.git@v0.5.1#egg=xblock-sdk==v0.5.1' + +Django>=2.2, <3.3 + +django-appconf==1.0.4 + +django-statici18n==1.8.2 +transifex-client==0.12.1 +edx-i18n-tools==0.9.2 diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..7db9e09 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,240 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +-e git+https://github.com/openedx/xblock-sdk.git@v0.5.1#egg=xblock-sdk==v0.5.1 + # via -r requirements/dev.in +appdirs==1.4.4 + # via fs +arrow==1.2.3 + # via jinja2-time +asgiref==3.6.0 + # via django +astroid==2.13.2 + # via + # -r requirements/ci.txt + # pylint +binaryornot==0.4.4 + # via cookiecutter +boto==2.49.0 + # via xblock-sdk +boto3==1.26.53 + # via fs-s3fs +botocore==1.29.53 + # via + # boto3 + # s3transfer +certifi==2022.12.7 + # via + # -r requirements/ci.txt + # requests +chardet==5.1.0 + # via binaryornot +charset-normalizer==3.0.1 + # via + # -r requirements/ci.txt + # requests +click==8.1.3 + # via cookiecutter +codecov==2.1.12 + # via -r requirements/ci.txt +cookiecutter==2.1.1 + # via xblock-sdk +coverage==7.0.5 + # via + # -r requirements/ci.txt + # codecov +dill==0.3.6 + # via + # -r requirements/ci.txt + # pylint +distlib==0.3.6 + # via + # -r requirements/ci.txt + # virtualenv +django==3.2.16 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/dev.in + # django-appconf + # django-pyfs + # django-statici18n + # edx-i18n-tools + # xblock-sdk +django-appconf==1.0.4 + # via + # -r requirements/dev.in + # django-statici18n +django-pyfs==3.2.0 + # via xblock-sdk +django-statici18n==1.8.2 + # via -r requirements/dev.in +edx-i18n-tools==0.9.2 + # via -r requirements/dev.in +filelock==3.9.0 + # via + # -r requirements/ci.txt + # tox + # virtualenv +fs==2.4.16 + # via + # django-pyfs + # fs-s3fs + # xblock +fs-s3fs==1.1.1 + # via + # django-pyfs + # xblock-sdk +idna==3.4 + # via + # -r requirements/ci.txt + # requests +isort==5.11.4 + # via + # -r requirements/ci.txt + # pylint +jinja2==3.1.2 + # via + # cookiecutter + # jinja2-time +jinja2-time==0.2.0 + # via cookiecutter +jmespath==1.0.1 + # via + # boto3 + # botocore +lazy==1.5 + # via xblock-sdk +lazy-object-proxy==1.9.0 + # via + # -r requirements/ci.txt + # astroid +lxml==4.9.2 + # via + # xblock + # xblock-sdk +markupsafe==2.1.2 + # via + # jinja2 + # xblock +mccabe==0.7.0 + # via + # -r requirements/ci.txt + # pylint +packaging==23.0 + # via + # -r requirements/ci.txt + # tox +path==16.6.0 + # via edx-i18n-tools +platformdirs==2.6.2 + # via + # -r requirements/ci.txt + # pylint + # virtualenv +pluggy==1.0.0 + # via + # -r requirements/ci.txt + # tox +polib==1.1.1 + # via edx-i18n-tools +py==1.11.0 + # via + # -r requirements/ci.txt + # tox +pycodestyle==2.4.0 + # via -r requirements/ci.txt +pylint==2.15.10 + # via -r requirements/ci.txt +pypng==0.20220715.0 + # via xblock-sdk +python-dateutil==2.8.2 + # via + # arrow + # botocore + # xblock +python-slugify==7.0.0 + # via cookiecutter +pytz==2022.7.1 + # via + # django + # xblock +pyyaml==6.0 + # via + # cookiecutter + # edx-i18n-tools + # xblock +requests==2.28.2 + # via + # -r requirements/ci.txt + # codecov + # cookiecutter + # xblock-sdk +s3transfer==0.6.0 + # via boto3 +simplejson==3.18.1 + # via xblock-sdk +six==1.16.0 + # via + # -r requirements/ci.txt + # django-statici18n + # fs + # fs-s3fs + # python-dateutil + # tox +sqlparse==0.4.3 + # via django +text-unidecode==1.3 + # via python-slugify +tomli==2.0.1 + # via + # -r requirements/ci.txt + # pylint + # tox +tomlkit==0.11.6 + # via + # -r requirements/ci.txt + # pylint +tox==3.28.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/ci.txt + # tox-battery +tox-battery==0.6.1 + # via -r requirements/ci.txt +transifex-client==0.12.1 + # via -r requirements/dev.in +typing-extensions==4.4.0 + # via + # -r requirements/ci.txt + # astroid + # pylint +urllib3==1.26.14 + # via + # -r requirements/ci.txt + # botocore + # requests + # transifex-client +virtualenv==20.17.1 + # via + # -r requirements/ci.txt + # tox +web-fragments==2.0.0 + # via + # xblock + # xblock-sdk +webob==1.8.7 + # via + # xblock + # xblock-sdk +wrapt==1.14.1 + # via + # -r requirements/ci.txt + # astroid +xblock==1.6.1 + # via xblock-sdk + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/pip-tools.in b/requirements/pip-tools.in new file mode 100644 index 0000000..0295d2c --- /dev/null +++ b/requirements/pip-tools.in @@ -0,0 +1,5 @@ +# Just the dependencies to run pip-tools, mainly for the "upgrade" make target + +-c constraints.txt + +pip-tools # Contains pip-compile, used to generate pip requirements files diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt new file mode 100644 index 0000000..7b75bd0 --- /dev/null +++ b/requirements/pip-tools.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +build==0.10.0 + # via pip-tools +click==8.1.3 + # via pip-tools +packaging==23.0 + # via build +pip-tools==6.12.1 + # via -r requirements/pip-tools.in +pyproject-hooks==1.0.0 + # via build +tomli==2.0.1 + # via build +wheel==0.38.4 + # via pip-tools + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools diff --git a/requirements/pip.in b/requirements/pip.in new file mode 100644 index 0000000..ef9986d --- /dev/null +++ b/requirements/pip.in @@ -0,0 +1,6 @@ +# Core dependencies for installing other packages +#-c constraints.txt + +pip +setuptools +wheel \ No newline at end of file diff --git a/requirements/pip.txt b/requirements/pip.txt new file mode 100644 index 0000000..44decc5 --- /dev/null +++ b/requirements/pip.txt @@ -0,0 +1,12 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +pip==22.3.1 + # via -r requirements/pip.in +setuptools==66.1.0 + # via -r requirements/pip.in +wheel==0.38.4 + # via -r requirements/pip.in diff --git a/run_tests.py b/run_tests.py index a01f5d4..79bf08c 100755 --- a/run_tests.py +++ b/run_tests.py @@ -25,9 +25,6 @@ # Configure a range of ports in case the default port of 8081 is in use os.environ.setdefault("DJANGO_LIVE_TEST_SERVER_ADDRESS", "localhost:8081-8099") - settings.INSTALLED_APPS.append('django_nose') - settings.TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' - # Silence too verbose Django logging logging.disable(logging.DEBUG) diff --git a/setup.py b/setup.py index b93d5f7..861143a 100644 --- a/setup.py +++ b/setup.py @@ -61,10 +61,8 @@ def package_data(pkg, roots): 'poll', ], install_requires=[ - 'XBlock>=1.2', + 'XBlock<1.3', 'markdown', - 'ddt', - 'mock', 'bleach', ], entry_points={ diff --git a/tox.ini b/tox.ini index 176b0b1..2a11564 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,15 @@ [tox] -envlist = py{36,38}-django{22,32},py27-django111 +envlist = py38-django32 [pycodestyle] exclude = .git,.tox [testenv] deps = - django111: Django>=1.11,<1.12 - django22: Django>=2.2,<2.3 - django32: Django>=3.2,<3.3 + django32: Django>=3.2,<4.0 commands = - make python_requirements - make node_requirements - make test + make requirements + make linux_dev_test passenv = DISPLAY