From b00fae0aba3243fcdc2239ac346a1aa4576a9086 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Thu, 31 Oct 2024 17:57:31 -0500 Subject: [PATCH 1/9] feat: add nelpUser admin This admin user adds: - national_id from extra_info instance in list_display - search by national_id chore --- eox_nelp/admin/__init__.py | 1 + eox_nelp/admin/user.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 eox_nelp/admin/user.py diff --git a/eox_nelp/admin/__init__.py b/eox_nelp/admin/__init__.py index af26673b..d3eadb21 100644 --- a/eox_nelp/admin/__init__.py +++ b/eox_nelp/admin/__init__.py @@ -4,6 +4,7 @@ from eox_nelp.admin.certificates import * # noqa: F401 from eox_nelp.admin.course_creators import * # noqa: F401 from eox_nelp.admin.student import * # noqa: F401 +from eox_nelp.admin.user import * # noqa: F401 from eox_nelp.course_experience.admin import * # noqa: F401 from eox_nelp.notifications.admin import * # noqa: F401 from eox_nelp.payment_notifications.admin import * # noqa: F401 diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py new file mode 100644 index 00000000..31aa3ce2 --- /dev/null +++ b/eox_nelp/admin/user.py @@ -0,0 +1,26 @@ +from django.contrib.auth import get_user_model +from eox_support.admin.user import SupportUserAdmin + +from eox_nelp.admin.register_admin_model import register_admin_model as register + +User = get_user_model() + + +class NelpUserAdmin(SupportUserAdmin): + """EoxNelp User admin class.""" + + list_display = ('user_national_id',) + SupportUserAdmin.list_display + search_fields = SupportUserAdmin.search_fields + ('extrainfo__national_id',) + fieldsets = SupportUserAdmin.fieldsets + ( + ('Extra info Fields', {'fields': ('user_national_id',)}), + ) + readonly_fields = SupportUserAdmin.readonly_fields + ('user_national_id',) + def user_national_id(self, instance): + """Return national_id associated with the user extra_info instance.""" + if getattr(instance, "extrainfo", None): + return instance.extrainfo.national_id + + return None + + +register(User, NelpUserAdmin) From f5ef765531774781e2a3f737372ebc974a21802e Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Thu, 31 Oct 2024 18:11:24 -0500 Subject: [PATCH 2/9] feat: add eox-support requirement --- requirements/base.in | 1 + requirements/base.txt | 205 ++++++++++++++++++++++++++++---------- requirements/test.txt | 225 ++++++++++++++++++++++++++++++++---------- requirements/tox.txt | 6 +- 4 files changed, 329 insertions(+), 108 deletions(-) diff --git a/requirements/base.in b/requirements/base.in index 3da1e716..75e2e484 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -28,3 +28,4 @@ tincan xmltodict==0.13.0 git+ssh://git@github.com/nelc/nelp-custom-registration-fields.git@main git+ssh://git@github.com/nelc/external-api-clients.git@main +git+ssh://git@github.com/eduNEXT/eox-support@v6.0.0 diff --git a/requirements/base.txt b/requirements/base.txt index 2fd77ffa..ef37d31e 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -20,23 +20,34 @@ attrs==24.2.0 # via openedx-events beautifulsoup4==4.12.3 # via bs4 -billiard==4.2.0 +billiard==4.2.1 # via celery +bleach==6.2.0 + # via ora2 +boto3==1.35.53 + # via ora2 +botocore==1.35.53 + # via + # boto3 + # s3transfer bridgekeeper==0.9 # via -r requirements/base.in bs4==0.0.2 - # via -r requirements/base.in + # via + # -r requirements/base.in + # external-api-clients celery==5.4.0 # via + # eox-audit-model # eox-core # event-tracking -certifi==2024.7.4 +certifi==2024.8.30 # via requests -cffi==1.17.0 +cffi==1.17.1 # via # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via requests click==8.1.7 # via @@ -55,7 +66,7 @@ click-repl==0.3.0 # via celery code-annotations==1.8.0 # via edx-toggles -cryptography==43.0.0 +cryptography==43.0.3 # via # jwcrypto # pyjwt @@ -63,6 +74,7 @@ cryptography==43.0.0 # social-auth-core defusedxml==0.8.0rc2 # via + # ora2 # python3-openid # social-auth-core django==3.2.25 @@ -80,36 +92,49 @@ django==3.2.25 # drf-jwt # drf-yasg # edx-api-doc-tools + # edx-django-release-util # edx-django-utils # edx-drf-extensions # edx-i18n-tools + # edx-milestones # edx-proctoring + # edx-submissions # edx-toggles # edx-when + # eox-audit-model # eox-core + # eox-support # eox-theming # event-tracking # jsonfield # nelp-custom-registration-fields # openedx-events # openedx-filters + # ora2 # social-auth-app-django django-crum==0.7.9 # via # edx-django-utils # edx-proctoring # edx-toggles + # eox-audit-model django-filter==21.1 # via # -c requirements/constraints.txt # -r requirements/base.in # eox-core django-ipware==7.0.1 - # via edx-proctoring -django-model-utils==4.5.1 # via # edx-proctoring + # eox-audit-model + # eox-support +django-model-utils==5.0.0 + # via + # edx-milestones + # edx-proctoring + # edx-submissions # edx-when + # ora2 django-oauth-toolkit==2.4.0 # via eox-core django-oauth2-provider==0.2.6.1 @@ -119,7 +144,9 @@ django-password-validators==1.7.3 # -c requirements/constraints.txt # -r requirements/base.in django-simple-history==3.6.0 - # via edx-proctoring + # via + # edx-proctoring + # ora2 django-waffle==4.1.0 # via # edx-django-utils @@ -127,7 +154,7 @@ django-waffle==4.1.0 # edx-proctoring # edx-toggles # eox-core -django-webpack-loader==3.1.0 +django-webpack-loader==3.1.1 # via edx-proctoring djangorestframework==3.12.4 # via @@ -139,21 +166,26 @@ djangorestframework==3.12.4 # edx-api-doc-tools # edx-drf-extensions # edx-proctoring + # edx-submissions # eox-core + # eox-support + # ora2 djangorestframework-jsonapi==5.0.0 # via # -c requirements/constraints.txt # -r requirements/base.in -dnspython==2.6.1 +dnspython==2.7.0 # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via edx-api-doc-tools -edx-api-doc-tools==1.8.0 +edx-api-doc-tools==2.0.0 # via eox-core edx-ccx-keys==1.3.0 # via openedx-events +edx-django-release-util==1.4.0 + # via edx-submissions edx-django-utils==5.2.0 # via # -c requirements/constraints.txt @@ -164,6 +196,7 @@ edx-django-utils==5.2.0 # edx-when # event-tracking # openedx-events + # ora2 edx-drf-extensions==8.0.0 # via # -c requirements/constraints.txt @@ -171,33 +204,50 @@ edx-drf-extensions==8.0.0 # edx-proctoring # edx-when # eox-core -edx-i18n-tools==1.6.2 - # via -r requirements/base.in -edx-opaque-keys[django]==2.10.0 +edx-i18n-tools==1.6.3 + # via + # -r requirements/base.in + # ora2 +edx-milestones==0.6.0 + # via eox-support +edx-opaque-keys[django]==2.11.0 # via # -r requirements/base.in # edx-ccx-keys # edx-drf-extensions + # edx-milestones # edx-proctoring # edx-when # eox-core + # eox-support # openedx-events -edx-proctoring==4.18.1 + # ora2 +edx-proctoring==4.18.2 # via eox-core -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via edx-proctoring +edx-submissions==3.8.3 + # via ora2 edx-toggles==5.2.0 - # via event-tracking + # via + # event-tracking + # ora2 edx-when==2.5.0 # via edx-proctoring -eox-core==10.5.1 +eox-audit-model==5.0.0 + # via + # eox-support + # external-api-clients +eox-core==11.0.0 + # via -r requirements/base.in +eox-support @ git+ssh://git@github.com/eduNEXT/eox-support@v6.0.0 # via -r requirements/base.in eox-tenant==11.2.0 # via # -c requirements/constraints.txt # -r requirements/base.in # eox-theming -eox-theming==7.2.0 +eox-theming==8.0.0 # via -r requirements/base.in event-tracking==3.0.0 # via @@ -205,13 +255,15 @@ event-tracking==3.0.0 # edx-proctoring external-api-clients @ git+ssh://git@github.com/nelc/external-api-clients.git@main # via -r requirements/base.in -fastavro==1.9.5 +fastavro==1.9.7 # via openedx-events fs==2.4.16 # via xblock future==1.0.0 # via pyjwkest -idna==3.7 +html5lib==1.1 + # via ora2 +idna==3.10 # via requests inflection==0.5.1 # via @@ -219,58 +271,81 @@ inflection==0.5.1 # drf-yasg jinja2==3.1.4 # via code-annotations +jmespath==1.0.1 + # via + # boto3 + # botocore jsonfield==3.1.0 - # via edx-proctoring + # via + # edx-proctoring + # edx-submissions + # eox-audit-model + # ora2 jwcrypto==1.5.6 # via django-oauth-toolkit -kombu==5.4.0 +kombu==5.4.2 # via celery -lxml==5.3.0 +lazy==1.6 + # via ora2 +loremipsum==1.0.5 + # via ora2 +lxml[html-clean,html_clean]==5.3.0 # via # edx-i18n-tools + # external-api-clients + # ora2 # xblock -mako==1.3.5 +mako==1.3.6 # via # -r requirements/base.in # xblock -markupsafe==2.1.5 +markupsafe==3.0.2 # via # jinja2 # mako # xblock nelp-custom-registration-fields @ git+ssh://git@github.com/nelc/nelp-custom-registration-fields.git@main # via -r requirements/base.in -newrelic==9.13.0 +newrelic==10.2.0 # via edx-django-utils oauthlib==3.2.2 # via # django-oauth-toolkit # requests-oauthlib # social-auth-core -openedx-events==9.11.0 +openedx-events==9.14.1 # via # -r requirements/base.in # eox-core # event-tracking + # ora2 openedx-filters==1.9.0 - # via -r requirements/base.in + # via + # -r requirements/base.in + # ora2 +ora2==6.12.3 + # via eox-support packaging==24.1 # via drf-yasg path==16.16.0 - # via edx-i18n-tools -pbr==6.0.0 + # via + # edx-i18n-tools + # path-py +path-py==12.5.0 + # via ora2 +pbr==6.1.0 # via stevedore -phonenumbers==8.13.43 +phonenumbers==8.13.48 # via -r requirements/base.in polib==1.2.0 # via edx-i18n-tools -prompt-toolkit==3.0.47 +prompt-toolkit==3.0.48 # via click-repl -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi -pycryptodomex==3.20.0 +pycryptodomex==3.21.0 # via # edx-proctoring # pyjwkest @@ -295,29 +370,36 @@ pynacl==1.5.0 # via edx-django-utils python-dateutil==2.9.0.post0 # via + # botocore # celery # edx-drf-extensions # edx-proctoring + # ora2 # xblock python-ipware==3.0.0 # via django-ipware python-slugify==8.0.4 # via code-annotations +python-swiftclient==4.6.0 + # via ora2 python3-openid==3.2.0 # via social-auth-core -pytz==2024.1 +pytz==2024.2 # via # django # django-oauth-toolkit # drf-yasg # edx-proctoring + # edx-submissions # event-tracking + # ora2 # tincan # xblock pyyaml==6.0.2 # via # code-annotations # drf-yasg + # edx-django-release-util # edx-i18n-tools # xblock requests==2.32.3 @@ -325,37 +407,44 @@ requests==2.32.3 # django-oauth-toolkit # edx-drf-extensions # edx-rest-api-client + # external-api-clients # pyjwkest + # python-swiftclient # requests-oauthlib # requests-pkcs12 - # slumber # social-auth-core requests-oauthlib==2.0.0 # via # -r requirements/base.in + # external-api-clients # social-auth-core requests-pkcs12==1.22 - # via -r requirements/base.in -rules==3.4 + # via + # -r requirements/base.in + # external-api-clients +rules==3.5 # via edx-proctoring +s3transfer==0.10.3 + # via boto3 semantic-version==2.10.0 # via edx-drf-extensions shortuuid==1.0.13 # via django-oauth2-provider -simplejson==3.19.2 +simplejson==3.19.3 # via xblock six==1.16.0 # via # edx-ccx-keys + # edx-django-release-util # edx-drf-extensions + # edx-milestones # eox-core # eox-theming # event-tracking # fs + # html5lib # pyjwkest # python-dateutil -slumber==0.7.1 - # via edx-rest-api-client social-auth-app-django==5.4.2 # via -r requirements/base.in social-auth-core==4.5.4 @@ -366,7 +455,7 @@ soupsieve==2.6 # via beautifulsoup4 sqlparse==0.5.1 # via django -stevedore==5.2.0 +stevedore==5.3.0 # via # code-annotations # edx-django-utils @@ -382,25 +471,37 @@ typing-extensions==4.12.2 # jwcrypto # pydantic # pydantic-core -tzdata==2024.1 - # via celery +tzdata==2024.2 + # via + # celery + # kombu uritemplate==4.1.1 # via drf-yasg -urllib3==2.2.2 - # via requests +urllib3==2.2.3 + # via + # botocore + # requests vine==5.1.0 # via # amqp # celery # kombu +voluptuous==0.15.2 + # via ora2 wcwidth==0.2.13 # via prompt-toolkit web-fragments==2.2.0 # via xblock -webob==1.8.8 +webencodings==0.5.1 + # via + # bleach + # html5lib +webob==1.8.9 # via xblock -xblock==5.0.0 - # via edx-when +xblock==5.1.0 + # via + # edx-when + # ora2 xmltodict==0.13.0 # via -r requirements/base.in diff --git a/requirements/test.txt b/requirements/test.txt index 7f9b55f5..472465ec 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -26,7 +26,7 @@ asgiref==3.8.1 # django # django-countries # django-simple-history -astroid==3.2.4 +astroid==3.3.5 # via pylint attrs==24.2.0 # via @@ -36,29 +36,45 @@ beautifulsoup4==4.12.3 # via # -r requirements/base.txt # bs4 -billiard==4.2.0 +billiard==4.2.1 # via # -r requirements/base.txt # celery +bleach==6.2.0 + # via + # -r requirements/base.txt + # ora2 +boto3==1.35.53 + # via + # -r requirements/base.txt + # ora2 +botocore==1.35.53 + # via + # -r requirements/base.txt + # boto3 + # s3transfer bridgekeeper==0.9 # via -r requirements/base.txt bs4==0.0.2 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # external-api-clients celery==5.4.0 # via # -r requirements/base.txt + # eox-audit-model # eox-core # event-tracking -certifi==2024.7.4 +certifi==2024.8.30 # via # -r requirements/base.txt # requests -cffi==1.17.0 +cffi==1.17.1 # via # -r requirements/base.txt # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via # -r requirements/base.txt # requests @@ -88,9 +104,9 @@ code-annotations==1.8.0 # via # -r requirements/base.txt # edx-toggles -coverage==7.6.1 +coverage==7.6.4 # via -r requirements/test.in -cryptography==43.0.0 +cryptography==43.0.3 # via # -r requirements/base.txt # jwcrypto @@ -102,9 +118,10 @@ ddt==1.7.2 defusedxml==0.8.0rc2 # via # -r requirements/base.txt + # ora2 # python3-openid # social-auth-core -dill==0.3.8 +dill==0.3.9 # via pylint django==3.2.25 # via @@ -121,19 +138,25 @@ django==3.2.25 # drf-jwt # drf-yasg # edx-api-doc-tools + # edx-django-release-util # edx-django-utils # edx-drf-extensions # edx-i18n-tools + # edx-milestones # edx-proctoring + # edx-submissions # edx-toggles # edx-when + # eox-audit-model # eox-core + # eox-support # eox-theming # event-tracking # jsonfield # nelp-custom-registration-fields # openedx-events # openedx-filters + # ora2 # social-auth-app-django django-countries==7.6.1 # via -r requirements/test.in @@ -143,6 +166,7 @@ django-crum==0.7.9 # edx-django-utils # edx-proctoring # edx-toggles + # eox-audit-model django-fake-model==0.1.4 # via -r requirements/test.in django-filter==21.1 @@ -154,11 +178,16 @@ django-ipware==7.0.1 # via # -r requirements/base.txt # edx-proctoring -django-model-utils==4.5.1 + # eox-audit-model + # eox-support +django-model-utils==5.0.0 # via # -r requirements/base.txt + # edx-milestones # edx-proctoring + # edx-submissions # edx-when + # ora2 django-oauth-toolkit==2.4.0 # via # -r requirements/base.txt @@ -175,6 +204,7 @@ django-simple-history==3.6.0 # via # -r requirements/base.txt # edx-proctoring + # ora2 django-waffle==4.1.0 # via # -r requirements/base.txt @@ -183,7 +213,7 @@ django-waffle==4.1.0 # edx-proctoring # edx-toggles # eox-core -django-webpack-loader==3.1.0 +django-webpack-loader==3.1.1 # via # -r requirements/base.txt # edx-proctoring @@ -197,12 +227,15 @@ djangorestframework==3.12.4 # edx-api-doc-tools # edx-drf-extensions # edx-proctoring + # edx-submissions # eox-core + # eox-support + # ora2 djangorestframework-jsonapi==5.0.0 # via # -c requirements/constraints.txt # -r requirements/base.txt -dnspython==2.6.1 +dnspython==2.7.0 # via # -r requirements/base.txt # pymongo @@ -210,11 +243,11 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via # -r requirements/base.txt # edx-api-doc-tools -edx-api-doc-tools==1.8.0 +edx-api-doc-tools==2.0.0 # via # -r requirements/base.txt # eox-core @@ -222,6 +255,10 @@ edx-ccx-keys==1.3.0 # via # -r requirements/base.txt # openedx-events +edx-django-release-util==1.4.0 + # via + # -r requirements/base.txt + # edx-submissions edx-django-utils==5.2.0 # via # -c requirements/constraints.txt @@ -232,6 +269,7 @@ edx-django-utils==5.2.0 # edx-when # event-tracking # openedx-events + # ora2 edx-drf-extensions==8.0.0 # via # -c requirements/constraints.txt @@ -239,41 +277,62 @@ edx-drf-extensions==8.0.0 # edx-proctoring # edx-when # eox-core -edx-i18n-tools==1.6.2 - # via -r requirements/base.txt -edx-opaque-keys[django]==2.10.0 +edx-i18n-tools==1.6.3 + # via + # -r requirements/base.txt + # ora2 +edx-milestones==0.6.0 + # via + # -r requirements/base.txt + # eox-support +edx-opaque-keys[django]==2.11.0 # via # -r requirements/base.txt # edx-ccx-keys # edx-drf-extensions + # edx-milestones # edx-proctoring # edx-when # eox-core + # eox-support # openedx-events -edx-proctoring==4.18.1 + # ora2 +edx-proctoring==4.18.2 # via # -r requirements/base.txt # eox-core -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via # -r requirements/base.txt # edx-proctoring +edx-submissions==3.8.3 + # via + # -r requirements/base.txt + # ora2 edx-toggles==5.2.0 # via # -r requirements/base.txt # event-tracking + # ora2 edx-when==2.5.0 # via # -r requirements/base.txt # edx-proctoring -eox-core==10.5.1 +eox-audit-model==5.0.0 + # via + # -r requirements/base.txt + # eox-support + # external-api-clients +eox-core==11.0.0 + # via -r requirements/base.txt +eox-support @ git+ssh://git@github.com/eduNEXT/eox-support@v6.0.0 # via -r requirements/base.txt eox-tenant==11.2.0 # via # -c requirements/constraints.txt # -r requirements/base.txt # eox-theming -eox-theming==7.2.0 +eox-theming==8.0.0 # via -r requirements/base.txt event-tracking==3.0.0 # via @@ -281,7 +340,7 @@ event-tracking==3.0.0 # edx-proctoring external-api-clients @ git+ssh://git@github.com/nelc/external-api-clients.git@main # via -r requirements/base.txt -fastavro==1.9.5 +fastavro==1.9.7 # via # -r requirements/base.txt # openedx-events @@ -295,7 +354,11 @@ future==1.0.0 # via # -r requirements/base.txt # pyjwkest -idna==3.7 +html5lib==1.1 + # via + # -r requirements/base.txt + # ora2 +idna==3.10 # via # -r requirements/base.txt # requests @@ -310,28 +373,46 @@ jinja2==3.1.4 # via # -r requirements/base.txt # code-annotations +jmespath==1.0.1 + # via + # -r requirements/base.txt + # boto3 + # botocore jsonfield==3.1.0 # via # -r requirements/base.txt # edx-proctoring + # edx-submissions + # eox-audit-model + # ora2 jwcrypto==1.5.6 # via # -r requirements/base.txt # django-oauth-toolkit -kombu==5.4.0 +kombu==5.4.2 # via # -r requirements/base.txt # celery -lxml==5.3.0 +lazy==1.6 + # via + # -r requirements/base.txt + # ora2 +loremipsum==1.0.5 + # via + # -r requirements/base.txt + # ora2 +lxml[html-clean]==5.3.0 # via # -r requirements/base.txt # edx-i18n-tools + # external-api-clients + # ora2 # xblock -mako==1.3.5 +mako==1.3.6 # via # -r requirements/base.txt # xblock -markupsafe==2.1.5 +markupsafe==3.0.2 # via # -r requirements/base.txt # jinja2 @@ -345,7 +426,7 @@ mock==5.1.0 # via -r requirements/test.in nelp-custom-registration-fields @ git+ssh://git@github.com/nelc/nelp-custom-registration-fields.git@main # via -r requirements/base.txt -newrelic==9.13.0 +newrelic==10.2.0 # via # -r requirements/base.txt # edx-django-utils @@ -355,13 +436,20 @@ oauthlib==3.2.2 # django-oauth-toolkit # requests-oauthlib # social-auth-core -openedx-events==9.11.0 +openedx-events==9.14.1 # via # -r requirements/base.txt # eox-core # event-tracking + # ora2 openedx-filters==1.9.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # ora2 +ora2==6.12.3 + # via + # -r requirements/base.txt + # eox-support packaging==24.1 # via # -r requirements/base.txt @@ -372,24 +460,27 @@ path==16.16.0 # edx-i18n-tools # path-py path-py==12.5.0 - # via -r requirements/test.in -pbr==6.0.0 + # via + # -r requirements/base.txt + # -r requirements/test.in + # ora2 +pbr==6.1.0 # via # -r requirements/base.txt # stevedore -phonenumbers==8.13.43 +phonenumbers==8.13.48 # via -r requirements/base.txt -platformdirs==4.2.2 +platformdirs==4.3.6 # via pylint polib==1.2.0 # via # -r requirements/base.txt # edx-i18n-tools -prompt-toolkit==3.0.47 +prompt-toolkit==3.0.48 # via # -r requirements/base.txt # click-repl -psutil==6.0.0 +psutil==6.1.0 # via # -r requirements/base.txt # edx-django-utils @@ -401,7 +492,7 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pycryptodomex==3.20.0 +pycryptodomex==3.21.0 # via # -r requirements/base.txt # edx-proctoring @@ -426,7 +517,7 @@ pyjwt[crypto]==2.9.0 # edx-proctoring # edx-rest-api-client # social-auth-core -pylint==3.2.6 +pylint==3.3.1 # via -r requirements/test.in pymongo==4.4.0 # via @@ -440,9 +531,11 @@ pynacl==1.5.0 python-dateutil==2.9.0.post0 # via # -r requirements/base.txt + # botocore # celery # edx-drf-extensions # edx-proctoring + # ora2 # xblock python-ipware==3.0.0 # via @@ -452,18 +545,24 @@ python-slugify==8.0.4 # via # -r requirements/base.txt # code-annotations +python-swiftclient==4.6.0 + # via + # -r requirements/base.txt + # ora2 python3-openid==3.2.0 # via # -r requirements/base.txt # social-auth-core -pytz==2024.1 +pytz==2024.2 # via # -r requirements/base.txt # django # django-oauth-toolkit # drf-yasg # edx-proctoring + # edx-submissions # event-tracking + # ora2 # tincan # xblock pyyaml==6.0.2 @@ -471,6 +570,7 @@ pyyaml==6.0.2 # -r requirements/base.txt # code-annotations # drf-yasg + # edx-django-release-util # edx-i18n-tools # xblock requests==2.32.3 @@ -479,21 +579,29 @@ requests==2.32.3 # django-oauth-toolkit # edx-drf-extensions # edx-rest-api-client + # external-api-clients # pyjwkest + # python-swiftclient # requests-oauthlib # requests-pkcs12 - # slumber # social-auth-core requests-oauthlib==2.0.0 # via # -r requirements/base.txt + # external-api-clients # social-auth-core requests-pkcs12==1.22 - # via -r requirements/base.txt -rules==3.4 + # via + # -r requirements/base.txt + # external-api-clients +rules==3.5 # via # -r requirements/base.txt # edx-proctoring +s3transfer==0.10.3 + # via + # -r requirements/base.txt + # boto3 semantic-version==2.10.0 # via # -r requirements/base.txt @@ -502,7 +610,7 @@ shortuuid==1.0.13 # via # -r requirements/base.txt # django-oauth2-provider -simplejson==3.19.2 +simplejson==3.19.3 # via # -r requirements/base.txt # xblock @@ -510,17 +618,16 @@ six==1.16.0 # via # -r requirements/base.txt # edx-ccx-keys + # edx-django-release-util # edx-drf-extensions + # edx-milestones # eox-core # eox-theming # event-tracking # fs + # html5lib # pyjwkest # python-dateutil -slumber==0.7.1 - # via - # -r requirements/base.txt - # edx-rest-api-client social-auth-app-django==5.4.2 # via -r requirements/base.txt social-auth-core==4.5.4 @@ -536,7 +643,7 @@ sqlparse==0.5.1 # via # -r requirements/base.txt # django -stevedore==5.2.0 +stevedore==5.3.0 # via # -r requirements/base.txt # code-annotations @@ -550,7 +657,7 @@ text-unidecode==1.3 # python-slugify tincan==1.0.0 # via -r requirements/base.txt -tomli==2.0.1 +tomli==2.0.2 # via pylint tomlkit==0.13.2 # via pylint @@ -564,17 +671,19 @@ typing-extensions==4.12.2 # jwcrypto # pydantic # pydantic-core -tzdata==2024.1 +tzdata==2024.2 # via # -r requirements/base.txt # celery + # kombu uritemplate==4.1.1 # via # -r requirements/base.txt # drf-yasg -urllib3==2.2.2 +urllib3==2.2.3 # via # -r requirements/base.txt + # botocore # requests vine==5.1.0 # via @@ -582,6 +691,10 @@ vine==5.1.0 # amqp # celery # kombu +voluptuous==0.15.2 + # via + # -r requirements/base.txt + # ora2 wcwidth==0.2.13 # via # -r requirements/base.txt @@ -590,14 +703,20 @@ web-fragments==2.2.0 # via # -r requirements/base.txt # xblock -webob==1.8.8 +webencodings==0.5.1 + # via + # -r requirements/base.txt + # bleach + # html5lib +webob==1.8.9 # via # -r requirements/base.txt # xblock -xblock==5.0.0 +xblock==5.1.0 # via # -r requirements/base.txt # edx-when + # ora2 xmltodict==0.13.0 # via -r requirements/base.txt diff --git a/requirements/tox.txt b/requirements/tox.txt index db44d594..1ceb42ec 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -10,7 +10,7 @@ chardet==5.2.0 # via tox colorama==0.4.6 # via tox -distlib==0.3.8 +distlib==0.3.9 # via virtualenv filelock==3.16.1 # via @@ -32,9 +32,9 @@ tomli==2.0.2 # via # pyproject-api # tox -tox==4.21.2 +tox==4.23.2 # via -r requirements/tox.in typing-extensions==4.12.2 # via tox -virtualenv==20.26.6 +virtualenv==20.27.1 # via tox From 4f0071dc3eb8e6e8c7407e3ad45971f8673c5505 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Thu, 31 Oct 2024 18:23:07 -0500 Subject: [PATCH 3/9] Revert "feat: add eox-support requirement" This reverts commit d69741bddeef634807f551db6300f565e1e730d8. --- requirements/base.in | 1 - requirements/base.txt | 205 ++++++++++---------------------------- requirements/test.txt | 225 ++++++++++-------------------------------- requirements/tox.txt | 6 +- 4 files changed, 108 insertions(+), 329 deletions(-) diff --git a/requirements/base.in b/requirements/base.in index 75e2e484..3da1e716 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -28,4 +28,3 @@ tincan xmltodict==0.13.0 git+ssh://git@github.com/nelc/nelp-custom-registration-fields.git@main git+ssh://git@github.com/nelc/external-api-clients.git@main -git+ssh://git@github.com/eduNEXT/eox-support@v6.0.0 diff --git a/requirements/base.txt b/requirements/base.txt index ef37d31e..2fd77ffa 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -20,34 +20,23 @@ attrs==24.2.0 # via openedx-events beautifulsoup4==4.12.3 # via bs4 -billiard==4.2.1 +billiard==4.2.0 # via celery -bleach==6.2.0 - # via ora2 -boto3==1.35.53 - # via ora2 -botocore==1.35.53 - # via - # boto3 - # s3transfer bridgekeeper==0.9 # via -r requirements/base.in bs4==0.0.2 - # via - # -r requirements/base.in - # external-api-clients + # via -r requirements/base.in celery==5.4.0 # via - # eox-audit-model # eox-core # event-tracking -certifi==2024.8.30 +certifi==2024.7.4 # via requests -cffi==1.17.1 +cffi==1.17.0 # via # cryptography # pynacl -charset-normalizer==3.4.0 +charset-normalizer==3.3.2 # via requests click==8.1.7 # via @@ -66,7 +55,7 @@ click-repl==0.3.0 # via celery code-annotations==1.8.0 # via edx-toggles -cryptography==43.0.3 +cryptography==43.0.0 # via # jwcrypto # pyjwt @@ -74,7 +63,6 @@ cryptography==43.0.3 # social-auth-core defusedxml==0.8.0rc2 # via - # ora2 # python3-openid # social-auth-core django==3.2.25 @@ -92,49 +80,36 @@ django==3.2.25 # drf-jwt # drf-yasg # edx-api-doc-tools - # edx-django-release-util # edx-django-utils # edx-drf-extensions # edx-i18n-tools - # edx-milestones # edx-proctoring - # edx-submissions # edx-toggles # edx-when - # eox-audit-model # eox-core - # eox-support # eox-theming # event-tracking # jsonfield # nelp-custom-registration-fields # openedx-events # openedx-filters - # ora2 # social-auth-app-django django-crum==0.7.9 # via # edx-django-utils # edx-proctoring # edx-toggles - # eox-audit-model django-filter==21.1 # via # -c requirements/constraints.txt # -r requirements/base.in # eox-core django-ipware==7.0.1 + # via edx-proctoring +django-model-utils==4.5.1 # via # edx-proctoring - # eox-audit-model - # eox-support -django-model-utils==5.0.0 - # via - # edx-milestones - # edx-proctoring - # edx-submissions # edx-when - # ora2 django-oauth-toolkit==2.4.0 # via eox-core django-oauth2-provider==0.2.6.1 @@ -144,9 +119,7 @@ django-password-validators==1.7.3 # -c requirements/constraints.txt # -r requirements/base.in django-simple-history==3.6.0 - # via - # edx-proctoring - # ora2 + # via edx-proctoring django-waffle==4.1.0 # via # edx-django-utils @@ -154,7 +127,7 @@ django-waffle==4.1.0 # edx-proctoring # edx-toggles # eox-core -django-webpack-loader==3.1.1 +django-webpack-loader==3.1.0 # via edx-proctoring djangorestframework==3.12.4 # via @@ -166,26 +139,21 @@ djangorestframework==3.12.4 # edx-api-doc-tools # edx-drf-extensions # edx-proctoring - # edx-submissions # eox-core - # eox-support - # ora2 djangorestframework-jsonapi==5.0.0 # via # -c requirements/constraints.txt # -r requirements/base.in -dnspython==2.7.0 +dnspython==2.6.1 # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.8 +drf-yasg==1.21.7 # via edx-api-doc-tools -edx-api-doc-tools==2.0.0 +edx-api-doc-tools==1.8.0 # via eox-core edx-ccx-keys==1.3.0 # via openedx-events -edx-django-release-util==1.4.0 - # via edx-submissions edx-django-utils==5.2.0 # via # -c requirements/constraints.txt @@ -196,7 +164,6 @@ edx-django-utils==5.2.0 # edx-when # event-tracking # openedx-events - # ora2 edx-drf-extensions==8.0.0 # via # -c requirements/constraints.txt @@ -204,50 +171,33 @@ edx-drf-extensions==8.0.0 # edx-proctoring # edx-when # eox-core -edx-i18n-tools==1.6.3 - # via - # -r requirements/base.in - # ora2 -edx-milestones==0.6.0 - # via eox-support -edx-opaque-keys[django]==2.11.0 +edx-i18n-tools==1.6.2 + # via -r requirements/base.in +edx-opaque-keys[django]==2.10.0 # via # -r requirements/base.in # edx-ccx-keys # edx-drf-extensions - # edx-milestones # edx-proctoring # edx-when # eox-core - # eox-support # openedx-events - # ora2 -edx-proctoring==4.18.2 +edx-proctoring==4.18.1 # via eox-core -edx-rest-api-client==6.0.0 +edx-rest-api-client==5.7.1 # via edx-proctoring -edx-submissions==3.8.3 - # via ora2 edx-toggles==5.2.0 - # via - # event-tracking - # ora2 + # via event-tracking edx-when==2.5.0 # via edx-proctoring -eox-audit-model==5.0.0 - # via - # eox-support - # external-api-clients -eox-core==11.0.0 - # via -r requirements/base.in -eox-support @ git+ssh://git@github.com/eduNEXT/eox-support@v6.0.0 +eox-core==10.5.1 # via -r requirements/base.in eox-tenant==11.2.0 # via # -c requirements/constraints.txt # -r requirements/base.in # eox-theming -eox-theming==8.0.0 +eox-theming==7.2.0 # via -r requirements/base.in event-tracking==3.0.0 # via @@ -255,15 +205,13 @@ event-tracking==3.0.0 # edx-proctoring external-api-clients @ git+ssh://git@github.com/nelc/external-api-clients.git@main # via -r requirements/base.in -fastavro==1.9.7 +fastavro==1.9.5 # via openedx-events fs==2.4.16 # via xblock future==1.0.0 # via pyjwkest -html5lib==1.1 - # via ora2 -idna==3.10 +idna==3.7 # via requests inflection==0.5.1 # via @@ -271,81 +219,58 @@ inflection==0.5.1 # drf-yasg jinja2==3.1.4 # via code-annotations -jmespath==1.0.1 - # via - # boto3 - # botocore jsonfield==3.1.0 - # via - # edx-proctoring - # edx-submissions - # eox-audit-model - # ora2 + # via edx-proctoring jwcrypto==1.5.6 # via django-oauth-toolkit -kombu==5.4.2 +kombu==5.4.0 # via celery -lazy==1.6 - # via ora2 -loremipsum==1.0.5 - # via ora2 -lxml[html-clean,html_clean]==5.3.0 +lxml==5.3.0 # via # edx-i18n-tools - # external-api-clients - # ora2 # xblock -mako==1.3.6 +mako==1.3.5 # via # -r requirements/base.in # xblock -markupsafe==3.0.2 +markupsafe==2.1.5 # via # jinja2 # mako # xblock nelp-custom-registration-fields @ git+ssh://git@github.com/nelc/nelp-custom-registration-fields.git@main # via -r requirements/base.in -newrelic==10.2.0 +newrelic==9.13.0 # via edx-django-utils oauthlib==3.2.2 # via # django-oauth-toolkit # requests-oauthlib # social-auth-core -openedx-events==9.14.1 +openedx-events==9.11.0 # via # -r requirements/base.in # eox-core # event-tracking - # ora2 openedx-filters==1.9.0 - # via - # -r requirements/base.in - # ora2 -ora2==6.12.3 - # via eox-support + # via -r requirements/base.in packaging==24.1 # via drf-yasg path==16.16.0 - # via - # edx-i18n-tools - # path-py -path-py==12.5.0 - # via ora2 -pbr==6.1.0 + # via edx-i18n-tools +pbr==6.0.0 # via stevedore -phonenumbers==8.13.48 +phonenumbers==8.13.43 # via -r requirements/base.in polib==1.2.0 # via edx-i18n-tools -prompt-toolkit==3.0.48 +prompt-toolkit==3.0.47 # via click-repl -psutil==6.1.0 +psutil==6.0.0 # via edx-django-utils pycparser==2.22 # via cffi -pycryptodomex==3.21.0 +pycryptodomex==3.20.0 # via # edx-proctoring # pyjwkest @@ -370,36 +295,29 @@ pynacl==1.5.0 # via edx-django-utils python-dateutil==2.9.0.post0 # via - # botocore # celery # edx-drf-extensions # edx-proctoring - # ora2 # xblock python-ipware==3.0.0 # via django-ipware python-slugify==8.0.4 # via code-annotations -python-swiftclient==4.6.0 - # via ora2 python3-openid==3.2.0 # via social-auth-core -pytz==2024.2 +pytz==2024.1 # via # django # django-oauth-toolkit # drf-yasg # edx-proctoring - # edx-submissions # event-tracking - # ora2 # tincan # xblock pyyaml==6.0.2 # via # code-annotations # drf-yasg - # edx-django-release-util # edx-i18n-tools # xblock requests==2.32.3 @@ -407,44 +325,37 @@ requests==2.32.3 # django-oauth-toolkit # edx-drf-extensions # edx-rest-api-client - # external-api-clients # pyjwkest - # python-swiftclient # requests-oauthlib # requests-pkcs12 + # slumber # social-auth-core requests-oauthlib==2.0.0 # via # -r requirements/base.in - # external-api-clients # social-auth-core requests-pkcs12==1.22 - # via - # -r requirements/base.in - # external-api-clients -rules==3.5 + # via -r requirements/base.in +rules==3.4 # via edx-proctoring -s3transfer==0.10.3 - # via boto3 semantic-version==2.10.0 # via edx-drf-extensions shortuuid==1.0.13 # via django-oauth2-provider -simplejson==3.19.3 +simplejson==3.19.2 # via xblock six==1.16.0 # via # edx-ccx-keys - # edx-django-release-util # edx-drf-extensions - # edx-milestones # eox-core # eox-theming # event-tracking # fs - # html5lib # pyjwkest # python-dateutil +slumber==0.7.1 + # via edx-rest-api-client social-auth-app-django==5.4.2 # via -r requirements/base.in social-auth-core==4.5.4 @@ -455,7 +366,7 @@ soupsieve==2.6 # via beautifulsoup4 sqlparse==0.5.1 # via django -stevedore==5.3.0 +stevedore==5.2.0 # via # code-annotations # edx-django-utils @@ -471,37 +382,25 @@ typing-extensions==4.12.2 # jwcrypto # pydantic # pydantic-core -tzdata==2024.2 - # via - # celery - # kombu +tzdata==2024.1 + # via celery uritemplate==4.1.1 # via drf-yasg -urllib3==2.2.3 - # via - # botocore - # requests +urllib3==2.2.2 + # via requests vine==5.1.0 # via # amqp # celery # kombu -voluptuous==0.15.2 - # via ora2 wcwidth==0.2.13 # via prompt-toolkit web-fragments==2.2.0 # via xblock -webencodings==0.5.1 - # via - # bleach - # html5lib -webob==1.8.9 +webob==1.8.8 # via xblock -xblock==5.1.0 - # via - # edx-when - # ora2 +xblock==5.0.0 + # via edx-when xmltodict==0.13.0 # via -r requirements/base.in diff --git a/requirements/test.txt b/requirements/test.txt index 472465ec..7f9b55f5 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -26,7 +26,7 @@ asgiref==3.8.1 # django # django-countries # django-simple-history -astroid==3.3.5 +astroid==3.2.4 # via pylint attrs==24.2.0 # via @@ -36,45 +36,29 @@ beautifulsoup4==4.12.3 # via # -r requirements/base.txt # bs4 -billiard==4.2.1 +billiard==4.2.0 # via # -r requirements/base.txt # celery -bleach==6.2.0 - # via - # -r requirements/base.txt - # ora2 -boto3==1.35.53 - # via - # -r requirements/base.txt - # ora2 -botocore==1.35.53 - # via - # -r requirements/base.txt - # boto3 - # s3transfer bridgekeeper==0.9 # via -r requirements/base.txt bs4==0.0.2 - # via - # -r requirements/base.txt - # external-api-clients + # via -r requirements/base.txt celery==5.4.0 # via # -r requirements/base.txt - # eox-audit-model # eox-core # event-tracking -certifi==2024.8.30 +certifi==2024.7.4 # via # -r requirements/base.txt # requests -cffi==1.17.1 +cffi==1.17.0 # via # -r requirements/base.txt # cryptography # pynacl -charset-normalizer==3.4.0 +charset-normalizer==3.3.2 # via # -r requirements/base.txt # requests @@ -104,9 +88,9 @@ code-annotations==1.8.0 # via # -r requirements/base.txt # edx-toggles -coverage==7.6.4 +coverage==7.6.1 # via -r requirements/test.in -cryptography==43.0.3 +cryptography==43.0.0 # via # -r requirements/base.txt # jwcrypto @@ -118,10 +102,9 @@ ddt==1.7.2 defusedxml==0.8.0rc2 # via # -r requirements/base.txt - # ora2 # python3-openid # social-auth-core -dill==0.3.9 +dill==0.3.8 # via pylint django==3.2.25 # via @@ -138,25 +121,19 @@ django==3.2.25 # drf-jwt # drf-yasg # edx-api-doc-tools - # edx-django-release-util # edx-django-utils # edx-drf-extensions # edx-i18n-tools - # edx-milestones # edx-proctoring - # edx-submissions # edx-toggles # edx-when - # eox-audit-model # eox-core - # eox-support # eox-theming # event-tracking # jsonfield # nelp-custom-registration-fields # openedx-events # openedx-filters - # ora2 # social-auth-app-django django-countries==7.6.1 # via -r requirements/test.in @@ -166,7 +143,6 @@ django-crum==0.7.9 # edx-django-utils # edx-proctoring # edx-toggles - # eox-audit-model django-fake-model==0.1.4 # via -r requirements/test.in django-filter==21.1 @@ -178,16 +154,11 @@ django-ipware==7.0.1 # via # -r requirements/base.txt # edx-proctoring - # eox-audit-model - # eox-support -django-model-utils==5.0.0 +django-model-utils==4.5.1 # via # -r requirements/base.txt - # edx-milestones # edx-proctoring - # edx-submissions # edx-when - # ora2 django-oauth-toolkit==2.4.0 # via # -r requirements/base.txt @@ -204,7 +175,6 @@ django-simple-history==3.6.0 # via # -r requirements/base.txt # edx-proctoring - # ora2 django-waffle==4.1.0 # via # -r requirements/base.txt @@ -213,7 +183,7 @@ django-waffle==4.1.0 # edx-proctoring # edx-toggles # eox-core -django-webpack-loader==3.1.1 +django-webpack-loader==3.1.0 # via # -r requirements/base.txt # edx-proctoring @@ -227,15 +197,12 @@ djangorestframework==3.12.4 # edx-api-doc-tools # edx-drf-extensions # edx-proctoring - # edx-submissions # eox-core - # eox-support - # ora2 djangorestframework-jsonapi==5.0.0 # via # -c requirements/constraints.txt # -r requirements/base.txt -dnspython==2.7.0 +dnspython==2.6.1 # via # -r requirements/base.txt # pymongo @@ -243,11 +210,11 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -drf-yasg==1.21.8 +drf-yasg==1.21.7 # via # -r requirements/base.txt # edx-api-doc-tools -edx-api-doc-tools==2.0.0 +edx-api-doc-tools==1.8.0 # via # -r requirements/base.txt # eox-core @@ -255,10 +222,6 @@ edx-ccx-keys==1.3.0 # via # -r requirements/base.txt # openedx-events -edx-django-release-util==1.4.0 - # via - # -r requirements/base.txt - # edx-submissions edx-django-utils==5.2.0 # via # -c requirements/constraints.txt @@ -269,7 +232,6 @@ edx-django-utils==5.2.0 # edx-when # event-tracking # openedx-events - # ora2 edx-drf-extensions==8.0.0 # via # -c requirements/constraints.txt @@ -277,62 +239,41 @@ edx-drf-extensions==8.0.0 # edx-proctoring # edx-when # eox-core -edx-i18n-tools==1.6.3 - # via - # -r requirements/base.txt - # ora2 -edx-milestones==0.6.0 - # via - # -r requirements/base.txt - # eox-support -edx-opaque-keys[django]==2.11.0 +edx-i18n-tools==1.6.2 + # via -r requirements/base.txt +edx-opaque-keys[django]==2.10.0 # via # -r requirements/base.txt # edx-ccx-keys # edx-drf-extensions - # edx-milestones # edx-proctoring # edx-when # eox-core - # eox-support # openedx-events - # ora2 -edx-proctoring==4.18.2 +edx-proctoring==4.18.1 # via # -r requirements/base.txt # eox-core -edx-rest-api-client==6.0.0 +edx-rest-api-client==5.7.1 # via # -r requirements/base.txt # edx-proctoring -edx-submissions==3.8.3 - # via - # -r requirements/base.txt - # ora2 edx-toggles==5.2.0 # via # -r requirements/base.txt # event-tracking - # ora2 edx-when==2.5.0 # via # -r requirements/base.txt # edx-proctoring -eox-audit-model==5.0.0 - # via - # -r requirements/base.txt - # eox-support - # external-api-clients -eox-core==11.0.0 - # via -r requirements/base.txt -eox-support @ git+ssh://git@github.com/eduNEXT/eox-support@v6.0.0 +eox-core==10.5.1 # via -r requirements/base.txt eox-tenant==11.2.0 # via # -c requirements/constraints.txt # -r requirements/base.txt # eox-theming -eox-theming==8.0.0 +eox-theming==7.2.0 # via -r requirements/base.txt event-tracking==3.0.0 # via @@ -340,7 +281,7 @@ event-tracking==3.0.0 # edx-proctoring external-api-clients @ git+ssh://git@github.com/nelc/external-api-clients.git@main # via -r requirements/base.txt -fastavro==1.9.7 +fastavro==1.9.5 # via # -r requirements/base.txt # openedx-events @@ -354,11 +295,7 @@ future==1.0.0 # via # -r requirements/base.txt # pyjwkest -html5lib==1.1 - # via - # -r requirements/base.txt - # ora2 -idna==3.10 +idna==3.7 # via # -r requirements/base.txt # requests @@ -373,46 +310,28 @@ jinja2==3.1.4 # via # -r requirements/base.txt # code-annotations -jmespath==1.0.1 - # via - # -r requirements/base.txt - # boto3 - # botocore jsonfield==3.1.0 # via # -r requirements/base.txt # edx-proctoring - # edx-submissions - # eox-audit-model - # ora2 jwcrypto==1.5.6 # via # -r requirements/base.txt # django-oauth-toolkit -kombu==5.4.2 +kombu==5.4.0 # via # -r requirements/base.txt # celery -lazy==1.6 - # via - # -r requirements/base.txt - # ora2 -loremipsum==1.0.5 - # via - # -r requirements/base.txt - # ora2 -lxml[html-clean]==5.3.0 +lxml==5.3.0 # via # -r requirements/base.txt # edx-i18n-tools - # external-api-clients - # ora2 # xblock -mako==1.3.6 +mako==1.3.5 # via # -r requirements/base.txt # xblock -markupsafe==3.0.2 +markupsafe==2.1.5 # via # -r requirements/base.txt # jinja2 @@ -426,7 +345,7 @@ mock==5.1.0 # via -r requirements/test.in nelp-custom-registration-fields @ git+ssh://git@github.com/nelc/nelp-custom-registration-fields.git@main # via -r requirements/base.txt -newrelic==10.2.0 +newrelic==9.13.0 # via # -r requirements/base.txt # edx-django-utils @@ -436,20 +355,13 @@ oauthlib==3.2.2 # django-oauth-toolkit # requests-oauthlib # social-auth-core -openedx-events==9.14.1 +openedx-events==9.11.0 # via # -r requirements/base.txt # eox-core # event-tracking - # ora2 openedx-filters==1.9.0 - # via - # -r requirements/base.txt - # ora2 -ora2==6.12.3 - # via - # -r requirements/base.txt - # eox-support + # via -r requirements/base.txt packaging==24.1 # via # -r requirements/base.txt @@ -460,27 +372,24 @@ path==16.16.0 # edx-i18n-tools # path-py path-py==12.5.0 - # via - # -r requirements/base.txt - # -r requirements/test.in - # ora2 -pbr==6.1.0 + # via -r requirements/test.in +pbr==6.0.0 # via # -r requirements/base.txt # stevedore -phonenumbers==8.13.48 +phonenumbers==8.13.43 # via -r requirements/base.txt -platformdirs==4.3.6 +platformdirs==4.2.2 # via pylint polib==1.2.0 # via # -r requirements/base.txt # edx-i18n-tools -prompt-toolkit==3.0.48 +prompt-toolkit==3.0.47 # via # -r requirements/base.txt # click-repl -psutil==6.1.0 +psutil==6.0.0 # via # -r requirements/base.txt # edx-django-utils @@ -492,7 +401,7 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pycryptodomex==3.21.0 +pycryptodomex==3.20.0 # via # -r requirements/base.txt # edx-proctoring @@ -517,7 +426,7 @@ pyjwt[crypto]==2.9.0 # edx-proctoring # edx-rest-api-client # social-auth-core -pylint==3.3.1 +pylint==3.2.6 # via -r requirements/test.in pymongo==4.4.0 # via @@ -531,11 +440,9 @@ pynacl==1.5.0 python-dateutil==2.9.0.post0 # via # -r requirements/base.txt - # botocore # celery # edx-drf-extensions # edx-proctoring - # ora2 # xblock python-ipware==3.0.0 # via @@ -545,24 +452,18 @@ python-slugify==8.0.4 # via # -r requirements/base.txt # code-annotations -python-swiftclient==4.6.0 - # via - # -r requirements/base.txt - # ora2 python3-openid==3.2.0 # via # -r requirements/base.txt # social-auth-core -pytz==2024.2 +pytz==2024.1 # via # -r requirements/base.txt # django # django-oauth-toolkit # drf-yasg # edx-proctoring - # edx-submissions # event-tracking - # ora2 # tincan # xblock pyyaml==6.0.2 @@ -570,7 +471,6 @@ pyyaml==6.0.2 # -r requirements/base.txt # code-annotations # drf-yasg - # edx-django-release-util # edx-i18n-tools # xblock requests==2.32.3 @@ -579,29 +479,21 @@ requests==2.32.3 # django-oauth-toolkit # edx-drf-extensions # edx-rest-api-client - # external-api-clients # pyjwkest - # python-swiftclient # requests-oauthlib # requests-pkcs12 + # slumber # social-auth-core requests-oauthlib==2.0.0 # via # -r requirements/base.txt - # external-api-clients # social-auth-core requests-pkcs12==1.22 - # via - # -r requirements/base.txt - # external-api-clients -rules==3.5 + # via -r requirements/base.txt +rules==3.4 # via # -r requirements/base.txt # edx-proctoring -s3transfer==0.10.3 - # via - # -r requirements/base.txt - # boto3 semantic-version==2.10.0 # via # -r requirements/base.txt @@ -610,7 +502,7 @@ shortuuid==1.0.13 # via # -r requirements/base.txt # django-oauth2-provider -simplejson==3.19.3 +simplejson==3.19.2 # via # -r requirements/base.txt # xblock @@ -618,16 +510,17 @@ six==1.16.0 # via # -r requirements/base.txt # edx-ccx-keys - # edx-django-release-util # edx-drf-extensions - # edx-milestones # eox-core # eox-theming # event-tracking # fs - # html5lib # pyjwkest # python-dateutil +slumber==0.7.1 + # via + # -r requirements/base.txt + # edx-rest-api-client social-auth-app-django==5.4.2 # via -r requirements/base.txt social-auth-core==4.5.4 @@ -643,7 +536,7 @@ sqlparse==0.5.1 # via # -r requirements/base.txt # django -stevedore==5.3.0 +stevedore==5.2.0 # via # -r requirements/base.txt # code-annotations @@ -657,7 +550,7 @@ text-unidecode==1.3 # python-slugify tincan==1.0.0 # via -r requirements/base.txt -tomli==2.0.2 +tomli==2.0.1 # via pylint tomlkit==0.13.2 # via pylint @@ -671,19 +564,17 @@ typing-extensions==4.12.2 # jwcrypto # pydantic # pydantic-core -tzdata==2024.2 +tzdata==2024.1 # via # -r requirements/base.txt # celery - # kombu uritemplate==4.1.1 # via # -r requirements/base.txt # drf-yasg -urllib3==2.2.3 +urllib3==2.2.2 # via # -r requirements/base.txt - # botocore # requests vine==5.1.0 # via @@ -691,10 +582,6 @@ vine==5.1.0 # amqp # celery # kombu -voluptuous==0.15.2 - # via - # -r requirements/base.txt - # ora2 wcwidth==0.2.13 # via # -r requirements/base.txt @@ -703,20 +590,14 @@ web-fragments==2.2.0 # via # -r requirements/base.txt # xblock -webencodings==0.5.1 - # via - # -r requirements/base.txt - # bleach - # html5lib -webob==1.8.9 +webob==1.8.8 # via # -r requirements/base.txt # xblock -xblock==5.1.0 +xblock==5.0.0 # via # -r requirements/base.txt # edx-when - # ora2 xmltodict==0.13.0 # via -r requirements/base.txt diff --git a/requirements/tox.txt b/requirements/tox.txt index 1ceb42ec..db44d594 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -10,7 +10,7 @@ chardet==5.2.0 # via tox colorama==0.4.6 # via tox -distlib==0.3.9 +distlib==0.3.8 # via virtualenv filelock==3.16.1 # via @@ -32,9 +32,9 @@ tomli==2.0.2 # via # pyproject-api # tox -tox==4.23.2 +tox==4.21.2 # via -r requirements/tox.in typing-extensions==4.12.2 # via tox -virtualenv==20.27.1 +virtualenv==20.26.6 # via tox From 2d14a9e02fdb37f942700228ca309e5059f01907 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Thu, 31 Oct 2024 18:30:45 -0500 Subject: [PATCH 4/9] fix: import eox_support hack --- eox_nelp/admin/user.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py index 31aa3ce2..1faa6473 100644 --- a/eox_nelp/admin/user.py +++ b/eox_nelp/admin/user.py @@ -1,5 +1,16 @@ +""" +This module defines the Django admin configuration for handling user model. + +Classes: + NelpUserAdmin: Custom admin class for User model to include extra info fields like national_id. +""" from django.contrib.auth import get_user_model -from eox_support.admin.user import SupportUserAdmin +from django.contrib.auth.admin import UserAdmin as BaseUserAdmin + +try: + from eox_support.admin.user import SupportUserAdmin +except ImportError: + SupportUserAdmin = BaseUserAdmin from eox_nelp.admin.register_admin_model import register_admin_model as register @@ -8,13 +19,13 @@ class NelpUserAdmin(SupportUserAdmin): """EoxNelp User admin class.""" - list_display = ('user_national_id',) + SupportUserAdmin.list_display search_fields = SupportUserAdmin.search_fields + ('extrainfo__national_id',) fieldsets = SupportUserAdmin.fieldsets + ( ('Extra info Fields', {'fields': ('user_national_id',)}), ) readonly_fields = SupportUserAdmin.readonly_fields + ('user_national_id',) + def user_national_id(self, instance): """Return national_id associated with the user extra_info instance.""" if getattr(instance, "extrainfo", None): From 3cf0e55f8add45d19045c784981ab420935c55dd Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Fri, 1 Nov 2024 10:40:45 -0500 Subject: [PATCH 5/9] fix: studio doesnt have eox-support entrypoint --- eox_nelp/admin/user.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py index 1faa6473..6ffec9c8 100644 --- a/eox_nelp/admin/user.py +++ b/eox_nelp/admin/user.py @@ -4,16 +4,20 @@ Classes: NelpUserAdmin: Custom admin class for User model to include extra info fields like national_id. """ +from importlib import import_module +from importlib.util import find_spec + +from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin as BaseUserAdmin -try: - from eox_support.admin.user import SupportUserAdmin -except ImportError: - SupportUserAdmin = BaseUserAdmin - from eox_nelp.admin.register_admin_model import register_admin_model as register +if find_spec('eox_support') and 'eox_support.apps.EoxSupportConfig' in settings.INSTALLED_APPS: + SupportUserAdmin = import_module("eox_support.admin.user").SupportUserAdmin +else: + SupportUserAdmin = BaseUserAdmin + User = get_user_model() @@ -34,4 +38,5 @@ def user_national_id(self, instance): return None -register(User, NelpUserAdmin) +if find_spec('eox_support') and 'eox_support.apps.EoxSupportConfig' in settings.INSTALLED_APPS: + register(User, NelpUserAdmin) From 1e82de4fab58ca7d13a3d1799044039939155fe1 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Fri, 1 Nov 2024 11:46:27 -0500 Subject: [PATCH 6/9] feat: add national_id in third pos in list_display --- eox_nelp/admin/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py index 6ffec9c8..4c373583 100644 --- a/eox_nelp/admin/user.py +++ b/eox_nelp/admin/user.py @@ -23,7 +23,7 @@ class NelpUserAdmin(SupportUserAdmin): """EoxNelp User admin class.""" - list_display = ('user_national_id',) + SupportUserAdmin.list_display + list_display = SupportUserAdmin.list_display[:2] + ('user_national_id',) + SupportUserAdmin.list_display[2:] search_fields = SupportUserAdmin.search_fields + ('extrainfo__national_id',) fieldsets = SupportUserAdmin.fieldsets + ( ('Extra info Fields', {'fields': ('user_national_id',)}), From 29e71e5236e53577a5158b9f2f45af7149c883cd Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Tue, 5 Nov 2024 11:47:48 -0500 Subject: [PATCH 7/9] feat: extrainfo inline option --- eox_nelp/admin/user.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py index 4c373583..120b8792 100644 --- a/eox_nelp/admin/user.py +++ b/eox_nelp/admin/user.py @@ -7,7 +7,9 @@ from importlib import import_module from importlib.util import find_spec +from custom_reg_form.models import ExtraInfo from django.conf import settings +from django.contrib.admin import StackedInline from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin as BaseUserAdmin @@ -20,14 +22,18 @@ User = get_user_model() +class UserExtraInfoInline(StackedInline): + """ Inline admin interface for Extra Info model. """ + model = ExtraInfo + can_delete = False + verbose_name_plural = ('Extra info') + class NelpUserAdmin(SupportUserAdmin): """EoxNelp User admin class.""" list_display = SupportUserAdmin.list_display[:2] + ('user_national_id',) + SupportUserAdmin.list_display[2:] search_fields = SupportUserAdmin.search_fields + ('extrainfo__national_id',) - fieldsets = SupportUserAdmin.fieldsets + ( - ('Extra info Fields', {'fields': ('user_national_id',)}), - ) + inlines = SupportUserAdmin.inlines + (UserExtraInfoInline,) readonly_fields = SupportUserAdmin.readonly_fields + ('user_national_id',) def user_national_id(self, instance): From 606b4eb9144893ad52f724ab9d8f1324a17f877f Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Tue, 5 Nov 2024 12:07:28 -0500 Subject: [PATCH 8/9] feat: load user admin if possible in init file --- eox_nelp/admin/__init__.py | 8 +++++++- eox_nelp/admin/user.py | 18 ++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eox_nelp/admin/__init__.py b/eox_nelp/admin/__init__.py index d3eadb21..421620f5 100644 --- a/eox_nelp/admin/__init__.py +++ b/eox_nelp/admin/__init__.py @@ -1,11 +1,17 @@ """General admin module file. Register all the nelp admin models. """ +from importlib.util import find_spec + +from django.conf import settings + from eox_nelp.admin.certificates import * # noqa: F401 from eox_nelp.admin.course_creators import * # noqa: F401 from eox_nelp.admin.student import * # noqa: F401 -from eox_nelp.admin.user import * # noqa: F401 from eox_nelp.course_experience.admin import * # noqa: F401 from eox_nelp.notifications.admin import * # noqa: F401 from eox_nelp.payment_notifications.admin import * # noqa: F401 from eox_nelp.pearson_vue.admin import * # noqa: F401 + +if find_spec('eox_support') and 'eox_support.apps.EoxSupportConfig' in settings.INSTALLED_APPS: + from eox_nelp.admin.user import * # noqa: F401 diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py index 120b8792..e1d0088c 100644 --- a/eox_nelp/admin/user.py +++ b/eox_nelp/admin/user.py @@ -3,30 +3,25 @@ Classes: NelpUserAdmin: Custom admin class for User model to include extra info fields like national_id. + UserExtraInfoInline: inline for extra info model """ -from importlib import import_module -from importlib.util import find_spec + from custom_reg_form.models import ExtraInfo -from django.conf import settings from django.contrib.admin import StackedInline from django.contrib.auth import get_user_model -from django.contrib.auth.admin import UserAdmin as BaseUserAdmin +from eox_support.admin.user import SupportUserAdmin # pylint: disable=import-error from eox_nelp.admin.register_admin_model import register_admin_model as register -if find_spec('eox_support') and 'eox_support.apps.EoxSupportConfig' in settings.INSTALLED_APPS: - SupportUserAdmin = import_module("eox_support.admin.user").SupportUserAdmin -else: - SupportUserAdmin = BaseUserAdmin - User = get_user_model() + class UserExtraInfoInline(StackedInline): """ Inline admin interface for Extra Info model. """ model = ExtraInfo can_delete = False - verbose_name_plural = ('Extra info') + verbose_name_plural = 'Extra info' class NelpUserAdmin(SupportUserAdmin): @@ -44,5 +39,4 @@ def user_national_id(self, instance): return None -if find_spec('eox_support') and 'eox_support.apps.EoxSupportConfig' in settings.INSTALLED_APPS: - register(User, NelpUserAdmin) +register(User, NelpUserAdmin) From 00bfa5be88934a415e842a9df0718f3e732b6792 Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Tue, 5 Nov 2024 15:46:42 -0500 Subject: [PATCH 9/9] feat: add testing options --- eox_nelp/admin/tests/__init__.py | 38 ++++++++++++++++++++++++++++++++ eox_nelp/admin/user.py | 1 - 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/eox_nelp/admin/tests/__init__.py b/eox_nelp/admin/tests/__init__.py index d7c79aff..2b2a03f0 100644 --- a/eox_nelp/admin/tests/__init__.py +++ b/eox_nelp/admin/tests/__init__.py @@ -8,6 +8,8 @@ from unittest.mock import MagicMock, patch from ddt import data, ddt, unpack +from django.contrib import admin +from django.contrib.auth import get_user_model from django.test import RequestFactory, TestCase, override_settings from eox_nelp.admin import ( @@ -19,6 +21,8 @@ pearson_update_ead_action, ) +User = get_user_model() + @ddt class TestPearsonAction(TestCase): @@ -149,3 +153,37 @@ def test_actions(self, admin_action): - pearson_real_time_action method is in model actions. """ self.assertIn(admin_action, self.modeladmin.actions) + + +class TestNelpUserAdmin(TestCase): + """ + Unit tests for the NelpUserAdmin class. + """ + + def test_load_module(self): + """ + Test loading module of NelpUserAdmin when eox_support condition is bypassed. + + Expected behavior: + - Test NelpUserAdmin is loaded in the user model key of admin registry. + - user_national_id is in list_display + - UserExtraInfoInline in inlines + """ + class ProtoAdminUserSupportModule: + """Proto class to simulate module""" + class SupportUserAdmin(admin.ModelAdmin): + """Base User Model admin for testing purposes. With empty tuple to add the nelp values""" + list_display = ((),) + search_fields = ((),) + inlines = ((),) + readonly_fields = ((),) + + with patch.dict("sys.modules", {"eox_support.admin.user": ProtoAdminUserSupportModule}): + from eox_nelp.admin.user import ( # pylint: disable=import-outside-toplevel + NelpUserAdmin, + UserExtraInfoInline, + ) + + self.assertIsInstance(admin.site._registry[User], NelpUserAdmin) # pylint: disable=protected-access + self.assertIn("user_national_id", NelpUserAdmin.list_display) + self.assertIn(UserExtraInfoInline, NelpUserAdmin.inlines) diff --git a/eox_nelp/admin/user.py b/eox_nelp/admin/user.py index e1d0088c..cef37fca 100644 --- a/eox_nelp/admin/user.py +++ b/eox_nelp/admin/user.py @@ -29,7 +29,6 @@ class NelpUserAdmin(SupportUserAdmin): list_display = SupportUserAdmin.list_display[:2] + ('user_national_id',) + SupportUserAdmin.list_display[2:] search_fields = SupportUserAdmin.search_fields + ('extrainfo__national_id',) inlines = SupportUserAdmin.inlines + (UserExtraInfoInline,) - readonly_fields = SupportUserAdmin.readonly_fields + ('user_national_id',) def user_national_id(self, instance): """Return national_id associated with the user extra_info instance."""