diff --git a/pylintrc b/pylintrc index e3c34bc2..47c221c5 100644 --- a/pylintrc +++ b/pylintrc @@ -64,7 +64,7 @@ # SERIOUSLY. # # ------------------------------ -# Generated by edx-lint version: 5.2.5 +# Generated by edx-lint version: 5.3.6 # ------------------------------ [MASTER] ignore = migrations @@ -259,6 +259,7 @@ enable = useless-suppression, disable = bad-indentation, + broad-exception-raised, consider-using-f-string, duplicate-code, file-ignored, @@ -286,9 +287,16 @@ disable = illegal-waffle-usage, logging-fstring-interpolation, - no-self-use, logging-format-interpolation, useless-suppression, + consider-using-with, + super-with-arguments, + raise-missing-from, + unnecessary-dunder-call, + f-string-without-interpolation, + no-member, + redundant-u-string-prefix, + missing-timeout, [REPORTS] output-format = text @@ -383,6 +391,6 @@ ext-import-graph = int-import-graph = [EXCEPTIONS] -overgeneral-exceptions = Exception +overgeneral-exceptions = builtins.Exception -# c0857a3261a064e2a276a399b5ec398fd1738e0f +# e6b9210c4ebb3c7cfd90813ff591f1a239499995 diff --git a/pylintrc_tweaks b/pylintrc_tweaks index d344316a..8fb3dadb 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -5,6 +5,13 @@ load-plugins = edx_lint.pylint,pylint_django,pylint_celery [MESSAGES CONTROL] disable+ = - no-self-use, logging-format-interpolation, useless-suppression, + consider-using-with, + super-with-arguments, + raise-missing-from, + unnecessary-dunder-call, + f-string-without-interpolation, + no-member, + redundant-u-string-prefix, + missing-timeout, diff --git a/requirements/ci.txt b/requirements/ci.txt index b99fc0b0..25b2a935 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,17 +4,17 @@ # # make upgrade # -distlib==0.3.7 +distlib==0.3.8 # via virtualenv -filelock==3.12.4 +filelock==3.13.1 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via tox -platformdirs==3.11.0 +platformdirs==4.2.0 # via virtualenv -pluggy==1.3.0 +pluggy==1.4.0 # via tox py==1.11.0 # via tox @@ -26,5 +26,5 @@ tox==3.28.0 # via # -c requirements/constraints.txt # -r requirements/ci.in -virtualenv==20.24.5 +virtualenv==20.25.1 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 1e01265f..105c7b5c 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -15,9 +15,6 @@ path==13.1.0 celery<5.0 -# pinning because latest version of pylint is causing lot of failures -edx-lint<=1.5.2 - # latest version causing issues in discovery. algoliasearch-django<4.0.0 algoliasearch<2.0.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 811c6d8b..7888c4ec 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,14 +4,6 @@ # # make upgrade # -aiohttp==3.8.6 - # via - # -r requirements/test.txt - # openai -aiosignal==1.3.1 - # via - # -r requirements/test.txt - # aiohttp algoliasearch==1.20.0 # via # -c requirements/constraints.txt @@ -20,39 +12,47 @@ amqp==2.6.1 # via # -r requirements/test.txt # kombu -asgiref==3.7.2 +annotated-types==0.6.0 + # via + # -r requirements/test.txt + # pydantic +anyio==4.3.0 + # via + # -r requirements/test.txt + # httpx + # openai +asgiref==3.8.0 # via # -r requirements/test.txt # django -astroid==2.3.3 +astroid==3.1.0 # via # pylint # pylint-celery -async-timeout==4.0.3 +attrs==23.2.0 # via # -r requirements/test.txt - # aiohttp -attrs==23.1.0 + # openedx-events +backports-zoneinfo==0.2.1 # via # -r requirements/test.txt - # aiohttp - # openedx-events -beautifulsoup4==4.12.2 + # djangorestframework +beautifulsoup4==4.12.3 # via -r requirements/test.txt billiard==3.6.4.0 # via # -r requirements/test.txt # celery -boto3==1.28.68 +boto3==1.34.67 # via # -r requirements/test.txt # django-ses -botocore==1.31.68 +botocore==1.34.67 # via # -r requirements/test.txt # boto3 # s3transfer -build==1.0.3 +build==1.1.1 # via # -r requirements/pip-tools.txt # pip-tools @@ -60,9 +60,11 @@ celery==4.4.7 # via # -c requirements/constraints.txt # -r requirements/test.txt -certifi==2023.7.22 +certifi==2024.2.2 # via # -r requirements/test.txt + # httpcore + # httpx # requests cffi==1.16.0 # via @@ -70,10 +72,9 @@ cffi==1.16.0 # pynacl chardet==5.2.0 # via diff-cover -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via # -r requirements/test.txt - # aiohttp # requests click==8.1.7 # via @@ -84,24 +85,31 @@ click==8.1.7 # edx-django-utils # edx-lint # pip-tools -click-log==0.3.2 +click-log==0.4.0 # via edx-lint -code-annotations==1.5.0 - # via -r requirements/test.txt -coverage[toml]==7.3.2 +code-annotations==1.7.0 + # via + # -r requirements/test.txt + # edx-lint +coverage[toml]==7.4.4 # via # -r requirements/test.txt - # coverage # pytest-cov -ddt==1.6.0 +ddt==1.7.2 # via -r requirements/test.txt -diff-cover==8.0.0 +diff-cover==8.0.3 # via -r requirements/dev.in -distlib==0.3.7 +dill==0.3.8 + # via pylint +distlib==0.3.8 # via # -r requirements/ci.txt # virtualenv -django==3.2.22 +distro==1.9.0 + # via + # -r requirements/test.txt + # openai +django==3.2.25 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -122,69 +130,76 @@ django-crum==0.7.9 # via # -r requirements/test.txt # edx-django-utils -django-filter==23.3 +django-filter==23.5 # via -r requirements/test.txt -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/test.txt django-object-actions==4.2.0 # via -r requirements/test.txt -django-ses==3.5.0 +django-ses==3.5.2 # via -r requirements/test.txt -django-solo==2.1.0 +django-solo==2.2.0 # via -r requirements/test.txt -django-waffle==4.0.0 +django-waffle==4.1.0 # via # -r requirements/test.txt # edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.0 # via -r requirements/test.txt -edx-django-utils==5.7.0 +edx-django-utils==5.11.0 # via # -r requirements/test.txt # edx-rest-api-client + # openedx-events edx-i18n-tools==1.3.0 # via -r requirements/dev.in -edx-lint==1.5.2 - # via - # -c requirements/constraints.txt - # -r requirements/dev.in +edx-lint==5.3.6 + # via -r requirements/dev.in edx-opaque-keys[django]==2.5.1 # via # -r requirements/test.txt - # edx-opaque-keys # openedx-events edx-rest-api-client==5.6.1 # via -r requirements/test.txt -exceptiongroup==1.1.3 +exceptiongroup==1.2.0 # via # -r requirements/test.txt + # anyio # pytest factory-boy==3.3.0 # via -r requirements/test.txt -faker==19.11.0 +faker==24.3.0 # via # -r requirements/test.txt # factory-boy -fastavro==1.8.4 +fastavro==1.9.4 # via # -r requirements/test.txt # openedx-events -filelock==3.12.4 +filelock==3.13.1 # via # -r requirements/ci.txt # tox # virtualenv -frozenlist==1.4.0 +h11==0.14.0 + # via + # -r requirements/test.txt + # httpcore +httpcore==1.0.4 + # via + # -r requirements/test.txt + # httpx +httpx==0.27.0 # via # -r requirements/test.txt - # aiohttp - # aiosignal -idna==3.4 + # openai +idna==3.6 # via # -r requirements/test.txt + # anyio + # httpx # requests - # yarl -importlib-metadata==6.8.0 +importlib-metadata==7.1.0 # via # -r requirements/pip-tools.txt # build @@ -192,11 +207,11 @@ iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -isort==4.3.21 +isort==5.13.2 # via # -r requirements/dev.in # pylint -jinja2==3.1.2 +jinja2==3.1.3 # via # -r requirements/test.txt # code-annotations @@ -210,32 +225,25 @@ kombu==4.6.11 # via # -r requirements/test.txt # celery -lazy-object-proxy==1.4.3 - # via astroid -lxml==4.9.3 +lxml==5.1.0 # via edx-i18n-tools -markupsafe==2.1.3 +markupsafe==2.1.5 # via # -r requirements/test.txt # jinja2 -mccabe==0.6.1 +mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.txt -multidict==6.0.4 - # via - # -r requirements/test.txt - # aiohttp - # yarl -newrelic==9.1.1 +newrelic==9.7.1 # via # -r requirements/test.txt # edx-django-utils -openai==0.28.1 +openai==1.14.2 # via -r requirements/test.txt -openedx-events==9.0.0 +openedx-events==9.5.2 # via -r requirements/test.txt -packaging==23.2 +packaging==24.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -247,17 +255,18 @@ path==13.1.0 # via # -c requirements/constraints.txt # edx-i18n-tools -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/test.txt # stevedore -pip-tools==7.3.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.txt -platformdirs==3.11.0 +platformdirs==4.2.0 # via # -r requirements/ci.txt + # pylint # virtualenv -pluggy==1.3.0 +pluggy==1.4.0 # via # -r requirements/ci.txt # -r requirements/test.txt @@ -266,7 +275,7 @@ pluggy==1.3.0 # tox polib==1.2.0 # via edx-i18n-tools -psutil==5.9.6 +psutil==5.9.8 # via # -r requirements/test.txt # edx-django-utils @@ -280,15 +289,23 @@ pycparser==2.21 # via # -r requirements/test.txt # cffi +pydantic==2.6.4 + # via + # -r requirements/test.txt + # openai +pydantic-core==2.16.3 + # via + # -r requirements/test.txt + # pydantic pydocstyle==6.3.0 # via -r requirements/dev.in -pygments==2.16.1 +pygments==2.17.2 # via diff-cover pyjwt==2.8.0 # via # -r requirements/test.txt # edx-rest-api-client -pylint==2.4.4 +pylint==3.1.0 # via # edx-lint # pylint-celery @@ -296,7 +313,7 @@ pylint==2.4.4 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.0.11 +pylint-django==2.5.5 # via edx-lint pylint-plugin-utils==0.8.2 # via @@ -314,31 +331,31 @@ pyproject-hooks==1.0.0 # via # -r requirements/pip-tools.txt # build -pytest==7.4.2 + # pip-tools +pytest==8.1.1 # via # -r requirements/test.txt # pytest-cov # pytest-django pytest-cov==4.1.0 # via -r requirements/test.txt -pytest-django==4.5.2 +pytest-django==4.8.0 # via -r requirements/test.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/test.txt # botocore # faker -python-slugify==8.0.1 +python-slugify==8.0.4 # via # -r requirements/test.txt # code-annotations -pytz==2023.3.post1 +pytz==2024.1 # via # -r requirements/test.txt # celery # django # django-ses - # djangorestframework pyyaml==6.0.1 # via # -r requirements/test.txt @@ -350,12 +367,11 @@ requests==2.31.0 # -r requirements/test.txt # algoliasearch # edx-rest-api-client - # openai # responses # slumber -responses==0.23.3 +responses==0.25.0 # via -r requirements/test.txt -s3transfer==0.7.0 +s3transfer==0.10.1 # via # -r requirements/test.txt # boto3 @@ -363,7 +379,6 @@ six==1.16.0 # via # -r requirements/ci.txt # -r requirements/test.txt - # astroid # edx-lint # python-dateutil # tox @@ -371,6 +386,12 @@ slumber==0.7.1 # via # -r requirements/test.txt # edx-rest-api-client +sniffio==1.3.1 + # via + # -r requirements/test.txt + # anyio + # httpx + # openai snowballstemmer==2.2.0 # via pydocstyle soupsieve==2.5 @@ -381,13 +402,13 @@ sqlparse==0.4.4 # via # -r requirements/test.txt # django -stevedore==5.1.0 +stevedore==5.2.0 # via # -r requirements/test.txt # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==7.2.2 +testfixtures==8.1.0 # via -r requirements/test.txt text-unidecode==1.3 # via @@ -401,27 +422,33 @@ tomli==2.0.1 # build # coverage # pip-tools + # pylint # pyproject-hooks # pytest # tox +tomlkit==0.12.4 + # via pylint tox==3.28.0 # via # -c requirements/constraints.txt # -r requirements/ci.txt -tqdm==4.66.1 +tqdm==4.66.2 # via # -r requirements/test.txt # openai -types-pyyaml==6.0.12.12 - # via - # -r requirements/test.txt - # responses -typing-extensions==4.8.0 +typing-extensions==4.10.0 # via # -r requirements/test.txt + # annotated-types + # anyio # asgiref + # astroid # edx-opaque-keys # faker + # openai + # pydantic + # pydantic-core + # pylint urllib3==1.26.18 # via # -r requirements/test.txt @@ -433,21 +460,15 @@ vine==1.3.0 # -r requirements/test.txt # amqp # celery -virtualenv==20.24.5 +virtualenv==20.25.1 # via # -r requirements/ci.txt # tox -wheel==0.41.2 +wheel==0.43.0 # via # -r requirements/pip-tools.txt # pip-tools -wrapt==1.11.2 - # via astroid -yarl==1.9.2 - # via - # -r requirements/test.txt - # aiohttp -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/pip-tools.txt # importlib-metadata diff --git a/requirements/doc.txt b/requirements/doc.txt index 2f33de61..3e84ce7c 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -6,14 +6,6 @@ # accessible-pygments==0.0.4 # via pydata-sphinx-theme -aiohttp==3.8.6 - # via - # -r requirements/test.txt - # openai -aiosignal==1.3.1 - # via - # -r requirements/test.txt - # aiohttp alabaster==0.7.13 # via sphinx algoliasearch==1.20.0 @@ -24,24 +16,32 @@ amqp==2.6.1 # via # -r requirements/test.txt # kombu -asgiref==3.7.2 +annotated-types==0.6.0 # via # -r requirements/test.txt - # django -async-timeout==4.0.3 + # pydantic +anyio==4.3.0 # via # -r requirements/test.txt - # aiohttp -attrs==23.1.0 + # httpx + # openai +asgiref==3.8.0 + # via + # -r requirements/test.txt + # django +attrs==23.2.0 # via # -r requirements/test.txt - # aiohttp # openedx-events -babel==2.13.0 +babel==2.14.0 # via # pydata-sphinx-theme # sphinx -beautifulsoup4==4.12.2 +backports-zoneinfo==0.2.1 + # via + # -r requirements/test.txt + # djangorestframework +beautifulsoup4==4.12.3 # via # -r requirements/test.txt # pydata-sphinx-theme @@ -49,52 +49,53 @@ billiard==3.6.4.0 # via # -r requirements/test.txt # celery -boto3==1.28.68 +boto3==1.34.67 # via # -r requirements/test.txt # django-ses -botocore==1.31.68 +botocore==1.34.67 # via # -r requirements/test.txt # boto3 # s3transfer -build==1.0.3 +build==1.1.1 # via -r requirements/doc.in celery==4.4.7 # via # -c requirements/constraints.txt # -r requirements/test.txt -certifi==2023.7.22 +certifi==2024.2.2 # via # -r requirements/test.txt + # httpcore + # httpx # requests cffi==1.16.0 # via # -r requirements/test.txt - # cryptography # pynacl -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via # -r requirements/test.txt - # aiohttp # requests click==8.1.7 # via # -r requirements/test.txt # code-annotations # edx-django-utils -code-annotations==1.5.0 +code-annotations==1.7.0 # via -r requirements/test.txt -coverage[toml]==7.3.2 +coverage[toml]==7.4.4 # via # -r requirements/test.txt - # coverage # pytest-cov -cryptography==41.0.4 - # via secretstorage -ddt==1.6.0 +ddt==1.7.2 # via -r requirements/test.txt -django==3.2.22 +distro==1.9.0 + # via + # -r requirements/test.txt + # openai +django==3.2.25 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -114,21 +115,21 @@ django-crum==0.7.9 # via # -r requirements/test.txt # edx-django-utils -django-filter==23.3 +django-filter==23.5 # via -r requirements/test.txt -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/test.txt django-object-actions==4.2.0 # via -r requirements/test.txt -django-ses==3.5.0 +django-ses==3.5.2 # via -r requirements/test.txt -django-solo==2.1.0 +django-solo==2.2.0 # via -r requirements/test.txt -django-waffle==4.0.0 +django-waffle==4.1.0 # via # -r requirements/test.txt # edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.0 # via -r requirements/test.txt doc8==1.1.1 # via -r requirements/doc.in @@ -139,62 +140,67 @@ docutils==0.19 # readme-renderer # restructuredtext-lint # sphinx -edx-django-utils==5.7.0 +edx-django-utils==5.11.0 # via # -r requirements/test.txt # edx-rest-api-client + # openedx-events edx-opaque-keys[django]==2.5.1 # via # -r requirements/test.txt - # edx-opaque-keys # openedx-events edx-rest-api-client==5.6.1 # via -r requirements/test.txt -exceptiongroup==1.1.3 +exceptiongroup==1.2.0 # via # -r requirements/test.txt + # anyio # pytest factory-boy==3.3.0 # via -r requirements/test.txt -faker==19.11.0 +faker==24.3.0 # via # -r requirements/test.txt # factory-boy -fastavro==1.8.4 +fastavro==1.9.4 # via # -r requirements/test.txt # openedx-events -frozenlist==1.4.0 +h11==0.14.0 + # via + # -r requirements/test.txt + # httpcore +httpcore==1.0.4 # via # -r requirements/test.txt - # aiohttp - # aiosignal -idna==3.4 + # httpx +httpx==0.27.0 # via # -r requirements/test.txt + # openai +idna==3.6 + # via + # -r requirements/test.txt + # anyio + # httpx # requests - # yarl imagesize==1.4.1 # via sphinx -importlib-metadata==6.8.0 +importlib-metadata==7.1.0 # via # build # keyring # sphinx # twine -importlib-resources==6.1.0 +importlib-resources==6.3.2 # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -jaraco-classes==3.3.0 +jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage -jinja2==3.1.2 +jinja2==3.1.3 # via # -r requirements/test.txt # code-annotations @@ -204,7 +210,7 @@ jmespath==1.0.1 # -r requirements/test.txt # boto3 # botocore -keyring==24.2.0 +keyring==24.3.1 # via twine kombu==4.6.11 # via @@ -212,7 +218,7 @@ kombu==4.6.11 # celery markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==2.1.5 # via # -r requirements/test.txt # jinja2 @@ -220,41 +226,36 @@ mdurl==0.1.2 # via markdown-it-py mock==5.1.0 # via -r requirements/test.txt -more-itertools==10.1.0 +more-itertools==10.2.0 # via jaraco-classes -multidict==6.0.4 - # via - # -r requirements/test.txt - # aiohttp - # yarl -newrelic==9.1.1 +newrelic==9.7.1 # via # -r requirements/test.txt # edx-django-utils -nh3==0.2.14 +nh3==0.2.15 # via readme-renderer -openai==0.28.1 +openai==1.14.2 # via -r requirements/test.txt -openedx-events==9.0.0 +openedx-events==9.5.2 # via -r requirements/test.txt -packaging==23.2 +packaging==24.0 # via # -r requirements/test.txt # build # pydata-sphinx-theme # pytest # sphinx -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/test.txt # stevedore -pkginfo==1.9.6 +pkginfo==1.10.0 # via twine -pluggy==1.3.0 +pluggy==1.4.0 # via # -r requirements/test.txt # pytest -psutil==5.9.6 +psutil==5.9.8 # via # -r requirements/test.txt # edx-django-utils @@ -262,9 +263,17 @@ pycparser==2.21 # via # -r requirements/test.txt # cffi -pydata-sphinx-theme==0.14.1 +pydantic==2.6.4 + # via + # -r requirements/test.txt + # openai +pydantic-core==2.16.3 + # via + # -r requirements/test.txt + # pydantic +pydata-sphinx-theme==0.14.4 # via sphinx-book-theme -pygments==2.16.1 +pygments==2.17.2 # via # accessible-pygments # doc8 @@ -286,45 +295,43 @@ pynacl==1.5.0 # edx-django-utils pyproject-hooks==1.0.0 # via build -pytest==7.4.2 +pytest==8.1.1 # via # -r requirements/test.txt # pytest-cov # pytest-django pytest-cov==4.1.0 # via -r requirements/test.txt -pytest-django==4.5.2 +pytest-django==4.8.0 # via -r requirements/test.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/test.txt # botocore # faker -python-slugify==8.0.1 +python-slugify==8.0.4 # via # -r requirements/test.txt # code-annotations -pytz==2023.3.post1 +pytz==2024.1 # via # -r requirements/test.txt # babel # celery # django # django-ses - # djangorestframework pyyaml==6.0.1 # via # -r requirements/test.txt # code-annotations # responses -readme-renderer==42.0 +readme-renderer==43.0 # via twine requests==2.31.0 # via # -r requirements/test.txt # algoliasearch # edx-rest-api-client - # openai # requests-toolbelt # responses # slumber @@ -332,20 +339,18 @@ requests==2.31.0 # twine requests-toolbelt==1.0.0 # via twine -responses==0.23.3 +responses==0.25.0 # via -r requirements/test.txt restructuredtext-lint==1.4.0 # via doc8 rfc3986==2.0.0 # via twine -rich==13.6.0 +rich==13.7.1 # via twine -s3transfer==0.7.0 +s3transfer==0.10.1 # via # -r requirements/test.txt # boto3 -secretstorage==3.3.3 - # via keyring six==1.16.0 # via # -r requirements/test.txt @@ -354,6 +359,12 @@ slumber==0.7.1 # via # -r requirements/test.txt # edx-rest-api-client +sniffio==1.3.1 + # via + # -r requirements/test.txt + # anyio + # httpx + # openai snowballstemmer==2.2.0 # via sphinx soupsieve==2.5 @@ -393,14 +404,14 @@ sqlparse==0.4.4 # via # -r requirements/test.txt # django -stevedore==5.1.0 +stevedore==5.2.0 # via # -r requirements/test.txt # code-annotations # doc8 # edx-django-utils # edx-opaque-keys -testfixtures==7.2.2 +testfixtures==8.1.0 # via -r requirements/test.txt text-unidecode==1.3 # via @@ -414,22 +425,23 @@ tomli==2.0.1 # doc8 # pyproject-hooks # pytest -tqdm==4.66.1 +tqdm==4.66.2 # via # -r requirements/test.txt # openai -twine==4.0.2 +twine==5.0.0 # via -r requirements/doc.in -types-pyyaml==6.0.12.12 - # via - # -r requirements/test.txt - # responses -typing-extensions==4.8.0 +typing-extensions==4.10.0 # via # -r requirements/test.txt + # annotated-types + # anyio # asgiref # edx-opaque-keys # faker + # openai + # pydantic + # pydantic-core # pydata-sphinx-theme # rich urllib3==1.26.18 @@ -444,11 +456,7 @@ vine==1.3.0 # -r requirements/test.txt # amqp # celery -yarl==1.9.2 - # via - # -r requirements/test.txt - # aiohttp -zipp==3.17.0 +zipp==3.18.1 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 50d35f22..8931dc2e 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,26 +4,28 @@ # # make upgrade # -build==1.0.3 +build==1.1.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==6.8.0 +importlib-metadata==7.1.0 # via build -packaging==23.2 +packaging==24.0 # via build -pip-tools==7.3.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 - # via build + # via + # build + # pip-tools tomli==2.0.1 # via # build # pip-tools # pyproject-hooks -wheel==0.41.2 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 0c788d61..cf449024 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.41.2 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.3.1 +pip==24.0 # via -r requirements/pip.in -setuptools==68.2.2 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/requirements/test.txt b/requirements/test.txt index 38b53f50..63431924 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,31 +4,31 @@ # # make upgrade # -aiohttp==3.8.6 - # via openai -aiosignal==1.3.1 - # via aiohttp algoliasearch==1.20.0 # via # -c requirements/constraints.txt # -r requirements/base.in amqp==2.6.1 # via kombu -asgiref==3.7.2 - # via django -async-timeout==4.0.3 - # via aiohttp -attrs==23.1.0 +annotated-types==0.6.0 + # via pydantic +anyio==4.3.0 # via - # aiohttp - # openedx-events -beautifulsoup4==4.12.2 + # httpx + # openai +asgiref==3.8.0 + # via django +attrs==23.2.0 + # via openedx-events +backports-zoneinfo==0.2.1 + # via djangorestframework +beautifulsoup4==4.12.3 # via -r requirements/base.in billiard==3.6.4.0 # via celery -boto3==1.28.68 +boto3==1.34.67 # via django-ses -botocore==1.31.68 +botocore==1.34.67 # via # boto3 # s3transfer @@ -36,26 +36,27 @@ celery==4.4.7 # via # -c requirements/constraints.txt # -r requirements/base.in -certifi==2023.7.22 - # via requests -cffi==1.16.0 - # via pynacl -charset-normalizer==3.3.1 +certifi==2024.2.2 # via - # aiohttp + # httpcore + # httpx # requests +cffi==1.16.0 + # via pynacl +charset-normalizer==3.3.2 + # via requests click==8.1.7 # via # code-annotations # edx-django-utils -code-annotations==1.5.0 +code-annotations==1.7.0 # via -r requirements/test.in -coverage[toml]==7.3.2 - # via - # coverage - # pytest-cov -ddt==1.6.0 +coverage[toml]==7.4.4 + # via pytest-cov +ddt==1.7.2 # via -r requirements/test.in +distro==1.9.0 + # via openai # via # -c requirements/constraints.txt # -r requirements/base.in @@ -73,51 +74,57 @@ django-choices==2.0.0 # via -r requirements/base.in django-crum==0.7.9 # via edx-django-utils -django-filter==23.3 +django-filter==23.5 # via -r requirements/base.in -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.in django-object-actions==4.2.0 # via -r requirements/base.in -django-ses==3.5.0 +django-ses==3.5.2 # via -r requirements/base.in -django-solo==2.1.0 +django-solo==2.2.0 # via -r requirements/base.in -django-waffle==4.0.0 +django-waffle==4.1.0 # via edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.0 # via -r requirements/base.in -edx-django-utils==5.7.0 +edx-django-utils==5.11.0 # via # -r requirements/base.in # edx-rest-api-client + # openedx-events edx-opaque-keys[django]==2.5.1 # via # -r requirements/base.in # openedx-events edx-rest-api-client==5.6.1 # via -r requirements/base.in -exceptiongroup==1.1.3 - # via pytest +exceptiongroup==1.2.0 + # via + # anyio + # pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==19.11.0 +faker==24.3.0 # via # -r requirements/test.in # factory-boy -fastavro==1.8.4 +fastavro==1.9.4 # via openedx-events -frozenlist==1.4.0 - # via - # aiohttp - # aiosignal -idna==3.4 +h11==0.14.0 + # via httpcore +httpcore==1.0.4 + # via httpx +httpx==0.27.0 + # via openai +idna==3.6 # via + # anyio + # httpx # requests - # yarl iniconfig==2.0.0 # via pytest -jinja2==3.1.2 +jinja2==3.1.3 # via code-annotations jmespath==1.0.1 # via @@ -125,57 +132,56 @@ jmespath==1.0.1 # botocore kombu==4.6.11 # via celery -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 mock==5.1.0 # via -r requirements/test.in -multidict==6.0.4 - # via - # aiohttp - # yarl -newrelic==9.1.1 +newrelic==9.7.1 # via edx-django-utils -openai==0.28.1 +openai==1.14.2 # via -r requirements/base.in -openedx-events==9.0.0 +openedx-events==9.5.2 # via -r requirements/base.in -packaging==23.2 +packaging==24.0 # via pytest -pbr==5.11.1 +pbr==6.0.0 # via stevedore -pluggy==1.3.0 +pluggy==1.4.0 # via pytest -psutil==5.9.6 +psutil==5.9.8 # via edx-django-utils pycparser==2.21 # via cffi +pydantic==2.6.4 + # via openai +pydantic-core==2.16.3 + # via pydantic pyjwt==2.8.0 # via edx-rest-api-client pymongo==3.13.0 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils -pytest==7.4.2 +pytest==8.1.1 # via # pytest-cov # pytest-django pytest-cov==4.1.0 # via -r requirements/test.in -pytest-django==4.5.2 +pytest-django==4.8.0 # via -r requirements/test.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # botocore # faker -python-slugify==8.0.1 +python-slugify==8.0.4 # via code-annotations -pytz==2023.3.post1 +pytz==2024.1 # via # -r requirements/base.in # celery # django # django-ses - # djangorestframework pyyaml==6.0.1 # via # code-annotations @@ -184,27 +190,31 @@ requests==2.31.0 # via # algoliasearch # edx-rest-api-client - # openai # responses # slumber -responses==0.23.3 +responses==0.25.0 # via -r requirements/test.in -s3transfer==0.7.0 +s3transfer==0.10.1 # via boto3 six==1.16.0 # via python-dateutil slumber==0.7.1 # via edx-rest-api-client +sniffio==1.3.1 + # via + # anyio + # httpx + # openai soupsieve==2.5 # via beautifulsoup4 sqlparse==0.4.4 # via django -stevedore==5.1.0 +stevedore==5.2.0 # via # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==7.2.2 +testfixtures==8.1.0 # via -r requirements/test.in text-unidecode==1.3 # via python-slugify @@ -212,15 +222,18 @@ tomli==2.0.1 # via # coverage # pytest -tqdm==4.66.1 +tqdm==4.66.2 # via openai -types-pyyaml==6.0.12.12 - # via responses -typing-extensions==4.8.0 +typing-extensions==4.10.0 # via + # annotated-types + # anyio # asgiref # edx-opaque-keys # faker + # openai + # pydantic + # pydantic-core urllib3==1.26.18 # via # botocore @@ -230,5 +243,3 @@ vine==1.3.0 # via # amqp # celery -yarl==1.9.2 - # via aiohttp diff --git a/taxonomy/admin.py b/taxonomy/admin.py index 140fe3b9..8621b4e4 100644 --- a/taxonomy/admin.py +++ b/taxonomy/admin.py @@ -29,10 +29,10 @@ SkillCategory, SkillsQuiz, SkillSubCategory, + SkillValidationConfiguration, Translation, XBlockSkillData, XBlockSkills, - SkillValidationConfiguration ) from taxonomy.views import JobSkillsView diff --git a/taxonomy/algolia/serializers.py b/taxonomy/algolia/serializers.py index a70b1774..05a0e046 100644 --- a/taxonomy/algolia/serializers.py +++ b/taxonomy/algolia/serializers.py @@ -9,7 +9,7 @@ from taxonomy.algolia.constants import EMBEDDED_OBJECT_LENGTH_CAP from taxonomy.constants import JOB_SOURCE_COURSE_SKILL, JOB_SOURCE_INDUSTRY -from taxonomy.models import Job, JobPostings, JobSkills, IndustryJobSkill, B2CJobAllowList +from taxonomy.models import B2CJobAllowList, IndustryJobSkill, Job, JobPostings, JobSkills class JobPostingSerializer(serializers.ModelSerializer): diff --git a/taxonomy/api/filters.py b/taxonomy/api/filters.py index 7dc1cba1..0919134c 100644 --- a/taxonomy/api/filters.py +++ b/taxonomy/api/filters.py @@ -2,9 +2,10 @@ Filters for the Taxonomy connector APIs. """ -from django.db.models import Prefetch from django_filters import rest_framework as filters +from django.db.models import Prefetch + from taxonomy.models import Skill, XBlockSkills diff --git a/taxonomy/choices.py b/taxonomy/choices.py index ff2de7f9..7117736c 100644 --- a/taxonomy/choices.py +++ b/taxonomy/choices.py @@ -4,7 +4,6 @@ from djchoices import ChoiceItem, DjangoChoices -# pylint: disable=no-init class UserGoal(DjangoChoices): """ User goal choices, this will be used in skills quiz. diff --git a/taxonomy/constants.py b/taxonomy/constants.py index 5aead790..fe03b0d2 100644 --- a/taxonomy/constants.py +++ b/taxonomy/constants.py @@ -6,6 +6,7 @@ from datetime import date from dateutil.relativedelta import relativedelta + from django.conf import settings diff --git a/taxonomy/emsi/client.py b/taxonomy/emsi/client.py index 6ebeba3b..a8a2d1ab 100644 --- a/taxonomy/emsi/client.py +++ b/taxonomy/emsi/client.py @@ -5,7 +5,7 @@ import logging from functools import wraps -from time import time, sleep +from time import sleep, time from urllib.parse import urljoin import requests @@ -16,8 +16,8 @@ from django.conf import settings -from taxonomy.exceptions import TaxonomyAPIError from taxonomy.constants import EMSI_API_RATE_LIMIT_PER_SEC +from taxonomy.exceptions import TaxonomyAPIError LOGGER = logging.getLogger(__name__) diff --git a/taxonomy/management/commands/fetch_skill_details.py b/taxonomy/management/commands/fetch_skill_details.py index 67ed431a..499d62c8 100644 --- a/taxonomy/management/commands/fetch_skill_details.py +++ b/taxonomy/management/commands/fetch_skill_details.py @@ -6,15 +6,14 @@ from edx_django_utils.db import chunked_queryset -from django.db.models import Q from django.core.management.base import BaseCommand, CommandError +from django.db.models import Q from taxonomy.emsi.client import EMSISkillsApiClient from taxonomy.emsi.parsers.skill_parsers import SkillDataParser from taxonomy.exceptions import TaxonomyAPIError from taxonomy.models import Skill, SkillCategory, SkillSubCategory - LOGGER = logging.getLogger(__name__) diff --git a/taxonomy/management/commands/refresh_job_skills.py b/taxonomy/management/commands/refresh_job_skills.py index 094027f2..7339dc75 100644 --- a/taxonomy/management/commands/refresh_job_skills.py +++ b/taxonomy/management/commands/refresh_job_skills.py @@ -12,7 +12,7 @@ from taxonomy.emsi.client import EMSIJobsApiClient from taxonomy.enums import RankingFacet from taxonomy.exceptions import TaxonomyAPIError -from taxonomy.models import Job, JobSkills, Skill, IndustryJobSkill, Industry +from taxonomy.models import Industry, IndustryJobSkill, Job, JobSkills, Skill LOGGER = logging.getLogger(__name__) diff --git a/taxonomy/management/commands/refresh_program_skills.py b/taxonomy/management/commands/refresh_program_skills.py index 2a6599a0..89f711b4 100644 --- a/taxonomy/management/commands/refresh_program_skills.py +++ b/taxonomy/management/commands/refresh_program_skills.py @@ -9,7 +9,7 @@ from taxonomy import utils from taxonomy.choices import ProductTypes -from taxonomy.exceptions import ProgramMetadataNotFoundError, InvalidCommandOptionsError +from taxonomy.exceptions import InvalidCommandOptionsError, ProgramMetadataNotFoundError from taxonomy.models import RefreshProgramSkillsConfig from taxonomy.providers.utils import get_program_metadata_provider diff --git a/taxonomy/management/commands/refresh_xblock_skills.py b/taxonomy/management/commands/refresh_xblock_skills.py index 755d8d08..a6565fdd 100644 --- a/taxonomy/management/commands/refresh_xblock_skills.py +++ b/taxonomy/management/commands/refresh_xblock_skills.py @@ -5,12 +5,13 @@ import logging -from django.core.management.base import BaseCommand -from django.conf import settings -from django.utils.translation import gettext as _ from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey, UsageKey +from django.conf import settings +from django.core.management.base import BaseCommand +from django.utils.translation import gettext as _ + from taxonomy import utils from taxonomy.choices import ProductTypes from taxonomy.exceptions import InvalidCommandOptionsError, XBlockMetadataNotFoundError diff --git a/taxonomy/migrations/0018_auto_20220613_0249.py b/taxonomy/migrations/0018_auto_20220613_0249.py index de1cdd7b..694d56c5 100644 --- a/taxonomy/migrations/0018_auto_20220613_0249.py +++ b/taxonomy/migrations/0018_auto_20220613_0249.py @@ -1,8 +1,9 @@ # Generated by Django 3.2.12 on 2022-06-13 02:49 -from django.db import migrations, models import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields diff --git a/taxonomy/migrations/0020_programskill.py b/taxonomy/migrations/0020_programskill.py index 9881b855..fa59a751 100644 --- a/taxonomy/migrations/0020_programskill.py +++ b/taxonomy/migrations/0020_programskill.py @@ -1,10 +1,12 @@ # Generated by Django 3.2.12 on 2022-08-01 11:50 -from django.db import migrations, models +import uuid + import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields -import uuid class Migration(migrations.Migration): diff --git a/taxonomy/migrations/0021_recreate_programskill.py b/taxonomy/migrations/0021_recreate_programskill.py index 60da5305..04908336 100644 --- a/taxonomy/migrations/0021_recreate_programskill.py +++ b/taxonomy/migrations/0021_recreate_programskill.py @@ -1,10 +1,12 @@ # Generated by Django 3.2.12 on 2022-08-12 11:50 -from django.db import migrations, models +import uuid + import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields -import uuid class Migration(migrations.Migration): diff --git a/taxonomy/migrations/0022_auto_20220825_0206.py b/taxonomy/migrations/0022_auto_20220825_0206.py index d693c451..cabd5f9d 100644 --- a/taxonomy/migrations/0022_auto_20220825_0206.py +++ b/taxonomy/migrations/0022_auto_20220825_0206.py @@ -1,10 +1,12 @@ # Generated by Django 3.2.15 on 2022-08-25 02:06 -from django.db import migrations, models +import uuid + import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields -import uuid class Migration(migrations.Migration): diff --git a/taxonomy/migrations/0025_industry.py b/taxonomy/migrations/0025_industry.py index 94d0a4a5..514e2d80 100644 --- a/taxonomy/migrations/0025_industry.py +++ b/taxonomy/migrations/0025_industry.py @@ -1,6 +1,7 @@ # Generated by Django 3.2.15 on 2022-10-17 06:41 from django.db import migrations, models + from taxonomy.constants import NAICS2_CODES diff --git a/taxonomy/migrations/0026_auto_20221101_0936.py b/taxonomy/migrations/0026_auto_20221101_0936.py index 131688fe..355d6cd2 100644 --- a/taxonomy/migrations/0026_auto_20221101_0936.py +++ b/taxonomy/migrations/0026_auto_20221101_0936.py @@ -1,7 +1,7 @@ # Generated by Django 3.2.16 on 2022-11-01 09:36 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/taxonomy/migrations/0027_auto_20221117_0746.py b/taxonomy/migrations/0027_auto_20221117_0746.py index b7c2ea75..52b8f53c 100644 --- a/taxonomy/migrations/0027_auto_20221117_0746.py +++ b/taxonomy/migrations/0027_auto_20221117_0746.py @@ -1,8 +1,9 @@ # Generated by Django 3.2.16 on 2022-11-17 07:46 -from django.db import migrations, models import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields diff --git a/taxonomy/migrations/0028_xblock_skills.py b/taxonomy/migrations/0028_xblock_skills.py index e8b72e80..cf170186 100644 --- a/taxonomy/migrations/0028_xblock_skills.py +++ b/taxonomy/migrations/0028_xblock_skills.py @@ -1,8 +1,9 @@ # Generated by Django 3.2.16 on 2022-11-28 01:41 -from django.db import migrations, models import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields diff --git a/taxonomy/migrations/0031_auto_20230417_1557.py b/taxonomy/migrations/0031_auto_20230417_1557.py index 2df34b65..a3e0ba60 100644 --- a/taxonomy/migrations/0031_auto_20230417_1557.py +++ b/taxonomy/migrations/0031_auto_20230417_1557.py @@ -1,8 +1,9 @@ # Generated by Django 3.2.18 on 2023-04-17 15:57 -from django.db import migrations, models import django.db.models.deletion import django.utils.timezone +from django.db import migrations, models + import model_utils.fields diff --git a/taxonomy/migrations/0032_auto_20230508_1428.py b/taxonomy/migrations/0032_auto_20230508_1428.py index dcf34961..47b32046 100644 --- a/taxonomy/migrations/0032_auto_20230508_1428.py +++ b/taxonomy/migrations/0032_auto_20230508_1428.py @@ -1,7 +1,8 @@ # Generated by Django 3.2.19 on 2023-05-08 14:28 -from django.db import migrations, models import django.utils.timezone +from django.db import migrations, models + import model_utils.fields diff --git a/taxonomy/migrations/0033_b2c_allowlist.py b/taxonomy/migrations/0033_b2c_allowlist.py index 8f436538..b848a56c 100644 --- a/taxonomy/migrations/0033_b2c_allowlist.py +++ b/taxonomy/migrations/0033_b2c_allowlist.py @@ -1,7 +1,7 @@ # Generated by Django 3.2.18 on 2023-06-15 16:19 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/taxonomy/migrations/0036_auto_20240325_1631.py b/taxonomy/migrations/0036_auto_20240325_1631.py index 1173a6ba..c56c8e62 100644 --- a/taxonomy/migrations/0036_auto_20240325_1631.py +++ b/taxonomy/migrations/0036_auto_20240325_1631.py @@ -1,7 +1,8 @@ # Generated by Django 3.2.22 on 2024-03-25 16:31 -from django.db import migrations, models import django.utils.timezone +from django.db import migrations, models + import model_utils.fields diff --git a/taxonomy/tasks.py b/taxonomy/tasks.py index a8e8dbb5..ba2c24f8 100644 --- a/taxonomy/tasks.py +++ b/taxonomy/tasks.py @@ -12,7 +12,7 @@ from taxonomy.providers.utils import ( get_course_metadata_provider, get_program_metadata_provider, - get_xblock_metadata_provider + get_xblock_metadata_provider, ) LOGGER = logging.getLogger(__name__) diff --git a/taxonomy/validators/xblock_metadata.py b/taxonomy/validators/xblock_metadata.py index a84ec58f..6bb054c8 100644 --- a/taxonomy/validators/xblock_metadata.py +++ b/taxonomy/validators/xblock_metadata.py @@ -4,8 +4,8 @@ All host platform must run this validator to make sure providers are working as expected. """ -from taxonomy.providers.utils import get_xblock_metadata_provider from taxonomy.providers import XBlockContent +from taxonomy.providers.utils import get_xblock_metadata_provider class XBlockMetadataProviderValidator: diff --git a/tests/algolia/test_serializers.py b/tests/algolia/test_serializers.py index ba151321..88f75478 100644 --- a/tests/algolia/test_serializers.py +++ b/tests/algolia/test_serializers.py @@ -1,10 +1,11 @@ """ Tests for algolia serializers. """ -from django.test import TestCase import mock from pytest import mark +from django.test import TestCase + from taxonomy.algolia.serializers import JobSerializer from taxonomy.models import Job from test_utils import factories diff --git a/tests/emsi/test_client.py b/tests/emsi/test_client.py index 327c2b15..caf22472 100644 --- a/tests/emsi/test_client.py +++ b/tests/emsi/test_client.py @@ -6,9 +6,9 @@ import logging from time import time from unittest import mock -from faker import Faker import responses +from faker import Faker from pytest import raises from requests import HTTPError from testfixtures import LogCapture diff --git a/tests/management/test_fetch_skill_details.py b/tests/management/test_fetch_skill_details.py index adcdd0c2..227192e3 100644 --- a/tests/management/test_fetch_skill_details.py +++ b/tests/management/test_fetch_skill_details.py @@ -3,19 +3,17 @@ Tests for the django management command `fetch_skill_details`. """ import responses -from pytest import mark, raises from faker import Faker +from pytest import mark, raises from django.core.management import call_command from django.core.management.base import CommandError -from test_utils import factories -from test_utils.testcase import TaxonomyTestCase - -from taxonomy.models import Skill, SkillCategory, SkillSubCategory from taxonomy.emsi.client import EMSISkillsApiClient from taxonomy.emsi.parsers.skill_parsers import INVALID_NAMES - +from taxonomy.models import Skill, SkillCategory, SkillSubCategory +from test_utils import factories +from test_utils.testcase import TaxonomyTestCase FAKER = Faker() diff --git a/tests/management/test_refresh_job_skills.py b/tests/management/test_refresh_job_skills.py index 031c036d..6ba75335 100644 --- a/tests/management/test_refresh_job_skills.py +++ b/tests/management/test_refresh_job_skills.py @@ -16,7 +16,7 @@ from taxonomy.enums import RankingFacet from taxonomy.exceptions import TaxonomyAPIError -from taxonomy.models import Job, JobSkills, Skill, Industry, IndustryJobSkill +from taxonomy.models import Industry, IndustryJobSkill, Job, JobSkills, Skill from test_utils.factories import SkillFactory from test_utils.sample_responses.jobs import JOBS, MISSING_SIGNIFICANCE_KEY_JOBS from test_utils.testcase import TaxonomyTestCase diff --git a/tests/management/test_refresh_program_skills.py b/tests/management/test_refresh_program_skills.py index ad857fcb..081ac8f8 100644 --- a/tests/management/test_refresh_program_skills.py +++ b/tests/management/test_refresh_program_skills.py @@ -13,7 +13,7 @@ from django.core.management import call_command -from taxonomy.exceptions import ProgramMetadataNotFoundError, InvalidCommandOptionsError, TaxonomyAPIError +from taxonomy.exceptions import InvalidCommandOptionsError, ProgramMetadataNotFoundError, TaxonomyAPIError from taxonomy.models import ProgramSkill, RefreshProgramSkillsConfig, Skill from test_utils.mocks import MockProgram, mock_as_dict from test_utils.providers import DiscoveryProgramMetadataProvider diff --git a/tests/management/test_refresh_xblock_skills.py b/tests/management/test_refresh_xblock_skills.py index f54b69ea..5c099285 100644 --- a/tests/management/test_refresh_xblock_skills.py +++ b/tests/management/test_refresh_xblock_skills.py @@ -16,10 +16,10 @@ from taxonomy.exceptions import InvalidCommandOptionsError, TaxonomyAPIError, XBlockMetadataNotFoundError from taxonomy.models import ( CourseRunXBlockSkillsTracker, - Skill, RefreshXBlockSkillsConfig, + Skill, XBlockSkillData, - XBlockSkills + XBlockSkills, ) from test_utils.mocks import MockCourseRun, MockXBlock, mock_as_dict from test_utils.providers import DiscoveryCourseRunMetadataProvider, DiscoveryXBlockMetadataProvider diff --git a/tests/test_signals.py b/tests/test_signals.py index 485593d0..60f73f01 100644 --- a/tests/test_signals.py +++ b/tests/test_signals.py @@ -5,19 +5,15 @@ import unittest import mock -from pytest import mark -from testfixtures import LogCapture from openedx_events.content_authoring.data import DuplicatedXBlockData, XBlockData from openedx_events.content_authoring.signals import XBLOCK_DELETED, XBLOCK_DUPLICATED, XBLOCK_PUBLISHED from openedx_events.learning.data import XBlockSkillVerificationData from openedx_events.learning.signals import XBLOCK_SKILL_VERIFIED +from pytest import mark +from testfixtures import LogCapture -from taxonomy.models import CourseSkills, Skill, ProgramSkill, XBlockSkillData, XBlockSkills -from taxonomy.signals.signals import ( - UPDATE_COURSE_SKILLS, - UPDATE_PROGRAM_SKILLS, - UPDATE_XBLOCK_SKILLS, -) +from taxonomy.models import CourseSkills, ProgramSkill, Skill, XBlockSkillData, XBlockSkills +from taxonomy.signals.signals import UPDATE_COURSE_SKILLS, UPDATE_PROGRAM_SKILLS, UPDATE_XBLOCK_SKILLS from test_utils.mocks import MockCourse, MockProgram, MockXBlock from test_utils.providers import ( DiscoveryCourseMetadataProvider, diff --git a/tests/test_tasks.py b/tests/test_tasks.py index 04edba27..465504e4 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -8,7 +8,7 @@ from pytest import mark from testfixtures import LogCapture -from taxonomy.models import CourseSkills, Skill, ProgramSkill, XBlockSkills +from taxonomy.models import CourseSkills, ProgramSkill, Skill, XBlockSkills from taxonomy.tasks import update_course_skills, update_program_skills, update_xblock_skills from test_utils.mocks import MockCourse, MockProgram, MockXBlock from test_utils.providers import ( diff --git a/tox.ini b/tox.ini index 981aad49..6177d9a7 100644 --- a/tox.ini +++ b/tox.ini @@ -51,6 +51,8 @@ commands = pytest {posargs} [testenv:quality] +setenv = + DJANGO_SETTINGS_MODULE = test_settings allowlist_externals = make rm