diff --git a/lms/djangoapps/learner_recommendations/utils.py b/lms/djangoapps/learner_recommendations/utils.py index dee5e1c3ac1f..efcb4edbf062 100644 --- a/lms/djangoapps/learner_recommendations/utils.py +++ b/lms/djangoapps/learner_recommendations/utils.py @@ -4,7 +4,10 @@ import logging import requests -from algoliasearch.search_client import SearchClient +try: + from algoliasearch.search_client import SearchClient +except ImportError: + SearchClient = None from django.conf import settings from common.djangoapps.student.models import CourseEnrollment @@ -31,6 +34,8 @@ class AlgoliaClient: @classmethod def get_algolia_client(cls): """ Get Algolia client instance. """ + if not SearchClient: + return None if not cls.algolia_client: if not (cls.algolia_app_id and cls.algolia_search_api_key): return None diff --git a/lms/djangoapps/utils.py b/lms/djangoapps/utils.py index cef65f1ee65d..23245e9286bd 100644 --- a/lms/djangoapps/utils.py +++ b/lms/djangoapps/utils.py @@ -2,10 +2,17 @@ Helper Methods """ -from braze.client import BrazeClient +try: + from braze.client import BrazeClient +except ImportError: + BrazeClient = None from django.conf import settings -from optimizely import optimizely -from optimizely.config_manager import PollingConfigManager +try: + from optimizely import optimizely + from optimizely.config_manager import PollingConfigManager +except ImportError: + optimizely = None + PollingConfigManager = None def _get_key(key_or_id, key_cls): @@ -22,6 +29,9 @@ def _get_key(key_or_id, key_cls): def get_braze_client(): """ Returns a Braze client. """ + if not BrazeClient: + return None + braze_api_key = settings.EDX_BRAZE_API_KEY braze_api_url = settings.EDX_BRAZE_API_SERVER @@ -41,6 +51,8 @@ class OptimizelyClient: @classmethod def get_optimizely_client(cls): + if not optimizely: + return None if not cls.optimizely_client: optimizely_sdk_key = settings.OPTIMIZELY_FULLSTACK_SDK_KEY if not optimizely_sdk_key: diff --git a/requirements/edx/base.in b/requirements/edx/base.in index c2cc276f0c6a..de968171d03f 100644 --- a/requirements/edx/base.in +++ b/requirements/edx/base.in @@ -1,191 +1,2 @@ -# Core dependencies for running edx-platform (LMS or Studio) -# -# DON'T JUST ADD NEW DEPENDENCIES!!! -# -# If you open a pull request that adds a new dependency, you should: -# * verify that the dependency has a license compatible with AGPLv3 -# * confirm that it has no system requirements beyond what we already install -# * run "make upgrade" to update the detailed requirements files -# - --c ../constraints.txt - --r github.in # Forks and other dependencies not yet on PyPI --r paver.txt # Requirements for running paver commands - -# Please follow these guidelines whenever you change this file: -# -# 1. When adding a new dependency, add a comment to the end of the line -# explaining why it is needed. -# 2. Do not pin exact versions unless absolutely necessary. When upgrading -# an already-pinned package to its latest release, remove the version pin. -# 3. Do not add indirect dependencies unless a version constraint is needed to -# avoid versions which have known problems. -# 4. If the package is not needed in production, add it to another file such -# as development.in or testing.in instead. - -acid-xblock -algoliasearch # Algolia’s API client for indexed searching -analytics-python # Used for Segment analytics -attrs # Reduces boilerplate code involving class attributes -Babel # Internationalization utilities, used for date formatting in a few places -bleach[css] # Allowed-list-based HTML sanitizing library that escapes or strips markup and attributes; used for capa and LTI -boto # Deprecated version of the AWS SDK; we should stop using this -boto3 # Amazon Web Services SDK for Python -botocore # via boto3, s3transfer -bridgekeeper # Used for determining permissions for courseware. -celery # Asynchronous task execution library -chem # A helper library for chemistry calculations -codejail-includes # CodeJail manages execution of untrusted code in secure sandboxes. -contextlib2 # We need contextlib2.ExitStack so we can stop using contextlib.nested which doesn't exist in python 3 -crowdsourcehinter-xblock -cryptography # Implementations of assorted cryptography algorithms -defusedxml -Django # Web application framework -django-appconf -django-celery-results # Only used for the CacheBackend for celery results -django-config-models # Configuration models for Django allowing config management with auditing -django-cors-headers # Used to allow to configure CORS headers for cross-domain requests -django-countries # Country data for Django forms and model fields -django-crum # Middleware that stores the current request and user in thread local storage -django-fernet-fields # via edx-enterprise (should be added to its setup.py) -django-filter # Allows users to filter Django querysets dynamically -django-ipware # Get the client's real IP address -django-method-override # Allow use of HTTP methods normally not supported by browsers via the X-HTTP-Method-Override header -django-model-utils -django-mptt -django-mysql -django-oauth-toolkit # Provides oAuth2 capabilities for Django -django-pipeline -django-ratelimit -django-sekizai -django-ses -django-simple-history -django-splash -django-statici18n -django-storages -django-user-tasks -django-waffle -django-webpack-loader # Used to wire webpack bundles into the django asset pipeline -djangorestframework -docopt -done-xblock -edx-ace -edx-api-doc-tools -edx-auth-backends # Allow Studio to use LMS SSO -edx-braze-client -edx-bulk-grades # LMS REST API for managing bulk grading operations -edx-ccx-keys -edx-celeryutils -edx-completion -edx-django-release-util # Release utils for the edx release pipeline -edx-django-sites-extensions -edx-codejail -# edx-django-utils 5.4.0 adds CSP middleware -edx-django-utils>=5.4.0 # Utilities for cache, monitoring, and plugins -edx-drf-extensions -edx-enterprise -# edx-event-bus-kafka 4.0.0 adds support for configurable consumer API -edx-event-bus-kafka>=4.0.1 # Kafka implementation of event bus -edx-event-bus-redis -edx-milestones -edx-name-affirmation -edx-opaque-keys -edx-organizations -edx-proctoring>=2.0.1 -edx-proctoring-proctortrack==1.0.5 # Intentionally and permanently pinned to ensure code changes are reviewed -edx-rest-api-client -edx-search -edx-sga -edx-submissions -edx-toggles # Feature toggles management -edx-token-utils # Validate exam access tokens -edx-user-state-client -edx-when -edxval -event-tracking -enmerkar-underscore # Implements a underscore extractor for django-babel. -fs -fs-s3fs==0.1.8 -geoip2 # Python API for the GeoIP web services and databases -glob2 # Enhanced glob module, used in openedx.core.lib.rooted_paths -gunicorn -help-tokens -html5lib # HTML parser, used for capa problems -icalendar # .ics generator, used by calendar_sync -ipaddress # Ip network support for Embargo feature -jsonfield # Django model field for validated JSON; used in several apps -laboratory # Library for testing that code refactors/infrastructure changes produce identical results -lxml # XML parser -learner-pathway-progress # A plugin for lms to track learners progress in pathays -lti-consumer-xblock>=7.3.0 -mailsnake # Needed for mailchimp (mailing djangoapp) -mako # Primary template language used for server-side page rendering -Markdown # Convert text markup to HTML; used in capa problems, forums, and course wikis -mongoengine # Object-document mapper for MongoDB, used in the LMS dashboard -mysqlclient # Driver for the default production relational database -newrelic # New Relic agent for performance monitoring -nltk # Natural language processing; used by the chem package -nodeenv # Utility for managing Node.js environments; we use this for deployments and testing -oauthlib # OAuth specification support for authenticating via LTI or other Open edX services -olxcleaner -openedx-calc # Library supporting mathematical calculations for Open edX -openedx-django-require -# openedx-events 3.1.0 introduces producer API -openedx-events>=3.1.0 # Open edX Events from Hooks Extension Framework (OEP-50) -openedx-filters # Open edX Filters from Hooks Extension Framework (OEP-50) -openedx-mongodbproxy -optimizely-sdk # Optimizely full stack SDK for Python -ora2>=4.5.0 -outcome-surveys # edx-platform plugin to send and track segment events needed for surveys -openedx-django-wiki -openedx-blockstore -path -piexif # Exif image metadata manipulation, used in the profile_images app -Pillow # Image manipulation library; used for course assets, profile images, invoice PDFs, etc. -py2neo # Driver for converting Python modulestore structures to Neo4j's schema (for Coursegraph). -pycountry -pycryptodomex -pygments # Used to support colors in paver command output -pyjwkest -# TODO Replace PyJWT usage with pyjwkest -# PyJWT 1.6.3 contains PyJWTError, which is required by Apple auth in social-auth-core -PyJWT>=1.6.3 -pylti1p3 # Required by content_libraries core library to support LTI 1.3 launches -pymongo # MongoDB driver -pynliner # Inlines CSS styles into HTML for email notifications -python-dateutil -python-Levenshtein -python3-openid ; python_version>='3' -python3-saml -pyuca # For more accurate sorting of translated country names in django-countries -pysrt # Support for SubRip subtitle files, used in the video XModule -pytz # Time zone information database -PyYAML # Used to parse XModule resource templates -recommender-xblock # https://github.com/edx/RecommenderXBlock -redis # celery task broker -requests-oauthlib # Simplifies use of OAuth via the requests library, used for CCX and LTI -random2 -rules # Django extension for rules-based authorization checks -social-auth-core -simplejson -Shapely # Geometry library, used for image click regions in capa -six # Utilities for supporting Python 2 & 3 in the same codebase -skill-tagging # Library needed to support tagging of skills in unit/video xblocks via forms -social-auth-app-django -sorl-thumbnail -sortedcontainers # Provides SortedKeyList, used for lists of XBlock assets -sqlparse # Required by Django to run migrations.RunSQL -stevedore # Support for runtime plugins, used for XBlocks and edx-platform Django app plugins -staff-graded-xblock # An XBlock that allows for off-site bulk scoring of problems -super-csv # Generic CSV processor -unicodecsv # Easier support for CSV files with unicode text -user-util # Functionality for retiring users (GDPR compliance) -webob -web-fragments # Provides the ability to render fragments of web pages -XBlock[django] # Courseware component architecture -xblock-utils # Provides utilities used by the Discussion XBlock -xss-utils # https://github.com/edx/edx-platform/pull/20633 Fix XSS via Translations -xblock-poll # Xblock for polling users -xblock-drag-and-drop-v2 # Drag and Drop XBlock -xblock-google-drive # XBlock for google docs and calendar +-r kernel.in # Core dependencies required for the platform to run. +-r bundled.in # Additional packages usually bundled with the platform diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index a0a2634e2cf2..648a149aae46 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -5,7 +5,7 @@ # make upgrade # acid-xblock==0.2.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in aiohttp==3.8.4 # via geoip2 aiosignal==1.3.1 @@ -13,11 +13,11 @@ aiosignal==1.3.1 algoliasearch==2.6.3 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/bundled.in amqp==5.1.1 # via kombu analytics-python==1.4.post1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in aniso8601==9.0.1 # via edx-tincan-py35 appdirs==1.4.4 @@ -36,7 +36,7 @@ async-timeout==4.0.2 # redis attrs==23.1.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # aiohttp # edx-ace # jsonschema @@ -46,7 +46,7 @@ attrs==23.1.0 babel==2.11.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # enmerkar # enmerkar-underscore backoff==1.10.0 @@ -59,7 +59,7 @@ billiard==3.6.4.0 # via celery bleach[css]==6.0.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # lti-consumer-xblock # openedx-django-wiki @@ -69,26 +69,26 @@ bleach[css]==6.0.0 boto==2.39.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in boto3==1.7.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-ses # fs-s3fs # ora2 botocore==1.10.84 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # boto3 # s3transfer bridgekeeper==0.9 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in celery==5.2.7 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-celery-results # django-user-tasks # edx-celeryutils @@ -116,7 +116,7 @@ charset-normalizer==2.0.12 # requests # snowflake-connector-python chem==1.2.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in click==8.1.3 # via # -c requirements/edx/../constraints.txt @@ -139,9 +139,7 @@ code-annotations==1.3.0 # edx-enterprise # edx-toggles codejail-includes==1.0.0 - # via -r requirements/edx/base.in -contextlib2==21.6.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in coreapi==2.3.3 # via drf-yasg coreschema==0.0.4 @@ -149,11 +147,11 @@ coreschema==0.0.4 # coreapi # drf-yasg crowdsourcehinter-xblock==0.6 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in cryptography==38.0.4 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-fernet-fields # djfernet # edx-enterprise @@ -168,7 +166,7 @@ cssutils==2.7.1 # via pynliner defusedxml==0.7.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # djangorestframework-xml # ora2 # python3-openid @@ -179,7 +177,7 @@ deprecated==1.2.14 django==3.2.19 # via # -c requirements/edx/../common_constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-appconf # django-celery-results # django-classy-tags @@ -247,30 +245,28 @@ django==3.2.19 # super-csv # xss-utils django-appconf==1.0.5 - # via - # -r requirements/edx/base.in - # django-statici18n + # via django-statici18n django-cache-memoize==0.1.10 # via edx-enterprise django-celery-results==2.5.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-classy-tags==4.0.0 # via django-sekizai django-config-models==2.3.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # edx-name-affirmation # lti-consumer-xblock django-cors-headers==4.1.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-countries==7.5.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise django-crum==0.7.9 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-django-utils # edx-enterprise # edx-proctoring @@ -280,12 +276,10 @@ django-crum==0.7.9 django-environ==0.10.0 # via openedx-blockstore django-fernet-fields==0.6 - # via - # -r requirements/edx/base.in - # edx-enterprise + # via edx-enterprise django-filter==23.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # learner-pathway-progress # lti-consumer-xblock @@ -293,16 +287,16 @@ django-filter==23.2 django-ipware==4.0.2 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # edx-proctoring django-js-asset==2.0.0 # via django-mptt django-method-override==1.0.4 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-model-utils==4.3.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-user-tasks # edx-bulk-grades # edx-celeryutils @@ -323,32 +317,32 @@ django-model-utils==4.3.1 # super-csv django-mptt==0.14.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-django-wiki django-multi-email-field==0.6.2 # via edx-enterprise django-mysql==4.10.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-oauth-toolkit==1.3.2 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in django-object-actions==4.1.0 # via edx-enterprise django-pipeline==2.1.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-ratelimit==4.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-sekizai==4.1.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-django-wiki django-ses==3.5.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in django-simple-history==3.0.0 # via # -c requirements/edx/../common_constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # edx-name-affirmation # edx-organizations @@ -356,22 +350,22 @@ django-simple-history==3.0.0 # learner-pathway-progress # ora2 django-splash==1.3.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-statici18n==2.3.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # lti-consumer-xblock # xblock-drag-and-drop-v2 django-storages==1.9.1 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edxval django-user-tasks==3.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in django-waffle==3.0.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-django-utils # edx-drf-extensions # edx-enterprise @@ -381,12 +375,12 @@ django-waffle==3.0.0 django-webpack-loader==0.7.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-proctoring djangorestframework==3.13.1 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-config-models # django-user-tasks # drf-jwt @@ -408,14 +402,12 @@ djangorestframework-xml==2.0.0 # via edx-enterprise djfernet==0.8.1 # via edxval -docopt==0.6.2 - # via -r requirements/edx/base.in docutils==0.19 # via # -c requirements/edx/../constraints.txt # botocore done-xblock==2.0.5 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in drf-jwt==1.19.2 # via edx-drf-extensions drf-nested-routers==0.93.4 @@ -425,43 +417,43 @@ drf-yasg==1.21.5 # -c requirements/edx/../constraints.txt # edx-api-doc-tools edx-ace==1.6.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-api-doc-tools==1.6.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-name-affirmation # openedx-blockstore edx-auth-backends==4.1.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-blockstore edx-braze-client==0.1.6 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in edx-bulk-grades==1.0.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # staff-graded-xblock edx-ccx-keys==1.2.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-celeryutils==1.2.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-name-affirmation # super-csv edx-codejail==3.3.3 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-completion==4.2.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-django-release-util==1.2.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edxval # openedx-blockstore edx-django-sites-extensions==4.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-django-utils==5.5.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-config-models # edx-drf-extensions # edx-enterprise @@ -479,7 +471,7 @@ edx-django-utils==5.5.0 # super-csv edx-drf-extensions==8.8.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-completion # edx-enterprise # edx-name-affirmation @@ -492,21 +484,21 @@ edx-drf-extensions==8.8.0 edx-enterprise==3.67.7 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # learner-pathway-progress edx-event-bus-kafka==5.1.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-event-bus-redis==0.3.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-i18n-tools==0.9.2 # via ora2 edx-milestones==0.4.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-name-affirmation==2.3.5 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-opaque-keys[django]==2.3.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # -r requirements/edx/paver.txt # edx-bulk-grades # edx-ccx-keys @@ -524,33 +516,33 @@ edx-opaque-keys[django]==2.3.0 # ora2 # outcome-surveys edx-organizations==6.11.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-proctoring==4.15.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-proctoring-proctortrack edx-proctoring-proctortrack==1.0.5 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-rbac==1.7.0 # via edx-enterprise edx-rest-api-client==5.5.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # edx-proctoring edx-search==3.5.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-sga==0.22.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in edx-submissions==3.5.6 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # ora2 edx-tincan-py35==1.0.0 # via edx-enterprise edx-toggles==5.0.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-completion # edx-event-bus-kafka # edx-event-bus-redis @@ -560,15 +552,15 @@ edx-toggles==5.0.0 # learner-pathway-progress # ora2 edx-token-utils==0.2.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-user-state-client==1.3.2 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in edx-when==2.3.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-proctoring edxval==2.3.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in elasticsearch==7.13.4 # via # -c requirements/edx/../common_constraints.txt @@ -576,10 +568,10 @@ elasticsearch==7.13.4 enmerkar==0.7.1 # via enmerkar-underscore enmerkar-underscore==2.1.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in event-tracking==2.1.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-proctoring # edx-search fastavro==1.7.4 @@ -592,30 +584,30 @@ frozenlist==1.3.3 # aiosignal fs==2.0.27 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # fs-s3fs # openedx-django-pyfs # xblock fs-s3fs==0.1.8 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-django-pyfs future==0.18.3 # via pyjwkest geoip2==4.7.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in glob2==0.7 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in gunicorn==20.1.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in help-tokens==2.2.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in html5lib==1.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # ora2 icalendar==5.0.7 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in idna==3.4 # via # -r requirements/edx/paver.txt @@ -632,7 +624,7 @@ inflection==0.5.1 interchange==2021.0.4 # via py2neo ipaddress==1.0.23 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in isodate==0.6.1 # via python3-saml itypes==1.2.0 @@ -651,7 +643,7 @@ jsondiff==2.0.0 # via edx-enterprise jsonfield==3.1.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-celeryutils # edx-enterprise # edx-proctoring @@ -669,7 +661,7 @@ kombu==5.2.4 # -c requirements/edx/../constraints.txt # celery laboratory==1.0.2 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in lazy==1.5 # via # -r requirements/edx/paver.txt @@ -678,9 +670,7 @@ lazy==1.5 # ora2 # xblock learner-pathway-progress==1.3.4 - # via -r requirements/edx/base.in -levenshtein==0.21.1 - # via python-levenshtein + # via -r requirements/edx/bundled.in libsass==0.10.0 # via # -r requirements/edx/paver.txt @@ -688,10 +678,10 @@ libsass==0.10.0 loremipsum==1.0.5 # via ora2 lti-consumer-xblock==9.5.3 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in lxml==4.9.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edxval # lti-consumer-xblock # olxcleaner @@ -700,10 +690,10 @@ lxml==4.9.2 # xblock # xmlsec mailsnake==1.6.4 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in mako==1.2.4 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # acid-xblock # lti-consumer-xblock # xblock-google-drive @@ -711,7 +701,7 @@ mako==1.2.4 markdown==3.3.7 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-django-wiki # staff-graded-xblock # xblock-poll @@ -730,7 +720,7 @@ maxminddb==2.3.0 mock==5.0.2 # via -r requirements/edx/paver.txt mongoengine==0.27.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in monotonic==1.6 # via # analytics-python @@ -743,18 +733,16 @@ multidict==6.0.4 # yarl mysqlclient==2.1.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-blockstore newrelic==8.8.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/bundled.in # edx-django-utils nltk==3.8.1 - # via - # -r requirements/edx/base.in - # chem + # via chem nodeenv==1.8.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in numpy==1.22.4 # via # chem @@ -764,44 +752,44 @@ numpy==1.22.4 oauthlib==3.0.1 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django-oauth-toolkit # lti-consumer-xblock # requests-oauthlib # social-auth-core olxcleaner==0.2.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in openedx-blockstore==1.3.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in openedx-calc==3.0.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in openedx-django-pyfs==3.3.0 # via xblock openedx-django-require==2.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in openedx-django-wiki==2.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in openedx-events==8.0.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-event-bus-kafka # edx-event-bus-redis # skill-tagging openedx-filters==1.3.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # lti-consumer-xblock # skill-tagging openedx-mongodbproxy==0.2.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in optimizely-sdk==4.1.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in ora2==5.0.3 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in oscrypto==1.3.0 # via snowflake-connector-python outcome-surveys==2.4.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in packaging==23.1 # via # drf-yasg @@ -811,7 +799,7 @@ pansi==2020.7.3 # via py2neo path==16.6.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # -r requirements/edx/paver.txt # edx-i18n-tools # path-py @@ -829,10 +817,10 @@ pbr==5.11.1 pgpy==0.6.0 # via edx-enterprise piexif==1.1.3 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in pillow==9.5.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # edx-organizations # edxval @@ -849,32 +837,32 @@ psutil==5.9.5 py2neo==2021.2.3 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/bundled.in pyasn1==0.5.0 # via pgpy pycountry==22.3.5 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in pycparser==2.21 # via cffi pycryptodomex==3.18.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-proctoring # lti-consumer-xblock # pyjwkest # snowflake-connector-python pygments==2.15.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/bundled.in # py2neo pyjwkest==1.4.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-token-utils # lti-consumer-xblock pyjwt[crypto]==2.7.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # drf-jwt # edx-auth-backends # edx-drf-extensions @@ -886,11 +874,11 @@ pyjwt[crypto]==2.7.0 pylatexenc==2.10 # via olxcleaner pylti1p3==2.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in pymongo==3.13.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # -r requirements/edx/paver.txt # edx-opaque-keys # event-tracking @@ -899,7 +887,7 @@ pymongo==3.13.0 pynacl==1.5.0 # via edx-django-utils pynliner==0.8.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in pyopenssl==22.0.0 # via # -c requirements/edx/../constraints.txt @@ -915,11 +903,11 @@ pyrsistent==0.19.3 # optimizely-sdk pysrt==1.1.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edxval python-dateutil==2.8.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # analytics-python # botocore # edx-ace @@ -930,8 +918,6 @@ python-dateutil==2.8.2 # olxcleaner # ora2 # xblock -python-levenshtein==0.21.1 - # via -r requirements/edx/base.in python-memcached==1.59 # via -r requirements/edx/paver.txt python-slugify==8.0.1 @@ -940,16 +926,16 @@ python-swiftclient==4.3.0 # via ora2 python3-openid==3.2.0 ; python_version >= "3" # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # social-auth-core python3-saml==1.9.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in pytz==2022.7.1 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # babel # celery # django @@ -972,23 +958,21 @@ pytz==2022.7.1 # snowflake-connector-python # xblock pyuca==1.2 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in pyyaml==6.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # code-annotations # edx-django-release-util # edx-i18n-tools # xblock random2==1.0.1 - # via -r requirements/edx/base.in -rapidfuzz==3.1.1 - # via levenshtein + # via -r requirements/edx/kernel.in recommender-xblock==2.0.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in redis==4.5.5 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # walrus regex==2023.6.3 # via nltk @@ -1018,7 +1002,7 @@ requests==2.31.0 # social-auth-core requests-oauthlib==1.3.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # social-auth-core ruamel-yaml==0.17.32 # via drf-yasg @@ -1026,7 +1010,7 @@ ruamel-yaml-clib==0.2.7 # via ruamel-yaml rules==3.3 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise # edx-proctoring s3transfer==0.1.13 @@ -1041,16 +1025,16 @@ scipy==1.7.3 semantic-version==2.10.0 # via edx-drf-extensions shapely==2.0.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in simplejson==3.19.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # sailthru-client # super-csv # xblock-utils six==1.16.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # -r requirements/edx/paver.txt # analytics-python # bleach @@ -1080,7 +1064,7 @@ six==1.16.0 # python-dateutil # python-memcached skill-tagging==0.1.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in slumber==0.7.1 # via # edx-bulk-grades @@ -1091,34 +1075,34 @@ snowflake-connector-python==3.0.4 social-auth-app-django==5.0.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-auth-backends social-auth-core==4.3.0 # via # -c requirements/edx/../constraints.txt - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-auth-backends # social-auth-app-django sorl-thumbnail==12.9.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # openedx-django-wiki sortedcontainers==2.4.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # snowflake-connector-python soupsieve==2.4.1 # via beautifulsoup4 sqlparse==0.4.4 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # django # openedx-blockstore staff-graded-xblock==2.0.1 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in stevedore==5.1.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # -r requirements/edx/paver.txt # code-annotations # edx-ace @@ -1126,9 +1110,7 @@ stevedore==5.1.0 # edx-enterprise # edx-opaque-keys super-csv==3.0.1 - # via - # -r requirements/edx/base.in - # edx-bulk-grades + # via edx-bulk-grades sympy==1.12 # via openedx-calc testfixtures==7.1.0 @@ -1147,7 +1129,7 @@ typing-extensions==4.6.3 # snowflake-connector-python unicodecsv==0.14.1 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-enterprise uritemplate==4.1.1 # via @@ -1162,7 +1144,7 @@ urllib3==1.26.16 # requests # snowflake-connector-python user-util==1.0.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in vine==5.0.0 # via # amqp @@ -1178,7 +1160,7 @@ wcwidth==0.2.6 # via prompt-toolkit web-fragments==2.0.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # crowdsourcehinter-xblock # edx-sga # staff-graded-xblock @@ -1191,7 +1173,7 @@ webencodings==0.5.1 # tinycss2 webob==1.8.7 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # xblock wrapt==1.15.0 # via @@ -1199,7 +1181,7 @@ wrapt==1.15.0 # deprecated xblock[django]==1.6.2 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # acid-xblock # crowdsourcehinter-xblock # done-xblock @@ -1214,14 +1196,14 @@ xblock[django]==1.6.2 # xblock-poll # xblock-utils xblock-drag-and-drop-v2==3.2.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in xblock-google-drive==0.3.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in xblock-poll==1.13.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/bundled.in xblock-utils==3.2.0 # via - # -r requirements/edx/base.in + # -r requirements/edx/kernel.in # edx-sga # lti-consumer-xblock # staff-graded-xblock @@ -1230,7 +1212,7 @@ xblock-utils==3.2.0 xmlsec==1.3.13 # via python3-saml xss-utils==0.4.0 - # via -r requirements/edx/base.in + # via -r requirements/edx/kernel.in yarl==1.9.2 # via aiohttp zipp==3.15.0 diff --git a/requirements/edx/bundled.in b/requirements/edx/bundled.in new file mode 100644 index 000000000000..11e4fe65ef45 --- /dev/null +++ b/requirements/edx/bundled.in @@ -0,0 +1,48 @@ +######################################################################################################################## +# Dependencies that are normally "bundled" with the platform, but are not core to the platform's functionality. +# They may still be installed by default, but they should not be required for +# the platform to run nor for the test suite to pass. +# +# We are working to make the test suite run without having these installed - see +# https://discuss.openedx.org/t/a-minimal-open-edx-distribution/9478 +# +# Please follow these guidelines whenever you change this file: +# +# 1. When adding a new dependency: +# * verify that the dependency has a license compatible with AGPLv3 +# * add a comment to the end of the line explaining what it is. +# * confirm that it has no system requirements beyond what we already install +# * run "make upgrade" to update the detailed requirements files +# 2. Do not pin exact versions unless absolutely necessary. When upgrading +# an already-pinned package to its latest release, remove the version pin. +# 3. Do not add indirect dependencies unless a version constraint is needed to +# avoid versions which have known problems. +# 4. If the package is not needed in production, add it to another file such +# as development.in or testing.in instead. + +py2neo # Driver for converting Python modulestore structures to Neo4j's schema (for Coursegraph). +pygments # Used to support colors in paver command output + +## Third party integrations +algoliasearch # Algolia’s API client for indexed searching +django-ses # Django email backend for Amazon’s Simple Email Service +edx-braze-client # a customer engagement platform used for edx.org +mailsnake # MailChimp API; used for two management commands in the "mailing" djangoapp +newrelic # New Relic agent for performance monitoring +optimizely-sdk # Optimizely provides A/B testing and other features, used by edx.org + +## Plugins used on edx.org +learner-pathway-progress # A plugin for lms to track learners progress in pathays +outcome-surveys # plugin "to send follow up events for learners who have passed a course" +skill-tagging # Library to support tagging of skills on edx.org in unit/video xblocks via forms + +## XBLOCKS +crowdsourcehinter-xblock +done-xblock # a very simple XBlock that allows learners to mark an activity as Done +recommender-xblock # https://github.com/edx/RecommenderXBlock +staff-graded-xblock # https://github.com/openedx/staff_graded-xblock Allows off-site bulk scoring. +edx-sga # The more well known "staff graded assignment" XBlock, from MIT. +ora2>=4.5.0 # Open Response Assessment XBlock +xblock-poll # Xblock for polling users +xblock-drag-and-drop-v2 # Drag and Drop XBlock +xblock-google-drive # XBlock for google docs and calendar diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 8f1af5a5e599..23ae7c106803 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -211,8 +211,6 @@ code-annotations==1.3.0 # edx-toggles codejail-includes==1.0.0 # via -r requirements/edx/testing.txt -contextlib2==21.6.0 - # via -r requirements/edx/testing.txt coreapi==2.3.3 # via # -r requirements/edx/testing.txt @@ -527,8 +525,6 @@ djfernet==0.8.1 # via # -r requirements/edx/testing.txt # edxval -docopt==0.6.2 - # via -r requirements/edx/testing.txt docutils==0.19 # via # -c requirements/edx/../constraints.txt @@ -913,10 +909,6 @@ lazy-object-proxy==1.9.0 # astroid learner-pathway-progress==1.3.4 # via -r requirements/edx/testing.txt -levenshtein==0.21.1 - # via - # -r requirements/edx/testing.txt - # python-levenshtein libsass==0.10.0 # via # -r requirements/edx/testing.txt @@ -1316,8 +1308,6 @@ python-dateutil==2.8.2 # olxcleaner # ora2 # xblock -python-levenshtein==0.21.1 - # via -r requirements/edx/testing.txt python-memcached==1.59 # via -r requirements/edx/testing.txt python-slugify==8.0.1 @@ -1375,10 +1365,6 @@ pyyaml==6.0 # xblock random2==1.0.1 # via -r requirements/edx/testing.txt -rapidfuzz==3.1.1 - # via - # -r requirements/edx/testing.txt - # levenshtein recommender-xblock==2.0.1 # via -r requirements/edx/testing.txt redis==4.5.5 diff --git a/requirements/edx/github.in b/requirements/edx/github.in index 2b4e75f5222c..d36b6f96291b 100644 --- a/requirements/edx/github.in +++ b/requirements/edx/github.in @@ -1,5 +1,5 @@ # This file holds all GitHub-hosted edx-platform Python dependencies. -# Such dependencies should be added here, not to base.in. +# Such dependencies should be added here, not to kernel.in. # That being said.... # # ---->>> DON'T JUST ADD NEW DEPENDENCIES!!! <<<---- @@ -15,7 +15,7 @@ # * Go to https://github.com/openedx//actions/new # * Find "Publish Python Package" # * Merge the generated PR and push package. -# * You're done! Add your dependency to base.in, and the requirements +# * You're done! Add your dependency to kernel.in, and the requirements # bot will automatically keep it fresh in edx-platform. # # If you think you must add a URL to this file, read this section of OEP-18 first: diff --git a/requirements/edx/kernel.in b/requirements/edx/kernel.in new file mode 100644 index 000000000000..6a4cd5bc7675 --- /dev/null +++ b/requirements/edx/kernel.in @@ -0,0 +1,160 @@ +# Core dependencies for running edx-platform (LMS or Studio) + +-c ../constraints.txt + +-r github.in # Forks and other dependencies not yet on PyPI +-r paver.txt # Requirements for running paver commands + +# DON'T JUST ADD NEW DEPENDENCIES!!! +# Please follow these guidelines whenever you change this file: +# +# 1. When adding a new dependency: +# * add a comment to the end of the line explaining why it is needed. +# * verify that the dependency has a license compatible with AGPLv3 +# * confirm that it has no system requirements beyond what we already install +# * run "make upgrade" to update the detailed requirements files +# 2. Do not pin exact versions unless absolutely necessary. When upgrading +# an already-pinned package to its latest release, remove the version pin. +# 3. Do not add indirect dependencies unless a version constraint is needed to +# avoid versions which have known problems. +# 4. If the package is not strictly necessary for the platform to run, add it to +# another file such as bundled.in, development.in, or testing.in instead. + +acid-xblock # This XBlock is used for unit tests as well as manual tests +analytics-python # Used for Segment analytics +attrs # Reduces boilerplate code involving class attributes +Babel # Internationalization utilities, used for date formatting in a few places +bleach[css] # Allowed-list-based HTML sanitizing library that escapes or strips markup and attributes; used for capa and LTI +boto # Deprecated version of the AWS SDK; we should stop using this +boto3 # Amazon Web Services SDK for Python +botocore # via boto3, s3transfer +bridgekeeper # Used for determining permissions for courseware. Use of django-rules is preferred. +celery # Asynchronous task execution library +chem # A helper library for chemistry calculations +codejail-includes # CodeJail manages execution of untrusted code in secure sandboxes. +cryptography # Implementations of assorted cryptography algorithms +defusedxml +Django # Web application framework +django-celery-results # Only used for the CacheBackend for celery results +django-config-models # Configuration models for Django allowing config management with auditing +django-cors-headers # Used to allow to configure CORS headers for cross-domain requests +django-countries # Country data for Django forms and model fields +django-crum # Middleware that stores the current request and user in thread local storage +django-filter # Allows users to filter Django querysets dynamically +django-ipware # Get the client's real IP address +django-method-override # Allow use of HTTP methods normally not supported by browsers via the X-HTTP-Method-Override header +django-model-utils +django-mptt +django-mysql +django-oauth-toolkit # Provides oAuth2 capabilities for Django +django-pipeline +django-ratelimit +django-sekizai +django-simple-history +django-splash +django-statici18n +django-storages +django-user-tasks +django-waffle +django-webpack-loader # Used to wire webpack bundles into the django asset pipeline +djangorestframework +edx-ace +edx-api-doc-tools +edx-auth-backends # Allow Studio to use LMS SSO +edx-bulk-grades # LMS REST API for managing bulk grading operations +edx-ccx-keys +edx-celeryutils +edx-completion +edx-django-release-util # Release utils for the edx release pipeline +edx-django-sites-extensions +edx-codejail +# edx-django-utils 5.4.0 adds CSP middleware +edx-django-utils>=5.4.0 # Utilities for cache, monitoring, and plugins +edx-drf-extensions +edx-enterprise +# edx-event-bus-kafka 4.0.0 adds support for configurable consumer API +edx-event-bus-kafka>=4.0.1 # Kafka implementation of event bus +edx-event-bus-redis +edx-milestones +edx-name-affirmation +edx-opaque-keys +edx-organizations +edx-proctoring>=2.0.1 +edx-proctoring-proctortrack==1.0.5 # Intentionally and permanently pinned to ensure code changes are reviewed +edx-rest-api-client +edx-search +edx-submissions +edx-toggles # Feature toggles management +edx-token-utils # Validate exam access tokens +edx-user-state-client +edx-when +edxval +event-tracking +enmerkar-underscore # Implements a underscore extractor for django-babel. +fs +fs-s3fs==0.1.8 +geoip2 # Python API for the GeoIP web services and databases +glob2 # Enhanced glob module, used in openedx.core.lib.rooted_paths +gunicorn +help-tokens +html5lib # HTML parser, used for capa problems +icalendar # .ics generator, used by calendar_sync +ipaddress # Ip network support for Embargo feature +jsonfield # Django model field for validated JSON; used in several apps +laboratory # Library for testing that code refactors/infrastructure changes produce identical results +lxml # XML parser +lti-consumer-xblock>=7.3.0 +mako # Primary template language used for server-side page rendering +Markdown # Convert text markup to HTML; used in capa problems, forums, and course wikis +mongoengine # Object-document mapper for MongoDB, used in the LMS dashboard +mysqlclient # Driver for the default production relational database +nodeenv # Utility for managing Node.js environments; we use this for deployments and testing +oauthlib # OAuth specification support for authenticating via LTI or other Open edX services +olxcleaner +openedx-calc # Library supporting mathematical calculations for Open edX +openedx-django-require +# openedx-events 3.1.0 introduces producer API +openedx-events>=3.1.0 # Open edX Events from Hooks Extension Framework (OEP-50) +openedx-filters # Open edX Filters from Hooks Extension Framework (OEP-50) +openedx-mongodbproxy +openedx-django-wiki +openedx-blockstore +path +piexif # Exif image metadata manipulation, used in the profile_images app +Pillow # Image manipulation library; used for course assets, profile images, invoice PDFs, etc. +pycountry +pycryptodomex +pyjwkest +# TODO Replace PyJWT usage with pyjwkest +# PyJWT 1.6.3 contains PyJWTError, which is required by Apple auth in social-auth-core +PyJWT>=1.6.3 +pylti1p3 # Required by content_libraries core library to support LTI 1.3 launches +pymongo # MongoDB driver +pynliner # Inlines CSS styles into HTML for email notifications +python-dateutil +python3-openid ; python_version>='3' +python3-saml +pyuca # For more accurate sorting of translated country names in django-countries +pysrt # Support for SubRip subtitle files, used in the video XModule +pytz # Time zone information database +PyYAML # Used to parse XModule resource templates +redis # celery task broker +requests-oauthlib # Simplifies use of OAuth via the requests library, used for CCX and LTI +random2 +rules # Django extension for rules-based authorization checks +social-auth-core +simplejson +Shapely # Geometry library, used for image click regions in capa +six # Utilities for supporting Python 2 & 3 in the same codebase +social-auth-app-django +sorl-thumbnail +sortedcontainers # Provides SortedKeyList, used for lists of XBlock assets +sqlparse # Required by Django to run migrations.RunSQL +stevedore # Support for runtime plugins, used for XBlocks and edx-platform Django app plugins +unicodecsv # Easier support for CSV files with unicode text +user-util # Functionality for retiring users (GDPR compliance) +webob +web-fragments # Provides the ability to render fragments of web pages +XBlock[django] # Courseware component architecture +xblock-utils # Provides utilities used by the Discussion XBlock +xss-utils # https://github.com/edx/edx-platform/pull/20633 Fix XSS via Translations diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 714d0878c076..f13ec50562e0 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -196,8 +196,6 @@ code-annotations==1.3.0 # edx-toggles codejail-includes==1.0.0 # via -r requirements/edx/base.txt -contextlib2==21.6.0 - # via -r requirements/edx/base.txt coreapi==2.3.3 # via # -r requirements/edx/base.txt @@ -503,8 +501,6 @@ djfernet==0.8.1 # via # -r requirements/edx/base.txt # edxval -docopt==0.6.2 - # via -r requirements/edx/base.txt docutils==0.19 # via # -c requirements/edx/../constraints.txt @@ -865,10 +861,6 @@ lazy-object-proxy==1.9.0 # via astroid learner-pathway-progress==1.3.4 # via -r requirements/edx/base.txt -levenshtein==0.21.1 - # via - # -r requirements/edx/base.txt - # python-levenshtein libsass==0.10.0 # via # -r requirements/edx/base.txt @@ -1234,8 +1226,6 @@ python-dateutil==2.8.2 # olxcleaner # ora2 # xblock -python-levenshtein==0.21.1 - # via -r requirements/edx/base.txt python-memcached==1.59 # via -r requirements/edx/base.txt python-slugify==8.0.1 @@ -1290,10 +1280,6 @@ pyyaml==6.0 # xblock random2==1.0.1 # via -r requirements/edx/base.txt -rapidfuzz==3.1.1 - # via - # -r requirements/edx/base.txt - # levenshtein recommender-xblock==2.0.1 # via -r requirements/edx/base.txt redis==4.5.5 diff --git a/xmodule/modulestore/tests/utils.py b/xmodule/modulestore/tests/utils.py index a0a4f79b62a7..8cac4bf72831 100644 --- a/xmodule/modulestore/tests/utils.py +++ b/xmodule/modulestore/tests/utils.py @@ -2,13 +2,12 @@ Helper classes and methods for running modulestore tests without Django. """ import os -from contextlib import contextmanager +from contextlib import contextmanager, ExitStack from importlib import import_module from shutil import rmtree from tempfile import mkdtemp from uuid import uuid4 -from contextlib2 import ExitStack from path import Path as path from xmodule.contentstore.mongo import MongoContentStore diff --git a/xmodule/static_content.py b/xmodule/static_content.py index 80b0b1d14b97..03014476737a 100755 --- a/xmodule/static_content.py +++ b/xmodule/static_content.py @@ -16,7 +16,6 @@ from pkg_resources import resource_filename import django -from docopt import docopt from path import Path as path from xmodule.annotatable_block import AnnotatableBlock @@ -241,8 +240,10 @@ def main(): ) django.setup() - args = docopt(main.__doc__) - root = path(args['']) + try: + root = path(sys.argv[1]) + except IndexError: + sys.exit(main.__doc__) descriptor_files = write_descriptor_js(root / 'descriptors/js') module_files = write_module_js(root / 'modules/js')