diff --git a/Makefile b/Makefile index f0ea7516db..17360b11d3 100644 --- a/Makefile +++ b/Makefile @@ -493,10 +493,10 @@ $(foreach asset_service,$(ASSET_SERVICES_LIST),\ dev.static: | $(_asset_compilation_targets) dev.static.lms: - docker compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets lms' + docker compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && npm run build && ./manage.py lms collectstatic --noinput' dev.static.cms: - docker compose exec -T cms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets cms' + docker compose exec -T cms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && npm run build && ./manage.py cms collectstatic --no-input' dev.static.%: ## Rebuild static assets for the specified service's container. docker compose exec -T $* bash -c 'source /edx/app/$*/$*_env && cd /edx/app/$*/$*/ && make static' diff --git a/docker-compose-watchers.yml b/docker-compose-watchers.yml index 12d17b2f96..de8a9dfac1 100644 --- a/docker-compose-watchers.yml +++ b/docker-compose-watchers.yml @@ -1,6 +1,6 @@ services: lms_watcher: - command: bash -c 'cd /edx/app/edxapp/edx-platform && source ../edxapp_env && while true; do paver watch_assets --w=$$ASSET_WATCHER_TIMEOUT; sleep 2; done' + command: bash -c 'cd /edx/app/edxapp/edx-platform && source ../edxapp_env && while true; do npm run watch --w=$$ASSET_WATCHER_TIMEOUT; sleep 2; done' container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.lms_watcher" environment: FRONTEND_TEST_SERVER_HOSTNAME: edx.devstack.lms_watcher @@ -18,7 +18,7 @@ services: - edx.devstack.lms_watcher cms_watcher: - command: bash -c 'cd /edx/app/edxapp/edx-platform && source ../edxapp_env && while true; do paver watch_assets --w=$$ASSET_WATCHER_TIMEOUT; sleep 2; done' + command: bash -c 'cd /edx/app/edxapp/edx-platform && source ../edxapp_env && while true; do npm run watch --w=$$ASSET_WATCHER_TIMEOUT; sleep 2; done' container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.cms_watcher" environment: FRONTEND_TEST_SERVER_HOSTNAME: edx.devstack.cms_watcher diff --git a/docker-compose.yml b/docker-compose.yml index 550ab9f321..abe1fc44ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: chrome: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.chrome" hostname: chrome.devstack.edx - image: edxops/chrome:${OPENEDX_RELEASE:-latest} + image: edxops/chrome:latest shm_size: 2g networks: default: @@ -89,7 +89,7 @@ services: firefox: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.firefox" hostname: firefox.devstack.edx - image: edxops/firefox:${OPENEDX_RELEASE:-latest} + image: edxops/firefox:latest shm_size: 2g networks: default: @@ -290,13 +290,15 @@ services: SOCIAL_AUTH_EDX_OIDC_URL_ROOT: http://edx.devstack.lms:18000/oauth2 ENABLE_DJANGO_TOOLBAR: 1 DJANGO_WATCHMAN_TIMEOUT: 30 - image: openedx/credentials-dev:${OPENEDX_RELEASE:-latest} + image: edxops/credentials-dev:latest networks: default: aliases: - edx.devstack.credentials ports: - "18150:18150" + volumes: + - ${PWD}/py_configuration_files/credentials.py:/edx/app/credentials/credentials/credentials/settings/devstack.py discovery: command: bash -c 'source /edx/app/discovery/discovery_env && while true; do python /edx/app/discovery/discovery/manage.py runserver 0.0.0.0:18381; sleep 2; done' @@ -319,7 +321,7 @@ services: TEST_ELASTICSEARCH_URL: "edx.devstack.elasticsearch710" ENABLE_DJANGO_TOOLBAR: 1 DJANGO_WATCHMAN_TIMEOUT: 30 - image: edxops/discovery-dev:${OPENEDX_RELEASE:-latest} + image: edxops/discovery-dev:latest networks: default: aliases: @@ -346,7 +348,7 @@ services: environment: DJANGO_WATCHMAN_TIMEOUT: 30 ENABLE_DJANGO_TOOLBAR: 1 - image: edxops/ecommerce-dev:${OPENEDX_RELEASE:-latest} + image: edxops/ecommerce-dev:latest networks: default: aliases: @@ -367,7 +369,7 @@ services: - lms - mysql80 - mysql57 - image: openedx/edx-notes-api-dev:${OPENEDX_RELEASE:-latest} + image: edxops/edx-notes-api-dev:latest networks: default: aliases: @@ -395,7 +397,7 @@ services: - mongo - elasticsearch710 - opensearch12 - image: edxops/forum:${OPENEDX_RELEASE:-latest} + image: edxops/forum:latest stdin_open: true tty: true networks: @@ -432,7 +434,7 @@ services: CMS_CFG: "/edx/etc/studio.yml" PATH: "/edx/app/edxapp/venvs/edxapp/bin:/edx/app/edxapp/nodeenv/bin:/edx/app/edxapp/edx-platform/node_modules/.bin:/edx/app/edxapp/edx-platform/bin:${PATH}" SERVICE_VARIANT: lms - image: openedx/lms-dev:${OPENEDX_RELEASE:-latest} + image: edxops/lms-dev:latest networks: default: aliases: @@ -468,7 +470,7 @@ services: LMS_HOST: http://localhost:18000 DJANGO_SETTINGS_MODULE: analytics_dashboard.settings.devstack ANALYTICS_DASHBOARD_CFG: /edx/etc/insights.yml - image: edxops/insights-dev:${OPENEDX_RELEASE:-latest} + image: edxops/insights-dev:latest working_dir: /edx/app/insights/insights networks: default: @@ -481,7 +483,7 @@ services: - ${PWD}/configuration_files/insights.yml:/edx/etc/insights.yml analyticsapi: - image: edxops/analytics-api-dev:${OPENEDX_RELEASE:-latest} + image: edxops/analytics-api-dev:latest container_name: edx.devstack.analyticsapi hostname: analyticsapi depends_on: @@ -535,7 +537,7 @@ services: CELERY_BROKER_PASSWORD: password DJANGO_WATCHMAN_TIMEOUT: 30 ANALYTICS_DASHBOARD_CFG: /edx/etc/registrar.yml - image: edxops/registrar-dev:${OPENEDX_RELEASE:-latest} + image: edxops/registrar-dev:latest working_dir: /edx/app/registrar networks: default: @@ -573,7 +575,7 @@ services: CELERY_BROKER_VHOST: 10 CELERY_BROKER_PASSWORD: password DJANGO_WATCHMAN_TIMEOUT: 30 - image: edxops/registrar-dev:${OPENEDX_RELEASE:-latest} + image: edxops/registrar-dev:latest networks: default: aliases: @@ -609,7 +611,7 @@ services: LMS_CFG: "/edx/etc/lms.yml" CMS_CFG: "/edx/etc/studio.yml" SERVICE_VARIANT: cms - image: openedx/lms-dev:${OPENEDX_RELEASE:-latest} + image: edxops/lms-dev:latest networks: default: aliases: @@ -625,7 +627,7 @@ services: xqueue: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue" - image: edxops/xqueue-dev:${OPENEDX_RELEASE:-latest} + image: edxops/xqueue-dev:latest working_dir: /edx/app/xqueue/xqueue command: bash -c 'source /edx/app/xqueue/xqueue_env && while true; do python /edx/app/xqueue/xqueue/manage.py runserver 0.0.0.0:18040 ; sleep 2; done' volumes: @@ -645,7 +647,7 @@ services: xqueue_consumer: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue_consumer" - image: edxops/xqueue-dev:${OPENEDX_RELEASE:-latest} + image: edxops/xqueue-dev:latest working_dir: /edx/app/xqueue/xqueue command: bash -c 'source /edx/app/xqueue/xqueue_env && while true; do python /edx/app/xqueue/xqueue/manage.py run_consumer ; sleep 2; done' volumes: diff --git a/docs/devstack_faq.rst b/docs/devstack_faq.rst index 5776ac0968..048420228d 100644 --- a/docs/devstack_faq.rst +++ b/docs/devstack_faq.rst @@ -39,7 +39,7 @@ Unlike the ``node_modules`` directory, the ``virtualenv`` used to run Python code in a Docker container only exists inside that container. Changes made to a container's filesystem are not saved when the container exits, so if you manually install or upgrade Python packages in a container (via -``pip install``, ``paver install_python_prereqs``, etc.), they will no +``pip install``, ``pip install -r requirements/edx/base.txt``, etc.), they will no longer be present if you restart the container. (Devstack Docker containers lose changes made to the filesystem when you reboot your computer, run ``make remove-containers``, restart or upgrade Docker itself, etc.) If you want to ensure @@ -78,7 +78,7 @@ JavaScript packages for Node.js are installed into the ``node_modules`` directory of the local git repository checkout which is synced into the corresponding Docker container. Hence these can be upgraded via any of the usual methods for that service (``npm install``, -``paver install_node_prereqs``, etc.), and the changes will persist between +``npm clean-install``, etc.), and the changes will persist between container restarts. How do I rebuild static assets? diff --git a/docs/getting_started.rst b/docs/getting_started.rst index c8697ac930..16b23696c4 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -7,7 +7,7 @@ Prerequisites You will need to have the following installed: - make -- Python 3.8 +- Python 3.11 - Docker, including ``docker compose`` This project requires **Docker 19.03+ CE**. We recommend Docker Stable, but diff --git a/docs/service_list.rst b/docs/service_list.rst index 246e7bf585..0f9686ca9f 100644 --- a/docs/service_list.rst +++ b/docs/service_list.rst @@ -79,8 +79,8 @@ Some common service combinations include: .. _frontend-app-publisher: https://github.com/openedx/frontend-app-publisher .. _frontend-app-gradebook: https://github.com/openedx/frontend-app-gradebook .. _lms: https://github.com/openedx/edx-platform -.. _frontend-app-program-console: https://github.com/openedx/frontend-app-program-console -.. _registrar: https://github.com/openedx/registrar +.. _frontend-app-program-console: https://github.com/edx/frontend-app-program-console +.. _registrar: https://github.com/edx/registrar .. _cms: https://github.com/openedx/edx-platform .. _frontend-app-learner-dashboard: https://github.com/openedx/frontend-app-learner-dashboard .. _frontend-app-learner-record: https://github.com/openedx/frontend-app-learner-record diff --git a/docs/testing_and_debugging.rst b/docs/testing_and_debugging.rst index 4103777e7f..98d110425e 100644 --- a/docs/testing_and_debugging.rst +++ b/docs/testing_and_debugging.rst @@ -49,19 +49,8 @@ Running LMS and CMS Tests ---------------------------- After entering a shell for the appropriate service via ``make lms-shell`` or -``make cms-shell``, you can run any of the usual paver commands from the -`edx-platform testing documentation`_. Examples: - -.. code:: sh - - paver run_quality - paver test_a11y - paver test_bokchoy - paver test_js - paver test_lib - paver test_python - -Tests can also be run individually. Example: +``make cms-shell``, you can run commands from the `edx-platform testing documentation`_ +Tests can be run individually. Example: .. code:: sh diff --git a/docs/troubleshoot_general_tips.rst b/docs/troubleshoot_general_tips.rst index 4fe283de9d..78ad835c3c 100644 --- a/docs/troubleshoot_general_tips.rst +++ b/docs/troubleshoot_general_tips.rst @@ -37,13 +37,13 @@ To fix this situation, change the owner back to yourself outside of the containe Running LMS commands within a container --------------------------------------- -Most of the ``paver`` commands require a settings flag. If omitted, the flag defaults to -``devstack``. If you run into issues running ``paver`` commands in a docker container, you should append +Most of the commands require a settings flag. If omitted, the flag defaults to +``devstack``. If you run into issues running commands in a docker container, you should append the ``devstack_docker`` flag. For example: .. code:: sh - $ paver update_assets --settings=devstack_docker + $ npm run build && ./manage.py lms collectstatic --no-input --settings=devstack_docker Resource busy or locked ----------------------- @@ -266,7 +266,7 @@ The fix is to get a new auth session. You can do any of the following: Missing vendor file node_modules/backbone.paginator/lib/backbone.paginator.js ----------------------------------------------------------------------------- This message sometimes appears when provisioning. The root cause of this is as yet unknown but the most effective workaround seems to be -to shell into the LMS (``make lms-shell`` in devstack) and run ``npm ci``, followed by ``paver update_assets``. +to shell into the LMS (``make lms-shell`` in devstack) and run ``npm ci``, followed by ``npm run build && ./manage.py lms collectstatic --no-input && ./manage.py cms collectstatic``. See `the github issue`_ to follow the work being done on the resolution. .. _the github issue: https://github.com/openedx/devstack/issues/1072 diff --git a/provision-lms.sh b/provision-lms.sh index 23d4016619..c1ee7c4ce5 100755 --- a/provision-lms.sh +++ b/provision-lms.sh @@ -19,7 +19,7 @@ done for app in "${apps[@]}"; do docker compose exec -T $app bash -e -c 'apt-get update && apt-get -y install --no-install-recommends git' - docker compose exec -T $app bash -e -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs' + docker compose exec -T $app bash -e -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 pip install -e . -r requirements/edx/base.txt -r requirements/edx/assets.txt && npm clean-install' #Installing prereqs crashes the process docker compose restart $app @@ -75,11 +75,11 @@ done # Fix missing vendor file by clearing the cache -docker compose exec -T lms bash -e -c 'rm /edx/app/edxapp/edx-platform/.prereqs_cache/Node_prereqs.sha1' +# docker compose exec -T lms bash -e -c 'rm /edx/app/edxapp/edx-platform/.prereqs_cache/Node_prereqs.sha1' # Create static assets for both LMS and CMS for app in "${apps[@]}"; do - docker compose exec -T $app bash -e -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_assets --settings devstack_docker' + docker compose exec -T $app bash -e -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && npm run build && ./manage.py lms collectstatic --noinput --settings devstack_docker && ./manage.py cms collectstatic --noinput --settings devstack_docker' done # Allow LMS SSO for CMS diff --git a/py_configuration_files/credentials.py b/py_configuration_files/credentials.py new file mode 100644 index 0000000000..0f54b7ecf8 --- /dev/null +++ b/py_configuration_files/credentials.py @@ -0,0 +1,115 @@ +from edx_django_utils.plugins import add_plugins +from credentials.settings._debug_toolbar import * +from credentials.settings.base import * +from credentials.apps.plugins.constants import PROJECT_TYPE, SettingsType +from credentials.settings.utils import get_logger_config, str2bool + +DEBUG = str2bool(os.environ.get("DEBUG", True)) + +ALLOWED_HOSTS = ["*"] + +LOGGING = get_logger_config(debug=True, dev_env=True, local_loglevel="DEBUG") +del LOGGING["handlers"]["local"] + +SECRET_KEY = os.environ.get("SECRET_KEY", "change-me") +LANGUAGE_CODE = os.environ.get("LANGUAGE_CODE", "en") + +CACHES = { + "default": { + "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "LOCATION": os.environ.get("CACHE_LOCATION", "edx.devstack.memcached:11211"), + "OPTIONS": {"no_delay": True, "ignore_exc": True, "use_pooling": True}, + } +} + +CREDENTIALS_SERVICE_USER = os.environ.get("CREDENTIALS_SERVICE_USER", "credentials_service_user") + +DATABASES = { + "default": { + "ENGINE": "django.db.backends.mysql", + "NAME": os.environ.get("DB_NAME", "credentials"), + "USER": os.environ.get("DB_USER", "credentials001"), + "PASSWORD": os.environ.get("DB_PASSWORD", "password"), + "HOST": os.environ.get("DB_HOST", "db"), + "PORT": os.environ.get("DB_PORT", 3306), + "ATOMIC_REQUESTS": False, + "CONN_MAX_AGE": 60, + } +} + +INSTALLED_APPS += ["credentials.apps.edx_credentials_extensions"] + +EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend" +EMAIL_FILE_PATH = "/tmp/credentials-emails" + +DEFAULT_FILE_STORAGE = os.environ.get("DEFAULT_FILE_STORAGE", "django.core.files.storage.FileSystemStorage") +MEDIA_URL = os.environ.get("MEDIA_URL", "/media/") + +STATICFILES_STORAGE = os.environ.get("STATICFILES_STORAGE", "django.contrib.staticfiles.storage.StaticFilesStorage") +STATIC_URL = os.environ.get("STATIC_URL", "/static/") + +# OAuth2 variables specific to social-auth/SSO login use case. +SOCIAL_AUTH_EDX_OAUTH2_KEY = os.environ.get("SOCIAL_AUTH_EDX_OAUTH2_KEY", "credentials-sso-key") +SOCIAL_AUTH_EDX_OAUTH2_SECRET = os.environ.get("SOCIAL_AUTH_EDX_OAUTH2_SECRET", "credentials-sso-secret") +SOCIAL_AUTH_EDX_OAUTH2_ISSUER = os.environ.get("SOCIAL_AUTH_EDX_OAUTH2_ISSUER", "http://localhost:18000") +SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT = os.environ.get("SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT", "http://edx.devstack.lms:18000") +SOCIAL_AUTH_EDX_OAUTH2_LOGOUT_URL = os.environ.get("SOCIAL_AUTH_EDX_OAUTH2_LOGOUT_URL", "http://localhost:18000/logout") +SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT = os.environ.get( + "SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT", + "http://localhost:18000", +) + +# OAuth2 variables specific to backend service API calls. +BACKEND_SERVICE_EDX_OAUTH2_KEY = os.environ.get("BACKEND_SERVICE_EDX_OAUTH2_KEY", "credentials-backend-service-key") +BACKEND_SERVICE_EDX_OAUTH2_SECRET = os.environ.get( + "BACKEND_SERVICE_EDX_OAUTH2_SECRET", "credentials-backend-service-secret" +) +BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL = os.environ.get( + "BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL", + "http://edx.devstack.lms:18000/oauth2", +) + +CORS_ORIGIN_WHITELIST = [ + "http://localhost:1990", # Learner Record MFE + "http://localhost:18450", # Subscriptions IDA +] +CSRF_TRUSTED_ORIGINS = [ + "http://localhost:1990", # Learner Record MFE +] + +SOCIAL_AUTH_REDIRECT_IS_HTTPS = str2bool(os.environ.get("SOCIAL_AUTH_REDIRECT_IS_HTTPS", False)) + +JWT_AUTH.update( + { + "JWT_SECRET_KEY": "lms-secret", + "JWT_ISSUER": "http://localhost:18000/oauth2", + "JWT_AUDIENCE": None, + "JWT_VERIFY_AUDIENCE": False, + "JWT_PUBLIC_SIGNING_JWK_SET": ( + '{"keys": [{"kid": "devstack_key", "e": "AQAB", "kty": "RSA", "n": "smKFSYowG6nNUAdeqH1jQQnH1PmIHphzBmwJ5vRf1vu' + "48BUI5VcVtUWIPqzRK_LDSlZYh9D0YFL0ZTxIrlb6Tn3Xz7pYvpIAeYuQv3_H5p8tbz7Fb8r63c1828wXPITVTv8f7oxx5W3lFFgpFAyYMmROC" + "4Ee9qG5T38LFe8_oAuFCEntimWxN9F3P-FJQy43TL7wG54WodgiM0EgzkeLr5K6cDnyckWjTuZbWI-4ffcTgTZsL_Kq1owa_J2ngEfxMCObnzG" + 'y5ZLcTUomo4rZLjghVpq6KZxfS6I1Vz79ZsMVUWEdXOYePCKKsrQG20ogQEkmTf9FT_SouC6jPcHLXw"}]}' + ), + "JWT_ISSUERS": [ + { + "AUDIENCE": "lms-key", + "ISSUER": "http://localhost:18000/oauth2", + "SECRET_KEY": "lms-secret", + } + ], + } +) + +SEND_EMAIL_ON_PROGRAM_COMPLETION = True + +LEARNER_RECORD_MFE_RECORDS_PAGE_URL = "http://localhost:1990/" + +add_plugins(__name__, PROJECT_TYPE, SettingsType.DEVSTACK) + +##################################################################### +# Lastly, see if the developer has any local overrides. +try: + from .private import * # pylint: disable=import-error +except ImportError: + pass diff --git a/repo.sh b/repo.sh index 3d899de963..cb93108f63 100755 --- a/repo.sh +++ b/repo.sh @@ -30,8 +30,8 @@ repos=( "https://github.com/openedx/xqueue.git" "https://github.com/edx/edx-analytics-dashboard.git" "https://github.com/openedx/frontend-app-gradebook.git" - "https://github.com/openedx/frontend-app-learner-dashboard" - "https://github.com/openedx/frontend-app-learner-record" + "https://github.com/openedx/frontend-app-learner-dashboard.git" + "https://github.com/openedx/frontend-app-learner-record.git" "https://github.com/edx/frontend-app-payment.git" "https://github.com/openedx/frontend-app-publisher.git" "https://github.com/edx/edx-analytics-dashboard.git" @@ -43,8 +43,8 @@ non_release_repos=( "https://github.com/openedx/frontend-app-course-authoring.git" "https://github.com/openedx/frontend-app-learning.git" "https://github.com/openedx/frontend-app-library-authoring.git" - "https://github.com/openedx/registrar.git" - "https://github.com/openedx/frontend-app-program-console.git" + "https://github.com/edx/registrar.git" + "https://github.com/edx/frontend-app-program-console.git" "https://github.com/openedx/frontend-app-account.git" "https://github.com/openedx/frontend-app-profile.git" "https://github.com/openedx/frontend-app-ora-grading.git" @@ -73,8 +73,8 @@ non_release_ssh_repos=( "git@github.com:openedx/frontend-app-course-authoring.git" "git@github.com:openedx/frontend-app-learning.git" "git@github.com:openedx/frontend-app-library-authoring.git" - "git@github.com:openedx/registrar.git" - "git@github.com:openedx/frontend-app-program-console.git" + "git@github.com:edx/registrar.git" + "git@github.com:edx/frontend-app-program-console.git" "git@github.com:openedx/frontend-app-account.git" "git@github.com:openedx/frontend-app-profile.git" "git@github.com:openedx/frontend-app-ora-grading.git" @@ -87,7 +87,7 @@ else ssh_repos+=("${non_release_ssh_repos[@]}") fi -name_pattern=".*/(.*).git" +name_pattern=".*/(.*).git$" _checkout () { @@ -97,7 +97,10 @@ _checkout () do # Use Bash's regex match operator to capture the name of the repo. # Results of the match are saved to an array called $BASH_REMATCH. - [[ $repo =~ $name_pattern ]] + if [[ ! $repo =~ $name_pattern ]]; then + echo "Cannot perform checkout on repo; URL did not match expected pattern: $repo" + exit 1 + fi name="${BASH_REMATCH[1]}" # If a directory exists and it is nonempty, assume the repo has been cloned. @@ -122,7 +125,10 @@ _clone () do # Use Bash's regex match operator to capture the name of the repo. # Results of the match are saved to an array called $BASH_REMATCH. - [[ $repo =~ $name_pattern ]] + if [[ ! $repo =~ $name_pattern ]]; then + echo "Cannot clone repo; URL did not match expected pattern: $repo" + exit 1 + fi name="${BASH_REMATCH[1]}" # If a directory exists and it is nonempty, assume the repo has been checked out @@ -196,7 +202,10 @@ reset () for repo in ${repos[*]} do - [[ $repo =~ $name_pattern ]] + if [[ ! $repo =~ $name_pattern ]]; then + echo "Cannot reset repo; URL did not match expected pattern: $repo" + exit 1 + fi name="${BASH_REMATCH[1]}" if [ -d "$name" ]; then @@ -227,7 +236,10 @@ status () currDir=$(pwd) for repo in ${repos[*]} do - [[ $repo =~ $name_pattern ]] + if [[ ! $repo =~ $name_pattern ]]; then + echo "Cannot check repo status; URL did not match expected pattern: $repo" + exit 1 + fi name="${BASH_REMATCH[1]}" if [ -d "$name" ]; then diff --git a/requirements/base.txt b/requirements/base.txt index a0fda06220..23e9435fb6 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -pyyaml==6.0.1 +pyyaml==6.0.2 # via -r requirements/base.in diff --git a/requirements/dev.txt b/requirements/dev.txt index bd631da61c..7e7304e0cb 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,7 +8,7 @@ build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools -cachetools==5.3.3 +cachetools==5.5.0 # via tox chardet==5.2.0 # via tox @@ -20,19 +20,10 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -exceptiongroup==1.2.1 - # via - # -r requirements/test.txt - # pytest filelock==3.15.4 # via # tox # virtualenv -importlib-metadata==6.11.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/pip-tools.txt - # build iniconfig==2.0.0 # via # -r requirements/test.txt @@ -69,33 +60,20 @@ pyproject-hooks==1.1.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.2.2 +pytest==8.3.2 # via -r requirements/test.txt -pyyaml==6.0.1 +pyyaml==6.0.2 # via # -r requirements/base.txt # -r requirements/test.txt -tomli==2.0.1 - # via - # -r requirements/pip-tools.txt - # -r requirements/test.txt - # build - # pip-tools - # pyproject-api - # pytest - # tox -tox==4.16.0 +tox==4.18.0 # via -r requirements/dev.in virtualenv==20.26.3 # via tox -wheel==0.43.0 +wheel==0.44.0 # via # -r requirements/pip-tools.txt # pip-tools -zipp==3.19.2 - # via - # -r requirements/pip-tools.txt - # importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.txt b/requirements/doc.txt index 0b1928f87c..b8729f68be 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -accessible-pygments==0.0.4 +accessible-pygments==0.0.5 # via pydata-sphinx-theme -alabaster==0.7.13 +alabaster==1.0.0 # via sphinx -babel==2.15.0 +babel==2.16.0 # via # pydata-sphinx-theme # sphinx @@ -20,7 +20,7 @@ charset-normalizer==3.3.2 # via requests doc8==1.1.1 # via -r requirements/doc.in -docutils==0.19 +docutils==0.20.1 # via # doc8 # pydata-sphinx-theme @@ -31,10 +31,6 @@ idna==3.7 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.11.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # sphinx jinja2==3.1.4 # via sphinx markupsafe==2.1.5 @@ -47,7 +43,7 @@ packaging==24.1 # sphinx pbr==6.0.0 # via stevedore -pydata-sphinx-theme==0.14.4 +pydata-sphinx-theme==0.15.4 # via sphinx-book-theme pygments==2.18.0 # via @@ -56,9 +52,7 @@ pygments==2.18.0 # pydata-sphinx-theme # readme-renderer # sphinx -pytz==2024.1 - # via babel -pyyaml==6.0.1 +pyyaml==6.0.2 # via -r requirements/base.txt readme-renderer==43.0 # via -r requirements/doc.in @@ -68,34 +62,30 @@ restructuredtext-lint==1.4.0 # via doc8 snowballstemmer==2.2.0 # via sphinx -soupsieve==2.5 +soupsieve==2.6 # via beautifulsoup4 -sphinx==6.2.1 +sphinx==8.0.2 # via # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.3 # via -r requirements/doc.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==2.0.0 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx -stevedore==5.2.0 - # via doc8 -tomli==2.0.1 +stevedore==5.3.0 # via doc8 typing-extensions==4.12.2 # via pydata-sphinx-theme urllib3==2.2.2 # via requests -zipp==3.19.2 - # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 30588308f8..fedf88df8e 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,10 +8,6 @@ build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==6.11.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # build packaging==24.1 # via build pip-tools==7.4.1 @@ -20,14 +16,8 @@ pyproject-hooks==1.1.0 # via # build # pip-tools -tomli==2.0.1 - # via - # build - # pip-tools -wheel==0.43.0 +wheel==0.44.0 # via pip-tools -zipp==3.19.2 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip.txt b/requirements/pip.txt index e155dab551..f0fca18878 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -wheel==0.43.0 +wheel==0.44.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.1.2 +pip==24.2 # via -r requirements/pip.in -setuptools==70.3.0 +setuptools==73.0.1 # via -r requirements/pip.in diff --git a/requirements/test.txt b/requirements/test.txt index 88390c80f2..3c77af6d75 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,11 +1,9 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -exceptiongroup==1.2.1 - # via pytest iniconfig==2.0.0 # via pytest packaging==24.1 @@ -16,9 +14,7 @@ pluggy==1.5.0 # via pytest ptyprocess==0.7.0 # via pexpect -pytest==8.2.2 +pytest==8.3.2 # via -r requirements/test.in -pyyaml==6.0.1 +pyyaml==6.0.2 # via -r requirements/base.txt -tomli==2.0.1 - # via pytest