From a878c17dda177eafae1689445567538a04a25ecf Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 20:03:07 -0400 Subject: [PATCH] E0d/makefile improvements (#45) * fix: adding pylint support * fix: standard requirements files * fix: patterned on lti xb, work around pip bug * fix: support for standard make targets * fix: modeled on lti xb, standard targets * fix: adding new in files to upgrade * fix: adding standard translation targets * fix: quality * fix: unused import * fix: irrelevant disable * fix: adding a specific req file for quality * fix: adding a basic tox file * fix: adding a manifest * fix: adding a NOTICE file * fix: also upgrade quality requirements * fix: removing Django 4 for now * fix: adding ci * fix: adding ci related requirements * fix: processing new requirements * fix: update requirements * fix: simplified test entry * fix: install pytest in the venv * fix: make upgrade * fix: pointless test to exercise the harness * fix: making module * fix: quality * fix: adding CI badge * fix: use a title * fix: iterate toward README standard * fix: coverage config * fix: unmix md and rst * fix: mixed up link * fix: changing to RST * fix: more conversion fixes * fix: more syntax * fix: more syntax * fix: ffs * fix: rst syntax * fix: so fiddly * fix: so fiddly * fix: more fiddles * fix: images Co-authored-by: Edward Zarecor --- .coveragerc | 5 + .github/workflows/ci.yml | 44 +++ MANIFEST.in | 4 + Makefile | 57 ++++ NOTICE | 16 ++ README.md | 28 -- README.rst | 93 ++++++ done/__init__.py | 4 + done/done.py | 4 +- done/tests/__init__.py | 3 + done/tests/test_nothing.py | 8 + pylintrc | 386 +++++++++++++++++++++++++ pylintrc_tweaks | 3 + requirements/base.txt | 16 +- requirements/ci.in | 5 + requirements/ci.txt | 420 ++++++++++++++++++++++++++++ requirements/common_constraints.txt | 7 +- requirements/dev.in | 3 + requirements/dev.txt | 65 +++++ requirements/pip.in | 6 + requirements/pip.txt | 16 ++ requirements/pip_tools.txt | 10 +- requirements/quality.in | 10 + requirements/quality.txt | 194 +++++++++++++ requirements/test.in | 13 + requirements/test.txt | 264 +++++++++++++++++ requirements/tox.in | 4 + requirements/tox.txt | 32 +++ setup.py | 2 +- tox.ini | 21 ++ 30 files changed, 1696 insertions(+), 47 deletions(-) create mode 100644 .coveragerc create mode 100644 .github/workflows/ci.yml create mode 100644 MANIFEST.in create mode 100644 NOTICE delete mode 100644 README.md create mode 100644 README.rst create mode 100644 done/tests/__init__.py create mode 100644 done/tests/test_nothing.py create mode 100644 pylintrc create mode 100644 pylintrc_tweaks create mode 100644 requirements/ci.in create mode 100644 requirements/ci.txt create mode 100644 requirements/dev.in create mode 100644 requirements/dev.txt create mode 100644 requirements/pip.in create mode 100644 requirements/pip.txt create mode 100644 requirements/quality.in create mode 100644 requirements/quality.txt create mode 100644 requirements/test.in create mode 100644 requirements/test.txt create mode 100644 requirements/tox.in create mode 100644 requirements/tox.txt create mode 100644 tox.ini diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..1ff6ecf --- /dev/null +++ b/.coveragerc @@ -0,0 +1,5 @@ +# .coveragerc for xblock-lti-consumer +[run] +data_file = .coverage +source = done +omit = */urls.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..163de9b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: Python CI + +on: + push: + branches: [master] + pull_request: + branches: + - '**' + +jobs: + 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@v2 + - name: setup python + uses: actions/setup-python@v2 + 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 + + - name: Run Coverage + if: matrix.python-version == '3.8' && matrix.toxenv=='py38-django32' + uses: codecov/codecov-action@v1 + with: + flags: unittests + fail_ci_if_error: true + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b574079 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include requirements/base.in +include NOTICE +include LICENSE +include requirements/constraints.txt diff --git a/Makefile b/Makefile index bc5094b..1aa57f0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,25 @@ +install-test: + pip install -q -r requirements/test.txt + +install-dev: + pip install -q -r requirements/dev.txt + +install: install-test + +quality: ## Run the quality checks + pycodestyle --config=.pep8 done + pylint --rcfile=pylintrc done + python setup.py -q sdist + twine check dist/* + +test: ## Run the tests + mkdir -p var + rm -rf .coverage + python -m coverage run --rcfile=.coveragerc -m pytest + +covreport: ## Show the coverage results + python -m coverage report -m --skip-covered + COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt .PHONY: $(COMMON_CONSTRAINTS_TXT) $(COMMON_CONSTRAINTS_TXT): @@ -6,5 +28,40 @@ $(COMMON_CONSTRAINTS_TXT): upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in pip install -q -r requirements/pip_tools.txt + pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in pip-compile --upgrade -o requirements/base.txt requirements/base.in + pip-compile --upgrade -o requirements/dev.txt requirements/dev.in + pip-compile --upgrade -o requirements/test.txt requirements/test.in + pip-compile --upgrade -o requirements/quality.txt requirements/quality.in + pip-compile --upgrade -o requirements/tox.txt requirements/tox.in + pip-compile --upgrade -o requirements/ci.txt requirements/ci.in + +## Localization targets + +WORKING_DIR := done +EXTRACT_DIR := $(WORKING_DIR)/translations/en/LC_MESSAGES +EXTRACTED_DJANGO := $(EXTRACT_DIR)/django-partial.po +EXTRACTED_DJANGOJS := $(EXTRACT_DIR)/djangojs-partial.po +EXTRACTED_TEXT := $(EXTRACT_DIR)/text.po + +extract_translations: ## extract strings to be translated, outputting .po files + cd $(WORKING_DIR) && i18n_tool extract + mv $(EXTRACTED_DJANGO) $(EXTRACTED_TEXT) + tail -n +20 $(EXTRACTED_DJANGOJS) >> $(EXTRACTED_TEXT) + rm $(EXTRACTED_DJANGOJS) + sed -i'' -e 's/nplurals=INTEGER/nplurals=2/' $(EXTRACTED_TEXT) + sed -i'' -e 's/plural=EXPRESSION/plural=\(n != 1\)/' $(EXTRACTED_TEXT) + +compile_translations: ## compile translation files, outputting .mo files for each supported language + cd $(WORKING_DIR) && i18n_tool generate + +detect_changed_source_translations: + cd $(WORKING_DIR) && i18n_tool changed + +dummy_translations: ## generate dummy translation (.po) files + cd $(WORKING_DIR) && i18n_tool dummy + +build_dummy_translations: dummy_translations compile_translations ## generate and compile dummy translation files + +validate_translations: build_dummy_translations detect_changed_source_translations ## validate translations diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..9ceee89 --- /dev/null +++ b/NOTICE @@ -0,0 +1,16 @@ +Open edX Done XBlock + +Copyright (C) 2015-2022, The Center for Reimagining Learning + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/README.md b/README.md deleted file mode 100644 index 70da719..0000000 --- a/README.md +++ /dev/null @@ -1,28 +0,0 @@ -DoneXBlock -============== -[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) -[![Publish package to PyPi](https://github.com/openedx/DoneXBlock/actions/workflows/pypi-release.yml/badge.svg)](https://github.com/openedx/DoneXBlock/actions/workflows/pypi-release.yml) - -Lets a student mark they've finished an activity. The student can -click through two states of the XBlock, shown below: - -![Done screenshot](completionxblock_mark.png) - -![Done screenshot](completionxblock_undo.png) - -FutureLearn uses this kind of thing to great effect. Students can read -text, watch videos, etc., and indicate when their done. This is -convenient both for progress indication to the student (know what -they've done, and for honor code grading (indicating to us that they -believe they've finished an activity). - -I copied some of the UX patterns from FutureLearn so that users of -both platforms would have consistency of user experience between -MOOCs. I didn't copy them exactly since I wanted to be unambiguously -in the clear with IP issues around look-and-feel, and this was on a short -anough timeline that I did not have a chance to reach out to -FutureLearn for permission. As a footnote, this kind of collaboration -between MOOC providers is probably worth pursuing -- it'd be to the -benefit of learners on all platforms, and ultimately, the industry as -a whole if we had consistency of experience between platforms where -convenient. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..4fd1a28 --- /dev/null +++ b/README.rst @@ -0,0 +1,93 @@ +########## +DoneXBlock +########## +| |License: AGPL v3| |Python CI| |Publish package to PyPi| + +.. |License: AGPL v3| image:: https://img.shields.io/badge/License-AGPL_v3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0 + +.. |Python CI| image:: https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml/badge.svg + :target: https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml + +.. |Publish package to PyPi| image:: https://github.com/openedx/DoneXBlock/actions/workflows/pypi-release.yml/badge.svg + :target: https://github.com/openedx/DoneXBlock/actions/workflows/pypi-release.yml + +Purpose +======= + +Lets a student mark they've finished an activity. The student can +click through two states of the XBlock, shown below: + +| |mark| +| |undo| + +.. |mark| image:: completionxblock_mark.png +.. |undo| image:: completionxblock_undo.png + +Status +====== + +Maintained + +Getting Help +============ + +If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community. + +Our real-time conversations are on Slack. You can request a `Slack invitation`_, then join our `community Slack workspace`_. + +For more information about these options, see the `Getting Help`_ page. + +.. _Slack invitation: https://openedx-slack-invite.herokuapp.com/ +.. _community Slack workspace: https://openedx.slack.com/ +.. _Getting Help: https://openedx.org/getting-help + + +How to Contribute +================= + +Details about how to become a contributor to the Open edX project may +be found in the wiki at `How to contribute`_ + +.. _How to contribute: https://openedx.atlassian.net/wiki/spaces/COMM/pages/941457737/How+to+start+contributing+to+the+Open+edX+code+base + +The Open edX Code of Conduct +---------------------------- + +All community members should familarize themselves with the `Open edX Code of Conduct`_. + +.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/ + +People +====== + +The assigned maintainers for this component and other project details +may be found in `Backstage`_ or groked from inspecting catalog-info.yaml. + +.. _Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock, + +Reporting Security Issues +========================= + +Please do not report security issues in public. Please email security@edx.org. + + +History +======= + +FutureLearn uses this kind of thing to great effect. Students can read +text, watch videos, etc., and indicate when their done. This is +convenient both for progress indication to the student (know what +they've done, and for honor code grading (indicating to us that they +believe they've finished an activity). + +I copied some of the UX patterns from FutureLearn so that users of +both platforms would have consistency of user experience between +MOOCs. I didn't copy them exactly since I wanted to be unambiguously +in the clear with IP issues around look-and-feel, and this was on a short +anough timeline that I did not have a chance to reach out to +FutureLearn for permission. As a footnote, this kind of collaboration +between MOOC providers is probably worth pursuing -- it'd be to the +benefit of learners on all platforms, and ultimately, the industry as +a whole if we had consistency of experience between platforms where +convenient. diff --git a/done/__init__.py b/done/__init__.py index b81257d..60d72a8 100644 --- a/done/__init__.py +++ b/done/__init__.py @@ -1,3 +1,7 @@ +""" +Runtime will load the XBlock class from here. +""" + from .done import DoneXBlock __version__ = '2.0.4' diff --git a/done/done.py b/done/done.py index 00dddec..ae52282 100644 --- a/done/done.py +++ b/done/done.py @@ -3,8 +3,6 @@ import uuid -import six - import pkg_resources from xblock.core import XBlock from xblock.fields import Boolean, DateTime, Float, Scope, String @@ -80,7 +78,7 @@ def student_view(self, context=None): # pylint: disable=unused-argument 'align': self.align.lower()}) return frag - def studio_view(self, _context=None): # pylint: disable=unused-argument + def studio_view(self, _context=None): ''' Minimal view with no configuration options giving some help text. ''' diff --git a/done/tests/__init__.py b/done/tests/__init__.py new file mode 100644 index 0000000..7b5c771 --- /dev/null +++ b/done/tests/__init__.py @@ -0,0 +1,3 @@ +""" +Module containing tests for DoneXBlock +""" diff --git a/done/tests/test_nothing.py b/done/tests/test_nothing.py new file mode 100644 index 0000000..2444805 --- /dev/null +++ b/done/tests/test_nothing.py @@ -0,0 +1,8 @@ +""" +Tests for the DoneXBlock +""" + + +# Adding a pointless test to exercise CI as this project has not current tests +def test_always_passes(): + assert True diff --git a/pylintrc b/pylintrc new file mode 100644 index 0000000..b296665 --- /dev/null +++ b/pylintrc @@ -0,0 +1,386 @@ +# *************************** +# ** DO NOT EDIT THIS FILE ** +# *************************** +# +# This file was generated by edx-lint: https://github.com/edx/edx-lint +# +# If you want to change this file, you have two choices, depending on whether +# you want to make a local change that applies only to this repo, or whether +# you want to make a central change that applies to all repos using edx-lint. +# +# Note: If your pylintrc file is simply out-of-date relative to the latest +# pylintrc in edx-lint, ensure you have the latest edx-lint installed +# and then follow the steps for a "LOCAL CHANGE". +# +# LOCAL CHANGE: +# +# 1. Edit the local pylintrc_tweaks file to add changes just to this +# repo's file. +# +# 2. Run: +# +# $ edx_lint write pylintrc +# +# 3. This will modify the local file. Submit a pull request to get it +# checked in so that others will benefit. +# +# +# CENTRAL CHANGE: +# +# 1. Edit the pylintrc file in the edx-lint repo at +# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc +# +# 2. install the updated version of edx-lint (in edx-lint): +# +# $ pip install . +# +# 3. Run (in edx-lint): +# +# $ edx_lint write pylintrc +# +# 4. Make a new version of edx_lint, submit and review a pull request with the +# pylintrc update, and after merging, update the edx-lint version and +# publish the new version. +# +# 5. In your local repo, install the newer version of edx-lint. +# +# 6. Run: +# +# $ edx_lint write pylintrc +# +# 7. This will modify the local file. Submit a pull request to get it +# checked in so that others will benefit. +# +# +# +# +# +# STAY AWAY FROM THIS FILE! +# +# +# +# +# +# SERIOUSLY. +# +# ------------------------------ +# Generated by edx-lint version: 5.2.4 +# ------------------------------ +[MASTER] +ignore = +persistent = yes +load-plugins = edx_lint.pylint,pylint_django,pylint_celery + +[MESSAGES CONTROL] +enable = + blacklisted-name, + line-too-long, + + abstract-class-instantiated, + abstract-method, + access-member-before-definition, + anomalous-backslash-in-string, + anomalous-unicode-escape-in-string, + arguments-differ, + assert-on-tuple, + assigning-non-slot, + assignment-from-no-return, + assignment-from-none, + attribute-defined-outside-init, + bad-except-order, + bad-format-character, + bad-format-string-key, + bad-format-string, + bad-open-mode, + bad-reversed-sequence, + bad-staticmethod-argument, + bad-str-strip-call, + bad-super-call, + binary-op-exception, + boolean-datetime, + catching-non-exception, + cell-var-from-loop, + confusing-with-statement, + continue-in-finally, + dangerous-default-value, + duplicate-argument-name, + duplicate-bases, + duplicate-except, + duplicate-key, + expression-not-assigned, + format-combined-specification, + format-needs-mapping, + function-redefined, + global-variable-undefined, + import-error, + import-self, + inconsistent-mro, + inherit-non-class, + init-is-generator, + invalid-all-object, + invalid-format-index, + invalid-length-returned, + invalid-sequence-index, + invalid-slice-index, + invalid-slots-object, + invalid-slots, + invalid-unary-operand-type, + logging-too-few-args, + logging-too-many-args, + logging-unsupported-format, + lost-exception, + method-hidden, + misplaced-bare-raise, + misplaced-future, + missing-format-argument-key, + missing-format-attribute, + missing-format-string-key, + no-member, + no-method-argument, + no-name-in-module, + no-self-argument, + no-value-for-parameter, + non-iterator-returned, + non-parent-method-called, + nonexistent-operator, + not-a-mapping, + not-an-iterable, + not-callable, + not-context-manager, + not-in-loop, + pointless-statement, + pointless-string-statement, + raising-bad-type, + raising-non-exception, + redefined-builtin, + redefined-outer-name, + redundant-keyword-arg, + repeated-keyword, + return-arg-in-generator, + return-in-init, + return-outside-function, + signature-differs, + super-init-not-called, + super-method-not-called, + syntax-error, + test-inherits-tests, + too-few-format-args, + too-many-format-args, + too-many-function-args, + translation-of-non-string, + truncated-format-string, + undefined-all-variable, + undefined-loop-variable, + undefined-variable, + unexpected-keyword-arg, + unexpected-special-method-signature, + unpacking-non-sequence, + unreachable, + unsubscriptable-object, + unsupported-binary-operation, + unsupported-membership-test, + unused-format-string-argument, + unused-format-string-key, + used-before-assignment, + using-constant-test, + yield-outside-function, + + astroid-error, + fatal, + method-check-failed, + parse-error, + raw-checker-failed, + + empty-docstring, + invalid-characters-in-docstring, + missing-docstring, + wrong-spelling-in-comment, + wrong-spelling-in-docstring, + + unused-argument, + unused-import, + unused-variable, + + eval-used, + exec-used, + + bad-classmethod-argument, + bad-mcs-classmethod-argument, + bad-mcs-method-argument, + bare-except, + broad-except, + consider-iterating-dictionary, + consider-using-enumerate, + global-at-module-level, + global-variable-not-assigned, + literal-used-as-attribute, + logging-format-interpolation, + logging-not-lazy, + multiple-imports, + multiple-statements, + no-classmethod-decorator, + no-staticmethod-decorator, + protected-access, + redundant-unittest-assert, + reimported, + simplifiable-if-statement, + simplifiable-range, + singleton-comparison, + superfluous-parens, + unidiomatic-typecheck, + unnecessary-lambda, + unnecessary-pass, + unnecessary-semicolon, + unneeded-not, + useless-else-on-loop, + wrong-assert-type, + + deprecated-method, + deprecated-module, + + too-many-boolean-expressions, + too-many-nested-blocks, + too-many-statements, + + wildcard-import, + wrong-import-order, + wrong-import-position, + + missing-final-newline, + mixed-line-endings, + trailing-newlines, + trailing-whitespace, + unexpected-line-ending-format, + + bad-inline-option, + bad-option-value, + deprecated-pragma, + unrecognized-inline-option, + useless-suppression, +disable = + bad-indentation, + consider-using-f-string, + duplicate-code, + file-ignored, + fixme, + global-statement, + invalid-name, + locally-disabled, + no-else-return, + suppressed-message, + too-few-public-methods, + too-many-ancestors, + too-many-arguments, + too-many-branches, + too-many-instance-attributes, + too-many-lines, + too-many-locals, + too-many-public-methods, + too-many-return-statements, + ungrouped-imports, + unspecified-encoding, + unused-wildcard-import, + use-maxsplit-arg, + + feature-toggle-needs-doc, + illegal-waffle-usage, + + logging-fstring-interpolation, + django-not-configured, + +[REPORTS] +output-format = text +reports = no +score = no + +[BASIC] +module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ +const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$ +class-rgx = [A-Z_][a-zA-Z0-9]+$ +function-rgx = ([a-z_][a-z0-9_]{2,40}|test_[a-z0-9_]+)$ +method-rgx = ([a-z_][a-z0-9_]{2,40}|setUp|set[Uu]pClass|tearDown|tear[Dd]ownClass|assert[A-Z]\w*|maxDiff|test_[a-z0-9_]+)$ +attr-rgx = [a-z_][a-z0-9_]{2,30}$ +argument-rgx = [a-z_][a-z0-9_]{2,30}$ +variable-rgx = [a-z_][a-z0-9_]{2,30}$ +class-attribute-rgx = ([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ +inlinevar-rgx = [A-Za-z_][A-Za-z0-9_]*$ +good-names = f,i,j,k,db,ex,Run,_,__ +bad-names = foo,bar,baz,toto,tutu,tata +no-docstring-rgx = __.*__$|test_.+|setUp$|setUpClass$|tearDown$|tearDownClass$|Meta$ +docstring-min-length = 5 + +[FORMAT] +max-line-length = 120 +ignore-long-lines = ^\s*(# )?((?)|(\.\. \w+: .*))$ +single-line-if-stmt = no +max-module-lines = 1000 +indent-string = ' ' + +[MISCELLANEOUS] +notes = FIXME,XXX,TODO + +[SIMILARITIES] +min-similarity-lines = 4 +ignore-comments = yes +ignore-docstrings = yes +ignore-imports = no + +[TYPECHECK] +ignore-mixin-members = yes +ignored-classes = SQLObject +unsafe-load-any-extension = yes +generated-members = + REQUEST, + acl_users, + aq_parent, + objects, + DoesNotExist, + can_read, + can_write, + get_url, + size, + content, + status_code, + create, + build, + fields, + tag, + org, + course, + category, + name, + revision, + _meta, + +[VARIABLES] +init-import = no +dummy-variables-rgx = _|dummy|unused|.*_unused +additional-builtins = + +[CLASSES] +defining-attr-methods = __init__,__new__,setUp +valid-classmethod-first-arg = cls +valid-metaclass-classmethod-first-arg = mcs + +[DESIGN] +max-args = 5 +ignored-argument-names = _.* +max-locals = 15 +max-returns = 6 +max-branches = 12 +max-statements = 50 +max-parents = 7 +max-attributes = 7 +min-public-methods = 2 +max-public-methods = 20 + +[IMPORTS] +deprecated-modules = regsub,TERMIOS,Bastion,rexec +import-graph = +ext-import-graph = +int-import-graph = + +[EXCEPTIONS] +overgeneral-exceptions = Exception + +# e02952f57d4f71daf09e6a7f5093eeaeb95a62d2 diff --git a/pylintrc_tweaks b/pylintrc_tweaks new file mode 100644 index 0000000..0dc7069 --- /dev/null +++ b/pylintrc_tweaks @@ -0,0 +1,3 @@ +[MESSAGES CONTROL] +disable+= + django-not-configured, diff --git a/requirements/base.txt b/requirements/base.txt index 14996c4..27a1410 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,23 +1,21 @@ # -# This file is autogenerated by pip-compile with python 3.8 +# This file is autogenerated by pip-compile with python 3.10 # To update, run: # # make upgrade # appdirs==1.4.4 # via fs -fs==2.4.14 +fs==2.4.16 # via xblock -lxml==4.7.1 +lxml==4.9.0 # via xblock -markupsafe==2.0.1 +markupsafe==2.1.1 # via xblock python-dateutil==2.8.2 # via xblock -pytz==2021.3 - # via - # fs - # xblock +pytz==2022.1 + # via xblock pyyaml==6.0 # via xblock six==1.16.0 @@ -28,7 +26,7 @@ web-fragments==2.0.0 # via xblock webob==1.8.7 # via xblock -xblock==1.5.1 +xblock==1.6.1 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/ci.in b/requirements/ci.in new file mode 100644 index 0000000..9baaa13 --- /dev/null +++ b/requirements/ci.in @@ -0,0 +1,5 @@ +# Requirements for running tests in Github Actions +-c constraints.txt + +-r test.txt +-r tox.txt diff --git a/requirements/ci.txt b/requirements/ci.txt new file mode 100644 index 0000000..10af76c --- /dev/null +++ b/requirements/ci.txt @@ -0,0 +1,420 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# make upgrade +# +appdirs==1.4.4 + # via + # -r requirements/test.txt + # fs +arrow==1.2.2 + # via + # -r requirements/test.txt + # jinja2-time +asgiref==3.5.2 + # via + # -r requirements/test.txt + # django +astroid==2.11.6 + # via + # -r requirements/test.txt + # pylint + # pylint-celery +attrs==21.4.0 + # via + # -r requirements/test.txt + # pytest +binaryornot==0.4.4 + # via + # -r requirements/test.txt + # cookiecutter +bleach==5.0.0 + # via + # -r requirements/test.txt + # readme-renderer +boto==2.49.0 + # via + # -r requirements/test.txt + # xblock-sdk +boto3==1.24.10 + # via + # -r requirements/test.txt + # fs-s3fs +botocore==1.27.10 + # via + # -r requirements/test.txt + # boto3 + # s3transfer +certifi==2022.6.15 + # via + # -r requirements/test.txt + # requests +cffi==1.15.0 + # via + # -r requirements/test.txt + # cryptography +chardet==4.0.0 + # via + # -r requirements/test.txt + # binaryornot +charset-normalizer==2.0.12 + # via + # -r requirements/test.txt + # requests +click==8.1.3 + # via + # -r requirements/test.txt + # click-log + # code-annotations + # cookiecutter + # edx-lint +click-log==0.4.0 + # via + # -r requirements/test.txt + # edx-lint +code-annotations==1.3.0 + # via + # -r requirements/test.txt + # edx-lint +commonmark==0.9.1 + # via + # -r requirements/test.txt + # rich +cookiecutter==2.1.1 + # via + # -r requirements/test.txt + # xblock-sdk +coverage==6.4.1 + # via + # -r requirements/test.txt + # coveralls +coveralls==3.3.1 + # via -r requirements/test.txt +cryptography==37.0.2 + # via + # -r requirements/test.txt + # secretstorage +ddt==1.5.0 + # via -r requirements/test.txt +dill==0.3.5.1 + # via + # -r requirements/test.txt + # pylint +distlib==0.3.4 + # via + # -r requirements/tox.txt + # virtualenv +django==3.2.13 + # via + # -c requirements/common_constraints.txt + # -r requirements/test.txt + # django-pyfs + # xblock-sdk +django-pyfs==3.2.0 + # via + # -r requirements/test.txt + # xblock-sdk +docopt==0.6.2 + # via + # -r requirements/test.txt + # coveralls +docutils==0.18.1 + # via + # -r requirements/test.txt + # readme-renderer +edx-lint==5.2.4 + # via -r requirements/test.txt +filelock==3.7.1 + # via + # -r requirements/tox.txt + # tox + # virtualenv +fs==2.4.16 + # via + # -r requirements/test.txt + # django-pyfs + # fs-s3fs + # xblock +fs-s3fs==1.1.1 + # via + # -r requirements/test.txt + # django-pyfs + # xblock-sdk +idna==3.3 + # via + # -r requirements/test.txt + # requests +importlib-metadata==4.11.4 + # via + # -r requirements/test.txt + # twine +iniconfig==1.1.1 + # via + # -r requirements/test.txt + # pytest +isort==5.10.1 + # via + # -r requirements/test.txt + # pylint +jeepney==0.8.0 + # via + # -r requirements/test.txt + # keyring + # secretstorage +jinja2==3.1.2 + # via + # -r requirements/test.txt + # code-annotations + # cookiecutter + # jinja2-time +jinja2-time==0.2.0 + # via + # -r requirements/test.txt + # cookiecutter +jmespath==1.0.0 + # via + # -r requirements/test.txt + # boto3 + # botocore +keyring==23.6.0 + # via + # -r requirements/test.txt + # twine +lazy==1.4 + # via + # -r requirements/test.txt + # xblock-sdk +lazy-object-proxy==1.7.1 + # via + # -r requirements/test.txt + # astroid +lxml==4.9.0 + # via + # -r requirements/test.txt + # xblock + # xblock-sdk +markupsafe==2.1.1 + # via + # -r requirements/test.txt + # jinja2 + # xblock +mccabe==0.7.0 + # via + # -r requirements/test.txt + # pylint +mock==4.0.3 + # via -r requirements/test.txt +packaging==21.3 + # via + # -r requirements/test.txt + # -r requirements/tox.txt + # pytest + # tox +pbr==5.9.0 + # via + # -r requirements/test.txt + # stevedore +pkginfo==1.8.3 + # via + # -r requirements/test.txt + # twine +platformdirs==2.5.2 + # via + # -r requirements/test.txt + # -r requirements/tox.txt + # pylint + # virtualenv +pluggy==1.0.0 + # via + # -r requirements/test.txt + # -r requirements/tox.txt + # pytest + # tox +py==1.11.0 + # via + # -r requirements/test.txt + # -r requirements/tox.txt + # pytest + # tox +pycodestyle==2.8.0 + # via -r requirements/test.txt +pycparser==2.21 + # via + # -r requirements/test.txt + # cffi +pygments==2.12.0 + # via + # -r requirements/test.txt + # readme-renderer + # rich +pylint==2.14.2 + # via + # -r requirements/test.txt + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils +pylint-celery==0.3 + # via + # -r requirements/test.txt + # edx-lint +pylint-django==2.5.3 + # via + # -r requirements/test.txt + # edx-lint +pylint-plugin-utils==0.7 + # via + # -r requirements/test.txt + # pylint-celery + # pylint-django +pyparsing==3.0.9 + # via + # -r requirements/test.txt + # -r requirements/tox.txt + # packaging +pypng==0.0.21 + # via + # -r requirements/test.txt + # xblock-sdk +pytest==7.1.2 + # via -r requirements/test.txt +python-dateutil==2.8.2 + # via + # -r requirements/test.txt + # arrow + # botocore + # xblock +python-slugify==6.1.2 + # via + # -r requirements/test.txt + # code-annotations + # cookiecutter +pytz==2022.1 + # via + # -r requirements/test.txt + # django + # xblock +pyyaml==6.0 + # via + # -r requirements/test.txt + # code-annotations + # cookiecutter + # xblock +readme-renderer==35.0 + # via + # -r requirements/test.txt + # twine +requests==2.28.0 + # via + # -r requirements/test.txt + # cookiecutter + # coveralls + # requests-toolbelt + # twine + # xblock-sdk +requests-toolbelt==0.9.1 + # via + # -r requirements/test.txt + # twine +rfc3986==2.0.0 + # via + # -r requirements/test.txt + # twine +rich==12.4.4 + # via + # -r requirements/test.txt + # twine +s3transfer==0.6.0 + # via + # -r requirements/test.txt + # boto3 +secretstorage==3.3.2 + # via + # -r requirements/test.txt + # keyring +simplejson==3.17.6 + # via + # -r requirements/test.txt + # xblock-sdk +six==1.16.0 + # via + # -r requirements/test.txt + # -r requirements/tox.txt + # bleach + # edx-lint + # fs + # fs-s3fs + # python-dateutil + # tox + # virtualenv +sqlparse==0.4.2 + # via + # -r requirements/test.txt + # django +stevedore==3.5.0 + # via + # -r requirements/test.txt + # code-annotations +text-unidecode==1.3 + # via + # -r requirements/test.txt + # python-slugify +toml==0.10.2 + # via + # -r requirements/tox.txt + # tox +tomli==2.0.1 + # via + # -r requirements/test.txt + # pylint + # pytest +tomlkit==0.11.0 + # via + # -r requirements/test.txt + # pylint +tox==3.25.0 + # via -r requirements/tox.txt +twine==4.0.1 + # via -r requirements/test.txt +urllib3==1.26.9 + # via + # -r requirements/test.txt + # botocore + # requests + # twine +virtualenv==20.14.1 + # via + # -r requirements/tox.txt + # tox +web-fragments==2.0.0 + # via + # -r requirements/test.txt + # xblock + # xblock-sdk +webencodings==0.5.1 + # via + # -r requirements/test.txt + # bleach +webob==1.8.7 + # via + # -r requirements/test.txt + # xblock + # xblock-sdk +wrapt==1.14.1 + # via + # -r requirements/test.txt + # astroid +xblock==1.6.1 + # via + # -r requirements/test.txt + # xblock-sdk +xblock-sdk==0.5.1 + # via -r requirements/test.txt +zipp==3.8.0 + # via + # -r requirements/test.txt + # importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 9eb5a46..cca3ccd 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -13,8 +13,13 @@ # using LTS django version -Django<3.3 +Django<4.0 # elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. # elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html elasticsearch<7.14.0 + +setuptools<60 + +# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected +django-simple-history==3.0.0 diff --git a/requirements/dev.in b/requirements/dev.in new file mode 100644 index 0000000..95a04ac --- /dev/null +++ b/requirements/dev.in @@ -0,0 +1,3 @@ +# Core requirements + translation tools +-r base.txt +edx-i18n-tools \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..8752386 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,65 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# make upgrade +# +appdirs==1.4.4 + # via + # -r requirements/base.txt + # fs +asgiref==3.5.2 + # via django +django==4.0.5 + # via edx-i18n-tools +edx-i18n-tools==0.9.1 + # via -r requirements/dev.in +fs==2.4.16 + # via + # -r requirements/base.txt + # xblock +lxml==4.9.0 + # via + # -r requirements/base.txt + # xblock +markupsafe==2.1.1 + # via + # -r requirements/base.txt + # xblock +path==16.4.0 + # via edx-i18n-tools +polib==1.1.1 + # via edx-i18n-tools +python-dateutil==2.8.2 + # via + # -r requirements/base.txt + # xblock +pytz==2022.1 + # via + # -r requirements/base.txt + # xblock +pyyaml==6.0 + # via + # -r requirements/base.txt + # edx-i18n-tools + # xblock +six==1.16.0 + # via + # -r requirements/base.txt + # fs + # python-dateutil +sqlparse==0.4.2 + # via django +web-fragments==2.0.0 + # via + # -r requirements/base.txt + # xblock +webob==1.8.7 + # via + # -r requirements/base.txt + # xblock +xblock==1.6.1 + # via -r requirements/base.txt + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/pip.in b/requirements/pip.in new file mode 100644 index 0000000..68caafe --- /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..0f0d8ea --- /dev/null +++ b/requirements/pip.txt @@ -0,0 +1,16 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# make upgrade +# +wheel==0.37.1 + # via -r requirements/pip.in + +# The following packages are considered to be unsafe in a requirements file: +pip==22.1.2 + # via -r requirements/pip.in +setuptools==59.8.0 + # via + # -c requirements/common_constraints.txt + # -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index ee3e8f8..41a67b0 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -1,18 +1,18 @@ # -# This file is autogenerated by pip-compile with python 3.8 +# This file is autogenerated by pip-compile with python 3.10 # To update, run: # # make upgrade # -click==8.0.3 +click==8.1.3 # via pip-tools pep517==0.12.0 # via pip-tools -pip-tools==6.4.0 +pip-tools==6.6.2 # via -r requirements/pip_tools.in -tomli==2.0.0 +tomli==2.0.1 # via pep517 -wheel==0.37.0 +wheel==0.37.1 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/quality.in b/requirements/quality.in new file mode 100644 index 0000000..39893b7 --- /dev/null +++ b/requirements/quality.in @@ -0,0 +1,10 @@ +# Requirements for Quality runs +-c constraints.txt + +-r base.txt + +pycodestyle +pylint +edx_lint +xblock-sdk +ddt diff --git a/requirements/quality.txt b/requirements/quality.txt new file mode 100644 index 0000000..861b6f0 --- /dev/null +++ b/requirements/quality.txt @@ -0,0 +1,194 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# make upgrade +# +appdirs==1.4.4 + # via + # -r requirements/base.txt + # fs +arrow==1.2.2 + # via jinja2-time +asgiref==3.5.2 + # via django +astroid==2.11.6 + # via + # pylint + # pylint-celery +binaryornot==0.4.4 + # via cookiecutter +boto==2.49.0 + # via xblock-sdk +boto3==1.24.10 + # via fs-s3fs +botocore==1.27.10 + # via + # boto3 + # s3transfer +certifi==2022.6.15 + # via requests +chardet==4.0.0 + # via binaryornot +charset-normalizer==2.0.12 + # via requests +click==8.1.3 + # via + # click-log + # code-annotations + # cookiecutter + # edx-lint +click-log==0.4.0 + # via edx-lint +code-annotations==1.3.0 + # via edx-lint +cookiecutter==2.1.1 + # via xblock-sdk +ddt==1.5.0 + # via -r requirements/quality.in +dill==0.3.5.1 + # via pylint +django==3.2.13 + # via + # -c requirements/common_constraints.txt + # django-pyfs + # xblock-sdk +django-pyfs==3.2.0 + # via xblock-sdk +edx-lint==5.2.4 + # via -r requirements/quality.in +fs==2.4.16 + # via + # -r requirements/base.txt + # django-pyfs + # fs-s3fs + # xblock +fs-s3fs==1.1.1 + # via + # django-pyfs + # xblock-sdk +idna==3.3 + # via requests +isort==5.10.1 + # via pylint +jinja2==3.1.2 + # via + # code-annotations + # cookiecutter + # jinja2-time +jinja2-time==0.2.0 + # via cookiecutter +jmespath==1.0.0 + # via + # boto3 + # botocore +lazy==1.4 + # via xblock-sdk +lazy-object-proxy==1.7.1 + # via astroid +lxml==4.9.0 + # via + # -r requirements/base.txt + # xblock + # xblock-sdk +markupsafe==2.1.1 + # via + # -r requirements/base.txt + # jinja2 + # xblock +mccabe==0.7.0 + # via pylint +pbr==5.9.0 + # via stevedore +platformdirs==2.5.2 + # via pylint +pycodestyle==2.8.0 + # via -r requirements/quality.in +pylint==2.14.2 + # via + # -r requirements/quality.in + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils +pylint-celery==0.3 + # via edx-lint +pylint-django==2.5.3 + # via edx-lint +pylint-plugin-utils==0.7 + # via + # pylint-celery + # pylint-django +pypng==0.0.21 + # via xblock-sdk +python-dateutil==2.8.2 + # via + # -r requirements/base.txt + # arrow + # botocore + # xblock +python-slugify==6.1.2 + # via + # code-annotations + # cookiecutter +pytz==2022.1 + # via + # -r requirements/base.txt + # django + # xblock +pyyaml==6.0 + # via + # -r requirements/base.txt + # code-annotations + # cookiecutter + # xblock +requests==2.28.0 + # via + # cookiecutter + # xblock-sdk +s3transfer==0.6.0 + # via boto3 +simplejson==3.17.6 + # via xblock-sdk +six==1.16.0 + # via + # -r requirements/base.txt + # edx-lint + # fs + # fs-s3fs + # python-dateutil +sqlparse==0.4.2 + # via django +stevedore==3.5.0 + # via code-annotations +text-unidecode==1.3 + # via python-slugify +tomli==2.0.1 + # via pylint +tomlkit==0.11.0 + # via pylint +urllib3==1.26.9 + # via + # botocore + # requests +web-fragments==2.0.0 + # via + # -r requirements/base.txt + # xblock + # xblock-sdk +webob==1.8.7 + # via + # -r requirements/base.txt + # xblock + # xblock-sdk +wrapt==1.14.1 + # via astroid +xblock==1.6.1 + # via + # -r requirements/base.txt + # xblock-sdk +xblock-sdk==0.5.1 + # via -r requirements/quality.in + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/test.in b/requirements/test.in new file mode 100644 index 0000000..4638577 --- /dev/null +++ b/requirements/test.in @@ -0,0 +1,13 @@ +# Requirements for test runs +-c constraints.txt + +-r base.txt # Core dependencies for the cookiecutter + +coveralls +ddt +edx_lint +mock +pycodestyle +pytest +twine +xblock-sdk \ No newline at end of file diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..ddddf74 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,264 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# make upgrade +# +appdirs==1.4.4 + # via + # -r requirements/base.txt + # fs +arrow==1.2.2 + # via jinja2-time +asgiref==3.5.2 + # via django +astroid==2.11.6 + # via + # pylint + # pylint-celery +attrs==21.4.0 + # via pytest +binaryornot==0.4.4 + # via cookiecutter +bleach==5.0.0 + # via readme-renderer +boto==2.49.0 + # via xblock-sdk +boto3==1.24.10 + # via fs-s3fs +botocore==1.27.10 + # via + # boto3 + # s3transfer +certifi==2022.6.15 + # via requests +cffi==1.15.0 + # via cryptography +chardet==4.0.0 + # via binaryornot +charset-normalizer==2.0.12 + # via requests +click==8.1.3 + # via + # click-log + # code-annotations + # cookiecutter + # edx-lint +click-log==0.4.0 + # via edx-lint +code-annotations==1.3.0 + # via edx-lint +commonmark==0.9.1 + # via rich +cookiecutter==2.1.1 + # via xblock-sdk +coverage==6.4.1 + # via coveralls +coveralls==3.3.1 + # via -r requirements/test.in +cryptography==37.0.2 + # via secretstorage +ddt==1.5.0 + # via -r requirements/test.in +dill==0.3.5.1 + # via pylint +django==3.2.13 + # via + # -c requirements/common_constraints.txt + # django-pyfs + # xblock-sdk +django-pyfs==3.2.0 + # via xblock-sdk +docopt==0.6.2 + # via coveralls +docutils==0.18.1 + # via readme-renderer +edx-lint==5.2.4 + # via -r requirements/test.in +fs==2.4.16 + # via + # -r requirements/base.txt + # django-pyfs + # fs-s3fs + # xblock +fs-s3fs==1.1.1 + # via + # django-pyfs + # xblock-sdk +idna==3.3 + # via requests +importlib-metadata==4.11.4 + # via twine +iniconfig==1.1.1 + # via pytest +isort==5.10.1 + # via pylint +jeepney==0.8.0 + # via + # keyring + # secretstorage +jinja2==3.1.2 + # via + # code-annotations + # cookiecutter + # jinja2-time +jinja2-time==0.2.0 + # via cookiecutter +jmespath==1.0.0 + # via + # boto3 + # botocore +keyring==23.6.0 + # via twine +lazy==1.4 + # via xblock-sdk +lazy-object-proxy==1.7.1 + # via astroid +lxml==4.9.0 + # via + # -r requirements/base.txt + # xblock + # xblock-sdk +markupsafe==2.1.1 + # via + # -r requirements/base.txt + # jinja2 + # xblock +mccabe==0.7.0 + # via pylint +mock==4.0.3 + # via -r requirements/test.in +packaging==21.3 + # via pytest +pbr==5.9.0 + # via stevedore +pkginfo==1.8.3 + # via twine +platformdirs==2.5.2 + # via pylint +pluggy==1.0.0 + # via pytest +py==1.11.0 + # via pytest +pycodestyle==2.8.0 + # via -r requirements/test.in +pycparser==2.21 + # via cffi +pygments==2.12.0 + # via + # readme-renderer + # rich +pylint==2.14.2 + # via + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils +pylint-celery==0.3 + # via edx-lint +pylint-django==2.5.3 + # via edx-lint +pylint-plugin-utils==0.7 + # via + # pylint-celery + # pylint-django +pyparsing==3.0.9 + # via packaging +pypng==0.0.21 + # via xblock-sdk +pytest==7.1.2 + # via -r requirements/test.in +python-dateutil==2.8.2 + # via + # -r requirements/base.txt + # arrow + # botocore + # xblock +python-slugify==6.1.2 + # via + # code-annotations + # cookiecutter +pytz==2022.1 + # via + # -r requirements/base.txt + # django + # xblock +pyyaml==6.0 + # via + # -r requirements/base.txt + # code-annotations + # cookiecutter + # xblock +readme-renderer==35.0 + # via twine +requests==2.28.0 + # via + # cookiecutter + # coveralls + # requests-toolbelt + # twine + # xblock-sdk +requests-toolbelt==0.9.1 + # via twine +rfc3986==2.0.0 + # via twine +rich==12.4.4 + # via twine +s3transfer==0.6.0 + # via boto3 +secretstorage==3.3.2 + # via keyring +simplejson==3.17.6 + # via xblock-sdk +six==1.16.0 + # via + # -r requirements/base.txt + # bleach + # edx-lint + # fs + # fs-s3fs + # python-dateutil +sqlparse==0.4.2 + # via django +stevedore==3.5.0 + # via code-annotations +text-unidecode==1.3 + # via python-slugify +tomli==2.0.1 + # via + # pylint + # pytest +tomlkit==0.11.0 + # via pylint +twine==4.0.1 + # via -r requirements/test.in +urllib3==1.26.9 + # via + # botocore + # requests + # twine +web-fragments==2.0.0 + # via + # -r requirements/base.txt + # xblock + # xblock-sdk +webencodings==0.5.1 + # via bleach +webob==1.8.7 + # via + # -r requirements/base.txt + # xblock + # xblock-sdk +wrapt==1.14.1 + # via astroid +xblock==1.6.1 + # via + # -r requirements/base.txt + # xblock-sdk +xblock-sdk==0.5.1 + # via -r requirements/test.in +zipp==3.8.0 + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/tox.in b/requirements/tox.in new file mode 100644 index 0000000..9a28694 --- /dev/null +++ b/requirements/tox.in @@ -0,0 +1,4 @@ +# Used for tests +-c constraints.txt + +tox diff --git a/requirements/tox.txt b/requirements/tox.txt new file mode 100644 index 0000000..5635c31 --- /dev/null +++ b/requirements/tox.txt @@ -0,0 +1,32 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# make upgrade +# +distlib==0.3.4 + # via virtualenv +filelock==3.7.1 + # via + # tox + # virtualenv +packaging==21.3 + # via tox +platformdirs==2.5.2 + # via virtualenv +pluggy==1.0.0 + # via tox +py==1.11.0 + # via tox +pyparsing==3.0.9 + # via packaging +six==1.16.0 + # via + # tox + # virtualenv +toml==0.10.2 + # via tox +tox==3.25.0 + # via -r requirements/tox.in +virtualenv==20.14.1 + # via tox diff --git a/setup.py b/setup.py index 85e7d48..776140f 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n return constrained_requirements -with open('README.md') as readme: +with open('README.rst') as readme: long_description = readme.read() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..b233710 --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +envlist = py38-django{32}, quality + +[testenv] +whitelist_externals = + make +deps = + django32: Django>=3.2,<4.0 + django40: Django>=4.0,<4.1 + -r{toxinidir}/requirements/test.txt +commands = + make test + +[testenv:quality] +whitelist_externals = + make +deps = + -r{toxinidir}/requirements/quality.txt +commands = + make quality +