From 9a1b6ec26ecad44e1a4fce0cc9c903bcf8c6ecac Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Fri, 28 Jul 2023 16:13:36 +0200 Subject: [PATCH] feat: replace signal handler with openedx_event producer config --- README.rst | 10 +++- requirements/base.txt | 16 ++--- requirements/ci.txt | 14 +++-- requirements/dev.txt | 120 +++++++++++++++++++------------------ requirements/doc.txt | 111 ++++++++++++++++------------------ requirements/pip-tools.txt | 11 ++-- requirements/pip.txt | 6 +- requirements/quality.txt | 96 ++++++++++++++--------------- requirements/test.txt | 73 +++++++++++----------- skill_tagging/apps.py | 14 ----- skill_tagging/handlers.py | 21 ------- 11 files changed, 232 insertions(+), 260 deletions(-) delete mode 100644 skill_tagging/handlers.py diff --git a/README.rst b/README.rst index 7d50908..9d77b7f 100644 --- a/README.rst +++ b/README.rst @@ -105,9 +105,13 @@ settings: ``lms/envs/common.py`` # helps to configure probability of displaying the verification forms. Values in range 0 to 1 are allowed, where 0 # means never and 1 means always display. Default value is 0.5 i.e. 50% chance of displaying the form. SHOW_SKILL_VERIFICATION_PROBABILITY = 0.5 - # Optionally update topic name for verification event emitted when a user verifies tags for an xblock. - EVENT_BUS_XBLOCK_VERIFICATION_TOPIC = "learning-custom-xblock-skill-verfied" - + # Include the XBLOCK_SKILL_VERIFIED signal in `EVENT_BUS_PRODUCER_CONFIG` to push the event to event bus + # Note: Include `openedx_events` in `INSTALLED_APPS` setting in the host application + EVENT_BUS_PRODUCER_CONFIG = { + 'org.openedx.learning.xblock.skill.verified.v1': [ + {'topic': 'learning-custom-xblock-skill-verfied', 'event_key_field': 'xblock_info.usage_key', 'enabled': True}, + ], + } Developing ========== diff --git a/requirements/base.txt b/requirements/base.txt index b0adcf4..43325e0 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,7 +8,7 @@ asgiref==3.7.2 # via django attrs==23.1.0 # via openedx-events -django==3.2.19 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -17,13 +17,13 @@ django==3.2.19 # openedx-filters django-model-utils==4.3.1 # via -r requirements/base.in -edx-opaque-keys[django]==2.3.0 +edx-opaque-keys[django]==2.5.0 # via openedx-events -fastavro==1.7.4 +fastavro==1.8.2 # via openedx-events -openedx-events==8.0.1 +openedx-events==8.6.0 # via -r requirements/base.in -openedx-filters==1.3.0 +openedx-filters==1.6.0 # via -r requirements/base.in pbr==5.11.1 # via stevedore @@ -35,5 +35,7 @@ sqlparse==0.4.4 # via django stevedore==5.1.0 # via edx-opaque-keys -typing-extensions==4.6.3 - # via asgiref +typing-extensions==4.7.1 + # via + # asgiref + # edx-opaque-keys diff --git a/requirements/ci.txt b/requirements/ci.txt index 0989b5e..431a6fe 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,17 +4,17 @@ # # make upgrade # -distlib==0.3.6 +distlib==0.3.7 # via virtualenv -filelock==3.12.2 +filelock==3.12.3 # via # tox # virtualenv packaging==23.1 # via tox -platformdirs==3.5.3 +platformdirs==3.10.0 # via virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via tox py==1.11.0 # via tox @@ -27,7 +27,9 @@ tox==3.28.0 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/ci.in # tox-battery -tox-battery==0.6.1 +tox-battery==0.6.2 # via -r requirements/ci.in -virtualenv==20.23.0 +typing-extensions==4.7.1 + # via filelock +virtualenv==20.24.3 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 5cf39a0..4697065 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -11,12 +11,12 @@ appdirs==1.4.4 arrow==1.2.3 # via # -r requirements/quality.txt - # jinja2-time + # cookiecutter asgiref==3.7.2 # via # -r requirements/quality.txt # django -astroid==2.15.5 +astroid==2.15.6 # via # -r requirements/quality.txt # pylint @@ -29,11 +29,11 @@ binaryornot==0.4.4 # via # -r requirements/quality.txt # cookiecutter -boto3==1.26.153 +boto3==1.28.36 # via # -r requirements/quality.txt # fs-s3fs -botocore==1.29.153 +botocore==1.31.36 # via # -r requirements/quality.txt # boto3 @@ -42,20 +42,20 @@ build==0.10.0 # via # -r requirements/pip-tools.txt # pip-tools -certifi==2023.5.7 +certifi==2023.7.22 # via # -r requirements/quality.txt # requests -chardet==5.1.0 +chardet==5.2.0 # via # -r requirements/quality.txt # binaryornot # diff-cover -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via # -r requirements/quality.txt # requests -click==8.1.3 +click==8.1.7 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt @@ -68,36 +68,35 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.3.0 +code-annotations==1.5.0 # via # -r requirements/quality.txt # edx-lint -cookiecutter==2.1.1 +cookiecutter==2.3.0 # via # -r requirements/quality.txt # xblock-sdk -coverage[toml]==7.2.7 +coverage[toml]==7.3.0 # via # -r requirements/quality.txt # pytest-cov -diff-cover==7.6.0 +diff-cover==7.7.0 # via -r requirements/dev.in -dill==0.3.6 +dill==0.3.7 # via # -r requirements/quality.txt # pylint -distlib==0.3.6 +distlib==0.3.7 # via # -r requirements/ci.txt # virtualenv -django==3.2.19 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt # django-model-utils # djangorestframework # edx-i18n-tools - # openedx-django-pyfs # openedx-events # openedx-filters # xblock-sdk @@ -105,23 +104,23 @@ django-model-utils==4.3.1 # via -r requirements/quality.txt djangorestframework==3.14.0 # via -r requirements/quality.txt -edx-i18n-tools==0.9.2 +edx-i18n-tools==1.1.0 # via -r requirements/dev.in edx-lint==5.3.4 # via -r requirements/quality.txt -edx-opaque-keys[django]==2.3.0 +edx-opaque-keys[django]==2.5.0 # via # -r requirements/quality.txt # openedx-events -exceptiongroup==1.1.1 +exceptiongroup==1.1.3 # via # -r requirements/quality.txt # pytest -fastavro==1.7.4 +fastavro==1.8.2 # via # -r requirements/quality.txt # openedx-events -filelock==3.12.2 +filelock==3.12.3 # via # -r requirements/ci.txt # tox @@ -130,12 +129,10 @@ fs==2.4.16 # via # -r requirements/quality.txt # fs-s3fs - # openedx-django-pyfs # xblock fs-s3fs==1.1.1 # via # -r requirements/quality.txt - # openedx-django-pyfs # xblock-sdk idna==3.4 # via @@ -155,29 +152,24 @@ jinja2==3.1.2 # code-annotations # cookiecutter # diff-cover - # jinja2-time -jinja2-time==0.2.0 - # via - # -r requirements/quality.txt - # cookiecutter jmespath==1.0.1 # via # -r requirements/quality.txt # boto3 # botocore -lazy==1.5 - # via - # -r requirements/quality.txt - # xblock lazy-object-proxy==1.9.0 # via # -r requirements/quality.txt # astroid -lxml==4.9.2 +lxml==4.9.3 # via # -r requirements/quality.txt # xblock # xblock-sdk +markdown-it-py==3.0.0 + # via + # -r requirements/quality.txt + # rich markupsafe==2.1.3 # via # -r requirements/quality.txt @@ -187,15 +179,15 @@ mccabe==0.7.0 # via # -r requirements/quality.txt # pylint -mock==5.0.2 - # via -r requirements/quality.txt -openedx-django-pyfs==3.3.0 +mdurl==0.1.2 # via # -r requirements/quality.txt - # xblock -openedx-events==8.0.1 + # markdown-it-py +mock==5.1.0 # via -r requirements/quality.txt -openedx-filters==1.3.0 +openedx-events==8.6.0 + # via -r requirements/quality.txt +openedx-filters==1.6.0 # via -r requirements/quality.txt packaging==23.1 # via @@ -205,21 +197,21 @@ packaging==23.1 # build # pytest # tox -path==16.6.0 +path==16.7.1 # via edx-i18n-tools pbr==5.11.1 # via # -r requirements/quality.txt # stevedore -pip-tools==6.13.0 +pip-tools==7.3.0 # via -r requirements/pip-tools.txt -platformdirs==3.5.3 +platformdirs==3.10.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # pylint # virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via # -r requirements/ci.txt # -r requirements/quality.txt @@ -232,13 +224,16 @@ py==1.11.0 # via # -r requirements/ci.txt # tox -pycodestyle==2.10.0 +pycodestyle==2.11.0 # via -r requirements/quality.txt pydocstyle==6.3.0 # via -r requirements/quality.txt -pygments==2.15.1 - # via diff-cover -pylint==2.17.4 +pygments==2.16.1 + # via + # -r requirements/quality.txt + # diff-cover + # rich +pylint==2.17.5 # via # -r requirements/quality.txt # edx-lint @@ -270,7 +265,7 @@ pyproject-hooks==1.0.0 # via # -r requirements/pip-tools.txt # build -pytest==7.3.2 +pytest==7.4.0 # via # -r requirements/quality.txt # pytest-cov @@ -296,7 +291,7 @@ pytz==2023.3 # django # djangorestframework # xblock -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/quality.txt # code-annotations @@ -308,7 +303,11 @@ requests==2.31.0 # -r requirements/quality.txt # cookiecutter # xblock-sdk -s3transfer==0.6.1 +rich==13.5.2 + # via + # -r requirements/quality.txt + # cookiecutter +s3transfer==0.6.2 # via # -r requirements/quality.txt # boto3 @@ -349,11 +348,12 @@ tomli==2.0.1 # -r requirements/quality.txt # build # coverage + # pip-tools # pylint # pyproject-hooks # pytest # tox -tomlkit==0.11.8 +tomlkit==0.12.1 # via # -r requirements/quality.txt # pylint @@ -362,24 +362,28 @@ tox==3.28.0 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/ci.txt # tox-battery -tox-battery==0.6.1 +tox-battery==0.6.2 # via -r requirements/ci.txt -typing-extensions==4.6.3 +typing-extensions==4.7.1 # via + # -r requirements/ci.txt # -r requirements/quality.txt # asgiref # astroid + # edx-opaque-keys + # filelock # pylint + # rich urllib3==1.26.16 # via # -r requirements/quality.txt # botocore # requests -virtualenv==20.23.0 +virtualenv==20.24.3 # via # -r requirements/ci.txt # tox -web-fragments==2.0.0 +web-fragments==2.1.0 # via # -r requirements/quality.txt # xblock @@ -389,7 +393,7 @@ webob==1.8.7 # -r requirements/quality.txt # xblock # xblock-sdk -wheel==0.40.0 +wheel==0.41.2 # via # -r requirements/pip-tools.txt # pip-tools @@ -397,11 +401,11 @@ wrapt==1.15.0 # via # -r requirements/quality.txt # astroid -xblock[django]==1.6.2 +xblock==1.7.0 # via # -r requirements/quality.txt # xblock-sdk -xblock-sdk==0.6.0 +xblock-sdk==0.7.0 # via -r requirements/quality.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/doc.txt b/requirements/doc.txt index 11774ae..ef9170c 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -13,7 +13,7 @@ appdirs==1.4.4 arrow==1.2.3 # via # -r requirements/test.txt - # jinja2-time + # cookiecutter asgiref==3.7.2 # via # -r requirements/test.txt @@ -30,55 +30,54 @@ binaryornot==0.4.4 # cookiecutter bleach==6.0.0 # via readme-renderer -boto3==1.26.153 +boto3==1.28.36 # via # -r requirements/test.txt # fs-s3fs -botocore==1.29.153 +botocore==1.31.36 # via # -r requirements/test.txt # boto3 # s3transfer build==0.10.0 # via -r requirements/doc.in -certifi==2023.5.7 +certifi==2023.7.22 # via # -r requirements/test.txt # requests cffi==1.15.1 # via cryptography -chardet==5.1.0 +chardet==5.2.0 # via # -r requirements/test.txt # binaryornot -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via # -r requirements/test.txt # requests -click==8.1.3 +click==8.1.7 # via # -r requirements/test.txt # code-annotations # cookiecutter -code-annotations==1.3.0 +code-annotations==1.5.0 # via -r requirements/test.txt -cookiecutter==2.1.1 +cookiecutter==2.3.0 # via # -r requirements/test.txt # xblock-sdk -coverage[toml]==7.2.7 +coverage[toml]==7.3.0 # via # -r requirements/test.txt # pytest-cov -cryptography==41.0.1 +cryptography==41.0.3 # via secretstorage -django==3.2.19 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt # django-model-utils # djangorestframework - # openedx-django-pyfs # openedx-events # openedx-filters # xblock-sdk @@ -88,21 +87,21 @@ djangorestframework==3.14.0 # via -r requirements/test.txt doc8==1.1.1 # via -r requirements/doc.in -docutils==0.19 +docutils==0.20.1 # via # doc8 # readme-renderer # restructuredtext-lint # sphinx -edx-opaque-keys[django]==2.3.0 +edx-opaque-keys[django]==2.5.0 # via # -r requirements/test.txt # openedx-events -exceptiongroup==1.1.1 +exceptiongroup==1.1.3 # via # -r requirements/test.txt # pytest -fastavro==1.7.4 +fastavro==1.8.2 # via # -r requirements/test.txt # openedx-events @@ -110,12 +109,10 @@ fs==2.4.16 # via # -r requirements/test.txt # fs-s3fs - # openedx-django-pyfs # xblock fs-s3fs==1.1.1 # via # -r requirements/test.txt - # openedx-django-pyfs # xblock-sdk idna==3.4 # via @@ -123,18 +120,18 @@ idna==3.4 # requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.6.0 +importlib-metadata==6.8.0 # via # keyring # sphinx # twine -importlib-resources==5.12.0 +importlib-resources==6.0.1 # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -jaraco-classes==3.2.3 +jaraco-classes==3.3.0 # via keyring jeepney==0.8.0 # via @@ -145,48 +142,39 @@ jinja2==3.1.2 # -r requirements/test.txt # code-annotations # cookiecutter - # jinja2-time # sphinx -jinja2-time==0.2.0 - # via - # -r requirements/test.txt - # cookiecutter jmespath==1.0.1 # via # -r requirements/test.txt # boto3 # botocore -keyring==23.13.1 +keyring==24.2.0 # via twine -lazy==1.5 - # via - # -r requirements/test.txt - # xblock -lxml==4.9.2 +lxml==4.9.3 # via # -r requirements/test.txt # xblock # xblock-sdk markdown-it-py==3.0.0 - # via rich + # via + # -r requirements/test.txt + # rich markupsafe==2.1.3 # via # -r requirements/test.txt # jinja2 # xblock mdurl==0.1.2 - # via markdown-it-py -mock==5.0.2 - # via -r requirements/test.txt -more-itertools==9.1.0 - # via jaraco-classes -openedx-django-pyfs==3.3.0 # via # -r requirements/test.txt - # xblock -openedx-events==8.0.1 + # markdown-it-py +mock==5.1.0 # via -r requirements/test.txt -openedx-filters==1.3.0 +more-itertools==10.1.0 + # via jaraco-classes +openedx-events==8.6.0 + # via -r requirements/test.txt +openedx-filters==1.6.0 # via -r requirements/test.txt packaging==23.1 # via @@ -200,14 +188,15 @@ pbr==5.11.1 # stevedore pkginfo==1.9.6 # via twine -pluggy==1.0.0 +pluggy==1.3.0 # via # -r requirements/test.txt # pytest pycparser==2.21 # via cffi -pygments==2.15.1 +pygments==2.16.1 # via + # -r requirements/test.txt # doc8 # readme-renderer # rich @@ -222,7 +211,7 @@ pypng==0.20220715.0 # xblock-sdk pyproject-hooks==1.0.0 # via build -pytest==7.3.2 +pytest==7.4.0 # via # -r requirements/test.txt # pytest-cov @@ -249,13 +238,13 @@ pytz==2023.3 # django # djangorestframework # xblock -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/test.txt # code-annotations # cookiecutter # xblock -readme-renderer==37.3 +readme-renderer==41.0 # via twine requests==2.31.0 # via @@ -271,9 +260,12 @@ restructuredtext-lint==1.4.0 # via doc8 rfc3986==2.0.0 # via twine -rich==13.4.2 - # via twine -s3transfer==0.6.1 +rich==13.5.2 + # via + # -r requirements/test.txt + # cookiecutter + # twine +s3transfer==0.6.2 # via # -r requirements/test.txt # boto3 @@ -292,10 +284,8 @@ six==1.16.0 # python-dateutil snowballstemmer==2.2.0 # via sphinx -sphinx==5.3.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/doc.in +sphinx==7.1.2 + # via -r requirements/doc.in sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -332,10 +322,11 @@ tomli==2.0.1 # pytest twine==4.0.2 # via -r requirements/doc.in -typing-extensions==4.6.3 +typing-extensions==4.7.1 # via # -r requirements/test.txt # asgiref + # edx-opaque-keys # rich urllib3==1.26.16 # via @@ -343,7 +334,7 @@ urllib3==1.26.16 # botocore # requests # twine -web-fragments==2.0.0 +web-fragments==2.1.0 # via # -r requirements/test.txt # xblock @@ -355,13 +346,13 @@ webob==1.8.7 # -r requirements/test.txt # xblock # xblock-sdk -xblock[django]==1.6.2 +xblock==1.7.0 # via # -r requirements/test.txt # xblock-sdk -xblock-sdk==0.6.0 +xblock-sdk==0.7.0 # via -r requirements/test.txt -zipp==3.15.0 +zipp==3.16.2 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index fd0cc1c..007ed38 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -6,17 +6,20 @@ # build==0.10.0 # via pip-tools -click==8.1.3 +click==8.1.7 # via pip-tools packaging==23.1 # via build -pip-tools==6.13.0 +pip-tools==7.3.0 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via build tomli==2.0.1 - # via build -wheel==0.40.0 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.41.2 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 5a5ce22..13c7e84 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.40.0 +wheel==0.41.2 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r requirements/pip.in -setuptools==67.8.0 +setuptools==68.1.2 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index fe02305..505f494 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -11,12 +11,12 @@ appdirs==1.4.4 arrow==1.2.3 # via # -r requirements/test.txt - # jinja2-time + # cookiecutter asgiref==3.7.2 # via # -r requirements/test.txt # django -astroid==2.15.5 +astroid==2.15.6 # via # pylint # pylint-celery @@ -28,28 +28,28 @@ binaryornot==0.4.4 # via # -r requirements/test.txt # cookiecutter -boto3==1.26.153 +boto3==1.28.36 # via # -r requirements/test.txt # fs-s3fs -botocore==1.29.153 +botocore==1.31.36 # via # -r requirements/test.txt # boto3 # s3transfer -certifi==2023.5.7 +certifi==2023.7.22 # via # -r requirements/test.txt # requests -chardet==5.1.0 +chardet==5.2.0 # via # -r requirements/test.txt # binaryornot -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via # -r requirements/test.txt # requests -click==8.1.3 +click==8.1.7 # via # -r requirements/test.txt # click-log @@ -58,27 +58,26 @@ click==8.1.3 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.3.0 +code-annotations==1.5.0 # via # -r requirements/test.txt # edx-lint -cookiecutter==2.1.1 +cookiecutter==2.3.0 # via # -r requirements/test.txt # xblock-sdk -coverage[toml]==7.2.7 +coverage[toml]==7.3.0 # via # -r requirements/test.txt # pytest-cov -dill==0.3.6 +dill==0.3.7 # via pylint -django==3.2.19 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt # django-model-utils # djangorestframework - # openedx-django-pyfs # openedx-events # openedx-filters # xblock-sdk @@ -88,15 +87,15 @@ djangorestframework==3.14.0 # via -r requirements/test.txt edx-lint==5.3.4 # via -r requirements/quality.in -edx-opaque-keys[django]==2.3.0 +edx-opaque-keys[django]==2.5.0 # via # -r requirements/test.txt # openedx-events -exceptiongroup==1.1.1 +exceptiongroup==1.1.3 # via # -r requirements/test.txt # pytest -fastavro==1.7.4 +fastavro==1.8.2 # via # -r requirements/test.txt # openedx-events @@ -104,12 +103,10 @@ fs==2.4.16 # via # -r requirements/test.txt # fs-s3fs - # openedx-django-pyfs # xblock fs-s3fs==1.1.1 # via # -r requirements/test.txt - # openedx-django-pyfs # xblock-sdk idna==3.4 # via @@ -128,27 +125,22 @@ jinja2==3.1.2 # -r requirements/test.txt # code-annotations # cookiecutter - # jinja2-time -jinja2-time==0.2.0 - # via - # -r requirements/test.txt - # cookiecutter jmespath==1.0.1 # via # -r requirements/test.txt # boto3 # botocore -lazy==1.5 - # via - # -r requirements/test.txt - # xblock lazy-object-proxy==1.9.0 # via astroid -lxml==4.9.2 +lxml==4.9.3 # via # -r requirements/test.txt # xblock # xblock-sdk +markdown-it-py==3.0.0 + # via + # -r requirements/test.txt + # rich markupsafe==2.1.3 # via # -r requirements/test.txt @@ -156,15 +148,15 @@ markupsafe==2.1.3 # xblock mccabe==0.7.0 # via pylint -mock==5.0.2 - # via -r requirements/test.txt -openedx-django-pyfs==3.3.0 +mdurl==0.1.2 # via # -r requirements/test.txt - # xblock -openedx-events==8.0.1 + # markdown-it-py +mock==5.1.0 + # via -r requirements/test.txt +openedx-events==8.6.0 # via -r requirements/test.txt -openedx-filters==1.3.0 +openedx-filters==1.6.0 # via -r requirements/test.txt packaging==23.1 # via @@ -174,17 +166,21 @@ pbr==5.11.1 # via # -r requirements/test.txt # stevedore -platformdirs==3.5.3 +platformdirs==3.10.0 # via pylint -pluggy==1.0.0 +pluggy==1.3.0 # via # -r requirements/test.txt # pytest -pycodestyle==2.10.0 +pycodestyle==2.11.0 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==2.17.4 +pygments==2.16.1 + # via + # -r requirements/test.txt + # rich +pylint==2.17.5 # via # edx-lint # pylint-celery @@ -206,7 +202,7 @@ pypng==0.20220715.0 # via # -r requirements/test.txt # xblock-sdk -pytest==7.3.2 +pytest==7.4.0 # via # -r requirements/test.txt # pytest-cov @@ -232,7 +228,7 @@ pytz==2023.3 # django # djangorestframework # xblock -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/test.txt # code-annotations @@ -243,7 +239,11 @@ requests==2.31.0 # -r requirements/test.txt # cookiecutter # xblock-sdk -s3transfer==0.6.1 +rich==13.5.2 + # via + # -r requirements/test.txt + # cookiecutter +s3transfer==0.6.2 # via # -r requirements/test.txt # boto3 @@ -279,20 +279,22 @@ tomli==2.0.1 # coverage # pylint # pytest -tomlkit==0.11.8 +tomlkit==0.12.1 # via pylint -typing-extensions==4.6.3 +typing-extensions==4.7.1 # via # -r requirements/test.txt # asgiref # astroid + # edx-opaque-keys # pylint + # rich urllib3==1.26.16 # via # -r requirements/test.txt # botocore # requests -web-fragments==2.0.0 +web-fragments==2.1.0 # via # -r requirements/test.txt # xblock @@ -304,11 +306,11 @@ webob==1.8.7 # xblock-sdk wrapt==1.15.0 # via astroid -xblock[django]==1.6.2 +xblock==1.7.0 # via # -r requirements/test.txt # xblock-sdk -xblock-sdk==0.6.0 +xblock-sdk==0.7.0 # via -r requirements/test.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.txt b/requirements/test.txt index 6a82293..92b6150 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -7,7 +7,7 @@ appdirs==1.4.4 # via fs arrow==1.2.3 - # via jinja2-time + # via cookiecutter asgiref==3.7.2 # via # -r requirements/base.txt @@ -18,34 +18,33 @@ attrs==23.1.0 # openedx-events binaryornot==0.4.4 # via cookiecutter -boto3==1.26.153 +boto3==1.28.36 # via fs-s3fs -botocore==1.29.153 +botocore==1.31.36 # via # boto3 # s3transfer -certifi==2023.5.7 +certifi==2023.7.22 # via requests -chardet==5.1.0 +chardet==5.2.0 # via binaryornot -charset-normalizer==3.1.0 +charset-normalizer==3.2.0 # via requests -click==8.1.3 +click==8.1.7 # via # code-annotations # cookiecutter -code-annotations==1.3.0 +code-annotations==1.5.0 # via -r requirements/test.in -cookiecutter==2.1.1 +cookiecutter==2.3.0 # via xblock-sdk -coverage[toml]==7.2.7 +coverage[toml]==7.3.0 # via pytest-cov # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # django-model-utils # djangorestframework - # openedx-django-pyfs # openedx-events # openedx-filters # xblock-sdk @@ -53,25 +52,22 @@ django-model-utils==4.3.1 # via -r requirements/base.txt djangorestframework==3.14.0 # via -r requirements/test.in -edx-opaque-keys[django]==2.3.0 +edx-opaque-keys[django]==2.5.0 # via # -r requirements/base.txt # openedx-events -exceptiongroup==1.1.1 +exceptiongroup==1.1.3 # via pytest -fastavro==1.7.4 +fastavro==1.8.2 # via # -r requirements/base.txt # openedx-events fs==2.4.16 # via # fs-s3fs - # openedx-django-pyfs # xblock fs-s3fs==1.1.1 - # via - # openedx-django-pyfs - # xblock-sdk + # via xblock-sdk idna==3.4 # via requests iniconfig==2.0.0 @@ -80,30 +76,27 @@ jinja2==3.1.2 # via # code-annotations # cookiecutter - # jinja2-time -jinja2-time==0.2.0 - # via cookiecutter jmespath==1.0.1 # via # boto3 # botocore -lazy==1.5 - # via xblock -lxml==4.9.2 +lxml==4.9.3 # via # xblock # xblock-sdk +markdown-it-py==3.0.0 + # via rich markupsafe==2.1.3 # via # jinja2 # xblock -mock==5.0.2 +mdurl==0.1.2 + # via markdown-it-py +mock==5.1.0 # via -r requirements/test.in -openedx-django-pyfs==3.3.0 - # via xblock -openedx-events==8.0.1 +openedx-events==8.6.0 # via -r requirements/base.txt -openedx-filters==1.3.0 +openedx-filters==1.6.0 # via -r requirements/base.txt packaging==23.1 # via pytest @@ -111,15 +104,17 @@ pbr==5.11.1 # via # -r requirements/base.txt # stevedore -pluggy==1.0.0 +pluggy==1.3.0 # via pytest +pygments==2.16.1 + # via rich pymongo==3.13.0 # via # -r requirements/base.txt # edx-opaque-keys pypng==0.20220715.0 # via xblock-sdk -pytest==7.3.2 +pytest==7.4.0 # via # pytest-cov # pytest-django @@ -142,7 +137,7 @@ pytz==2023.3 # django # djangorestframework # xblock -pyyaml==6.0 +pyyaml==6.0.1 # via # code-annotations # cookiecutter @@ -151,7 +146,9 @@ requests==2.31.0 # via # cookiecutter # xblock-sdk -s3transfer==0.6.1 +rich==13.5.2 + # via cookiecutter +s3transfer==0.6.2 # via boto3 simplejson==3.19.1 # via xblock-sdk @@ -175,15 +172,17 @@ tomli==2.0.1 # via # coverage # pytest -typing-extensions==4.6.3 +typing-extensions==4.7.1 # via # -r requirements/base.txt # asgiref + # edx-opaque-keys + # rich urllib3==1.26.16 # via # botocore # requests -web-fragments==2.0.0 +web-fragments==2.1.0 # via # xblock # xblock-sdk @@ -191,9 +190,9 @@ webob==1.8.7 # via # xblock # xblock-sdk -xblock[django]==1.6.2 +xblock==1.7.0 # via xblock-sdk -xblock-sdk==0.6.0 +xblock-sdk==0.7.0 # via -r requirements/test.in # The following packages are considered to be unsafe in a requirements file: diff --git a/skill_tagging/apps.py b/skill_tagging/apps.py index 4f0858a..e21687e 100644 --- a/skill_tagging/apps.py +++ b/skill_tagging/apps.py @@ -11,17 +11,3 @@ class SkillTaggingConfig(AppConfig): """ name = 'skill_tagging' - - plugin_app = { - "signals_config": { - "lms.djangoapp": { - "relative_path": "handlers", - "receivers": [ - { - "receiver_func_name": "listen_for_xblock_skill_verified", - "signal_path": "openedx_events.learning.signals.XBLOCK_SKILL_VERIFIED", - }, - ], - } - }, - } diff --git a/skill_tagging/handlers.py b/skill_tagging/handlers.py deleted file mode 100644 index 0e652af..0000000 --- a/skill_tagging/handlers.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -skill_tagging signal handlers -""" - -from django.conf import settings -from openedx_events.event_bus import get_producer -from openedx_events.learning.signals import XBLOCK_SKILL_VERIFIED - - -def listen_for_xblock_skill_verified(**kwargs): - """ - Publish openedx-event XBLOCK_SKILL_VERIFIED signal onto the event bus. - """ - topic = getattr(settings, "EVENT_BUS_XBLOCK_VERIFICATION_TOPIC", "learning-xblock-skill-verified") - get_producer().send( - signal=XBLOCK_SKILL_VERIFIED, - topic=topic, - event_key_field='xblock_info.usage_key', - event_data={'xblock_info': kwargs['xblock_info']}, - event_metadata=kwargs['metadata'], - )