From 07ee3cc3d47f49dfb5ee6ac101bb9fcceb60df90 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:38:53 -0400 Subject: [PATCH 01/42] fix: adding pylint support --- pylintrc | 386 ++++++++++++++++++++++++++++++++++++++++++++++++ pylintrc_tweaks | 3 + 2 files changed, 389 insertions(+) create mode 100644 pylintrc create mode 100644 pylintrc_tweaks 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, From 21268c137b05bd9fe4716147dd6b3bea9e7e8934 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:39:37 -0400 Subject: [PATCH 02/42] fix: standard requirements files --- requirements/dev.in | 3 ++ requirements/dev.txt | 65 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 requirements/dev.in create mode 100644 requirements/dev.txt 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 From 90668ce5fd37b122b85d22f0ba9886151b14505b Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:40:19 -0400 Subject: [PATCH 03/42] fix: patterned on lti xb, work around pip bug --- requirements/pip.in | 6 ++++++ requirements/pip.txt | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 requirements/pip.in create mode 100644 requirements/pip.txt 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 From 1571146684009948949193e702ec12760196cc00 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:41:00 -0400 Subject: [PATCH 04/42] fix: support for standard make targets --- requirements/test.in | 12 ++ requirements/test.txt | 248 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+) create mode 100644 requirements/test.in create mode 100644 requirements/test.txt diff --git a/requirements/test.in b/requirements/test.in new file mode 100644 index 0000000..76569d8 --- /dev/null +++ b/requirements/test.in @@ -0,0 +1,12 @@ +# Requirements for test runs +-c constraints.txt + +-r base.txt # Core dependencies for the cookiecutter + +coveralls +ddt +edx_lint +mock +pycodestyle +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..8ec0f30 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,248 @@ +# +# 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 +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 +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 +pbr==5.9.0 + # via stevedore +pkginfo==1.8.3 + # via twine +platformdirs==2.5.2 + # via pylint +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 +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 +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 +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 From 458db6ef09aec42e7a595f73c463a73f260ef0c4 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:41:40 -0400 Subject: [PATCH 05/42] fix: modeled on lti xb, standard targets --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Makefile b/Makefile index bc5094b..5a0f92f 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 ./test.py --noinput + +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): From 8a235324f6d88a7250850535c09ac23b8e814b79 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:42:57 -0400 Subject: [PATCH 06/42] fix: adding new in files to upgrade --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 5a0f92f..c0ba7c7 100644 --- a/Makefile +++ b/Makefile @@ -28,5 +28,9 @@ $(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 + From d8b37780885e72d453c3d24694954dad158abcaf Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:43:29 -0400 Subject: [PATCH 07/42] fix: adding standard translation targets --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile b/Makefile index c0ba7c7..384f0ec 100644 --- a/Makefile +++ b/Makefile @@ -34,3 +34,31 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with pip-compile --upgrade -o requirements/dev.txt requirements/dev.in pip-compile --upgrade -o requirements/test.txt requirements/test.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 From db6cdbffc99429e4b9f3acdf37a6bb0c37742a63 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:43:52 -0400 Subject: [PATCH 08/42] fix: quality --- done/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) 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' From 50587c6d49f5318a69ec1a5538efb9f75898daf9 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:44:15 -0400 Subject: [PATCH 09/42] fix: unused import --- done/done.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/done/done.py b/done/done.py index 00dddec..f1faaa5 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 From 9fe04eaae986228c76dd3b22b9c3a22ccecbeb32 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 12:44:27 -0400 Subject: [PATCH 10/42] fix: irrelevant disable --- done/done.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/done/done.py b/done/done.py index f1faaa5..ae52282 100644 --- a/done/done.py +++ b/done/done.py @@ -78,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. ''' From 91a32d48162adb3e17dd0b9b0c8eb947dad65ba5 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 13:20:44 -0400 Subject: [PATCH 11/42] fix: adding a specific req file for quality --- requirements/quality.in | 10 ++ requirements/quality.txt | 194 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 requirements/quality.in create mode 100644 requirements/quality.txt 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 From 77c814a1caf48ff26d4e0e78a9e3dadc7b7a6560 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 13:21:15 -0400 Subject: [PATCH 12/42] fix: adding a basic tox file --- tox.ini | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..aacadd3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +envlist = py38-django{32,40}, 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 + From 41f2577eb872abe10c8cf2dd5aca5381061f7c76 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 14:41:15 -0400 Subject: [PATCH 13/42] fix: adding a manifest --- MANIFEST.in | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 MANIFEST.in 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 From 9cfeaf8b2ebd4125e8298dcd86638d0db61edfaf Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 14:41:29 -0400 Subject: [PATCH 14/42] fix: adding a NOTICE file --- NOTICE | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 NOTICE 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 . From 7ac6574eedf7763a962634adb0920a1a8fd216d2 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 14:42:01 -0400 Subject: [PATCH 15/42] fix: also upgrade quality requirements --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 384f0ec..0011693 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with 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 ## Localization targets From 8b321d172959eefe59ac30b61ac0e1a2fcdcc2ee Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 14:46:05 -0400 Subject: [PATCH 16/42] fix: removing Django 4 for now --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index aacadd3..b233710 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40}, quality +envlist = py38-django{32}, quality [testenv] whitelist_externals = From f0b5304db3463239bcf240dd5aee8a5cf21db362 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 14:55:48 -0400 Subject: [PATCH 17/42] fix: adding ci --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml 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 + From 5ac574f253c54ce87e1c2b202e2dffa08053e49a Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:01:38 -0400 Subject: [PATCH 18/42] fix: adding ci related requirements --- requirements/ci.in | 5 + requirements/ci.txt | 402 +++++++++++++++++++++++++++++++++++++++++++ requirements/tox.in | 4 + requirements/tox.txt | 32 ++++ 4 files changed, 443 insertions(+) create mode 100644 requirements/ci.in create mode 100644 requirements/ci.txt create mode 100644 requirements/tox.in create mode 100644 requirements/tox.txt 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..a22de95 --- /dev/null +++ b/requirements/ci.txt @@ -0,0 +1,402 @@ +# +# 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 +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 +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/tox.txt + # 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/tox.txt + # tox +py==1.11.0 + # via + # -r requirements/tox.txt + # 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/tox.txt + # packaging +pypng==0.0.21 + # via + # -r requirements/test.txt + # xblock-sdk +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 +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/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 From a030e243740f79ddff71db6581220a285a73cbdf Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:02:08 -0400 Subject: [PATCH 19/42] fix: processing new requirements --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 0011693..48f53a5 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with 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 From 3d2364609c0d7d7d8c71b0bb22145f1b2b0911d3 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:04:13 -0400 Subject: [PATCH 20/42] fix: update requirements --- requirements/base.txt | 16 +++++++--------- requirements/common_constraints.txt | 7 ++++++- requirements/pip_tools.txt | 10 +++++----- 3 files changed, 18 insertions(+), 15 deletions(-) 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/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/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: From 80493ca5de48497f4f2c71dc063b6a84b1e41792 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:38:30 -0400 Subject: [PATCH 21/42] fix: simplified test entry --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48f53a5..1aa57f0 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ quality: ## Run the quality checks test: ## Run the tests mkdir -p var rm -rf .coverage - python -m coverage run --rcfile=.coveragerc ./test.py --noinput + python -m coverage run --rcfile=.coveragerc -m pytest covreport: ## Show the coverage results python -m coverage report -m --skip-covered From caa4823b414816f40b4b643d594be47c40dddfb3 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:39:02 -0400 Subject: [PATCH 22/42] fix: install pytest in the venv --- requirements/test.in | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/test.in b/requirements/test.in index 76569d8..4638577 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -8,5 +8,6 @@ ddt edx_lint mock pycodestyle +pytest twine xblock-sdk \ No newline at end of file From c305ae931539bb3c46ff37db756e28e6063170b2 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:44:38 -0400 Subject: [PATCH 23/42] fix: make upgrade --- requirements/ci.txt | 18 ++++++++++++++++++ requirements/test.txt | 18 +++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/requirements/ci.txt b/requirements/ci.txt index a22de95..10af76c 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -21,6 +21,10 @@ astroid==2.11.6 # -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 @@ -145,6 +149,10 @@ 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 @@ -199,7 +207,9 @@ 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 @@ -217,11 +227,15 @@ platformdirs==2.5.2 # 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 @@ -256,12 +270,15 @@ pylint-plugin-utils==0.7 # 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 @@ -351,6 +368,7 @@ tomli==2.0.1 # via # -r requirements/test.txt # pylint + # pytest tomlkit==0.11.0 # via # -r requirements/test.txt diff --git a/requirements/test.txt b/requirements/test.txt index 8ec0f30..ddddf74 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -16,6 +16,8 @@ astroid==2.11.6 # via # pylint # pylint-celery +attrs==21.4.0 + # via pytest binaryornot==0.4.4 # via cookiecutter bleach==5.0.0 @@ -87,6 +89,8 @@ 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 @@ -124,12 +128,18 @@ 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 @@ -152,8 +162,12 @@ 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 @@ -211,7 +225,9 @@ stevedore==3.5.0 text-unidecode==1.3 # via python-slugify tomli==2.0.1 - # via pylint + # via + # pylint + # pytest tomlkit==0.11.0 # via pylint twine==4.0.1 From 1b556938e3df0fadcad9d2a27ae6b6b64ea8c127 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:53:43 -0400 Subject: [PATCH 24/42] fix: pointless test to exercise the harness --- done/tests/test_nothing.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 done/tests/test_nothing.py diff --git a/done/tests/test_nothing.py b/done/tests/test_nothing.py new file mode 100644 index 0000000..d10de41 --- /dev/null +++ b/done/tests/test_nothing.py @@ -0,0 +1,3 @@ +# Adding a pointless test to exercise CI as this project has not current tests +def test_always_passes(): + assert True \ No newline at end of file From 374674cfbe42a1558bac4713ccc676d0dd558bdf Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 15:56:36 -0400 Subject: [PATCH 25/42] fix: making module --- done/tests/__init__.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 done/tests/__init__.py 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 +""" From 7bef3aef20fab74438bfb6043ae00fafccfa5422 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 16:00:52 -0400 Subject: [PATCH 26/42] fix: quality --- done/tests/test_nothing.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/done/tests/test_nothing.py b/done/tests/test_nothing.py index d10de41..2444805 100644 --- a/done/tests/test_nothing.py +++ b/done/tests/test_nothing.py @@ -1,3 +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 \ No newline at end of file + assert True From 414c10c859f794a08069ee8551400f72ee926862 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 16:54:40 -0400 Subject: [PATCH 27/42] fix: adding CI badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 70da719..478a83a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ DoneXBlock ============== [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) +[![Python CI](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml/badge.svg)](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml) [![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 From 77bad1666218e4beb0c0918fa97663f263c1f2ba Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 17:24:59 -0400 Subject: [PATCH 28/42] fix: use a title --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 478a83a..6fc42d2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ +########## DoneXBlock -============== +########## [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) [![Python CI](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml/badge.svg)](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml) [![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) +Purpose +======= + Lets a student mark they've finished an activity. The student can click through two states of the XBlock, shown below: From 3dc6fdcbe481792822cf9299bb92c9e8993c3ef3 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 17:25:09 -0400 Subject: [PATCH 29/42] fix: iterate toward README standard --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 6fc42d2..5923832 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,39 @@ click through two states of the XBlock, shown below: ![Done screenshot](completionxblock_undo.png) +Status +====== + +Maintained + +Getting Help +============ + +To be Written + +How to Contribute +================= + +Details about how to become a contributor to the Open edX project may +be found +[here](https://miro.com/app/board/uXjVOEVVXJY=/?moveToWidget=3458764527654681386&cot=14). + +The Open edX Code of Conduct +---------------------------- + +All community members should familarize themselves with the [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)[https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock], +or groked from inspecting catalog-info.yaml. + +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 From d61b419d4c4f00db8a5bc7765be221774bbc89cb Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 17:25:52 -0400 Subject: [PATCH 30/42] fix: coverage config --- .coveragerc | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .coveragerc 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 From 389aea63d751dff7a14e56921bfa56fff9d6e460 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 17:32:31 -0400 Subject: [PATCH 31/42] fix: unmix md and rst --- README.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5923832..28b0fe3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -########## DoneXBlock -########## +========== [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) [![Python CI](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml/badge.svg)](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml) [![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) Purpose -======= +------- Lets a student mark they've finished an activity. The student can click through two states of the XBlock, shown below: @@ -16,30 +15,29 @@ click through two states of the XBlock, shown below: ![Done screenshot](completionxblock_undo.png) Status -====== +------ Maintained Getting Help -============ +------------ To be Written How to Contribute -================= +----------------- Details about how to become a contributor to the Open edX project may be found [here](https://miro.com/app/board/uXjVOEVVXJY=/?moveToWidget=3458764527654681386&cot=14). -The Open edX Code of Conduct ----------------------------- +### The Open edX Code of Conduct All community members should familarize themselves with the [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 @@ -47,7 +45,8 @@ may be found in or groked from inspecting catalog-info.yaml. 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 From f3ba5ecf142493cf89f2d43be0bc92670dd8d876 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 17:34:27 -0400 Subject: [PATCH 32/42] fix: mixed up link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28b0fe3..ebee368 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ People The assigned maintainers for this component and other project details may be found in -(Backstage)[https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock], +[Backstage](https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock), or groked from inspecting catalog-info.yaml. History From c0ba89364bfd8022b9c26a9203988de756aa1574 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 17:58:29 -0400 Subject: [PATCH 33/42] fix: changing to RST --- README.md | 65 ----------------------------------------- README.rst | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 65 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index ebee368..0000000 --- a/README.md +++ /dev/null @@ -1,65 +0,0 @@ -DoneXBlock -========== -[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) -[![Python CI](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml/badge.svg)](https://github.com/openedx/DoneXBlock/actions/workflows/ci.yml) -[![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) - -Purpose -------- - -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) - -Status ------- - -Maintained - -Getting Help ------------- - -To be Written - -How to Contribute ------------------ - -Details about how to become a contributor to the Open edX project may -be found -[here](https://miro.com/app/board/uXjVOEVVXJY=/?moveToWidget=3458764527654681386&cot=14). - -### The Open edX Code of Conduct - -All community members should familarize themselves with the [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](https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock), -or groked from inspecting catalog-info.yaml. - -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/README.rst b/README.rst new file mode 100644 index 0000000..727b524 --- /dev/null +++ b/README.rst @@ -0,0 +1,86 @@ +########## +DoneXBlock +########## +|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: + +![Done screenshot](completionxblock_mark.png) + +![Done screenshot](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 +.. _here: 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: https://openedx.org/code-of-conduct/. + +People +====== + +The assigned maintainers for this component and other project details +may be found in +..Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock, +or groked from inspecting catalog-info.yaml. + +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. From f11125b7dab6119eb74b80fbc2f6909a1bf0db5b Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 18:39:02 -0400 Subject: [PATCH 34/42] fix: more conversion fixes --- README.rst | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 727b524..e2465e2 100644 --- a/README.rst +++ b/README.rst @@ -1,12 +1,17 @@ ########## DoneXBlock ########## -|License: AGPL v3| image:: https://img.shields.io/badge/License-AGPL_v3-blue.svg +|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 +.. |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 + +..|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 @@ -42,22 +47,24 @@ How to Contribute ================= Details about how to become a contributor to the Open edX project may -be found -.. _here: https://openedx.atlassian.net/wiki/spaces/COMM/pages/941457737/How+to+start+contributing+to+the+Open+edX+code+base. +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: https://openedx.org/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: https://open-edx-backstage.herokuapp.com/catalog/default/component/DoneXBlock, -or groked from inspecting catalog-info.yaml. +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 ========================= From 7198c16464bf96fb196222d61fe6797c89436224 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 18:42:06 -0400 Subject: [PATCH 35/42] fix: more syntax --- README.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.rst b/README.rst index e2465e2..9a1eaf0 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,7 @@ ########## DoneXBlock ########## -|License AGPL v3| -|Python CI| -|Publish package to PyPi| +| |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 From 795416e35ed23f793b85cfc38b272663a7ccf7f5 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 18:57:28 -0400 Subject: [PATCH 36/42] fix: more syntax --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 9a1eaf0..ef5cf4a 100644 --- a/README.rst +++ b/README.rst @@ -6,10 +6,10 @@ DoneXBlock .. |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 +.. |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 +..|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 From e8c10e35e7611a8fb673ccbd95067f841f4265b1 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 19:02:50 -0400 Subject: [PATCH 37/42] fix: ffs --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() From 82b2cd6abdf89a13004fc59e9f4d18c431230a43 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 19:04:17 -0400 Subject: [PATCH 38/42] fix: rst syntax --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ef5cf4a..f4809ac 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ ########## DoneXBlock ########## -| |License AGPL v3| |Python CI|| Publish package to PyPi| +| |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 From 38945de5f67b05c4bf7e1777343c3264526daf09 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 19:06:06 -0400 Subject: [PATCH 39/42] fix: so fiddly --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f4809ac..79c3053 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ ########## DoneXBlock ########## -| |License AGPL v3| |Python CI| | Publish package to PyPi| +| |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 From 8142660053db46740895163a9c89f8a11614d780 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 19:09:21 -0400 Subject: [PATCH 40/42] fix: so fiddly --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 79c3053..f1197d1 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ DoneXBlock .. |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 +.. |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 From 154d5b0971e5eb6f9d2eff47ba68b0af41748436 Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 19:16:24 -0400 Subject: [PATCH 41/42] fix: more fiddles --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index f1197d1..242f0c3 100644 --- a/README.rst +++ b/README.rst @@ -4,13 +4,13 @@ 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 + :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 + :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 + :target: https://github.com/openedx/DoneXBlock/actions/workflows/pypi-release.yml Purpose ======= From 9fb1ba0568b2d4f7ba7a6fb31a8549a72e34e85b Mon Sep 17 00:00:00 2001 From: Edward Zarecor Date: Thu, 16 Jun 2022 19:28:40 -0400 Subject: [PATCH 42/42] fix: images --- README.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 242f0c3..4fd1a28 100644 --- a/README.rst +++ b/README.rst @@ -18,9 +18,11 @@ Purpose 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) +| |mark| +| |undo| -![Done screenshot](completionxblock_undo.png) +.. |mark| image:: completionxblock_mark.png +.. |undo| image:: completionxblock_undo.png Status ======