diff --git a/course_discovery/apps/api/v1/views/courses.py b/course_discovery/apps/api/v1/views/courses.py index c8b4640951..ed797d8764 100644 --- a/course_discovery/apps/api/v1/views/courses.py +++ b/course_discovery/apps/api/v1/views/courses.py @@ -92,7 +92,7 @@ def get_object(self): elif self.course_uuid_regex.match(key): filter_key = 'uuid' - filter_kwargs = {filter_key: key} + filter_kwargs = {filter_key: key} # pylint: disable=possibly-used-before-assignment obj = get_object_or_404(queryset, **filter_kwargs) # May raise a permission denied diff --git a/course_discovery/apps/course_metadata/data_loaders/tests/test_api.py b/course_discovery/apps/course_metadata/data_loaders/tests/test_api.py index 822848f648..ff616fa9be 100644 --- a/course_discovery/apps/course_metadata/data_loaders/tests/test_api.py +++ b/course_discovery/apps/course_metadata/data_loaders/tests/test_api.py @@ -475,7 +475,7 @@ def test_ingest_handles_draft(self, official_exists, draft_exists, partner_uses_ draft_run = CourseRun.objects.create(course=draft_course, key=run_key, type=audit_run_type, draft=True) draft_course.canonical_course_run = draft_run draft_course.save() - draft_course.authoring_organizations.add(org) + draft_course.authoring_organizations.add(org) # pylint: disable=possibly-used-before-assignment official_course_kwargs = {'draft_version': draft_course} official_run_kwargs = {'draft_version': draft_run} all_courses.add(draft_course) diff --git a/course_discovery/apps/course_metadata/management/commands/populate_executive_education_data_csv.py b/course_discovery/apps/course_metadata/management/commands/populate_executive_education_data_csv.py index ea0c068bb3..8a70c935b5 100644 --- a/course_discovery/apps/course_metadata/management/commands/populate_executive_education_data_csv.py +++ b/course_discovery/apps/course_metadata/management/commands/populate_executive_education_data_csv.py @@ -97,7 +97,7 @@ def add_arguments(self, parser): help='Product source to be used for mapping external organization code to internal organization code' ) - def handle(self, *args, **options): + def handle(self, *args, **options): # pylint: disable=too-many-statements input_csv = options.get('input_csv') output_csv = options.get('output_csv') auth_token = options.get('auth_token') @@ -123,7 +123,7 @@ def handle(self, *args, **options): ) else: input_reader = [] - + products = [] if dev_input_json: products = self.mock_product_details(dev_input_json) elif auth_token: diff --git a/course_discovery/apps/course_metadata/management/commands/update_course_active_url_slugs.py b/course_discovery/apps/course_metadata/management/commands/update_course_active_url_slugs.py index 0d3a072741..d0fa13a6dc 100644 --- a/course_discovery/apps/course_metadata/management/commands/update_course_active_url_slugs.py +++ b/course_discovery/apps/course_metadata/management/commands/update_course_active_url_slugs.py @@ -46,7 +46,7 @@ def handle(self, *args, **options): file_reader = DictReader(open(csv_file_path, 'r')) # pylint: disable=consider-using-with logger.info(f'Reading csv file from path: {csv_file_path}') else: - file = csv_from_config.csv_file if csv_from_config.is_enabled() else None + file = csv_from_config.csv_file if csv_from_config.is_enabled() else None # pylint: disable=possibly-used-before-assignment file_reader = DictReader(file.open('r')) logger.info(f'Reading csv file from config MigrateCourseSlugConfiguration {csv_from_config.csv_file}') diff --git a/course_discovery/apps/course_metadata/tests/test_algolia_models.py b/course_discovery/apps/course_metadata/tests/test_algolia_models.py index a8693b6965..e4dd1d5af1 100644 --- a/course_discovery/apps/course_metadata/tests/test_algolia_models.py +++ b/course_discovery/apps/course_metadata/tests/test_algolia_models.py @@ -169,6 +169,7 @@ def create_blocked_course_run(self, **kwargs): return course def attach_published_course_run(self, course, run_type="archived", **kwargs): + course_start = course_end = '' if run_type == 'current and ends within two weeks': course_start = self.ONE_MONTH_AGO course_end = self.TOMORROW @@ -569,6 +570,7 @@ class TestAlgoliaProxyProgram(TestAlgoliaProxyWithEdxPartner): IN_TWO_MONTHS = datetime.datetime.now(UTC) + datetime.timedelta(days=60) def attach_course_run(self, course, availability="Archived"): + course_start = course_end = '' if availability == 'none': return CourseRunFactory( course=course, diff --git a/requirements/docs.txt b/requirements/docs.txt index 8c8eb9af64..961b8fd528 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -14,7 +14,7 @@ babel==2.15.0 # sphinx beautifulsoup4==4.12.3 # via pydata-sphinx-theme -certifi==2024.2.2 +certifi==2024.6.2 # via # elasticsearch # requests @@ -62,7 +62,7 @@ python-dateutil==2.9.0.post0 # via elasticsearch-dsl pytz==2024.1 # via babel -requests==2.31.0 +requests==2.32.3 # via sphinx six==1.16.0 # via @@ -93,11 +93,11 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -typing-extensions==4.11.0 +typing-extensions==4.12.1 # via pydata-sphinx-theme urllib3==1.26.18 # via # elasticsearch # requests -zipp==3.18.1 +zipp==3.19.1 # via importlib-metadata diff --git a/requirements/local.txt b/requirements/local.txt index f76b322311..d22dfc5373 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -28,10 +28,9 @@ asgiref==3.8.1 # django # django-cors-headers # django-countries - # django-simple-history asn1crypto==1.5.1 # via snowflake-connector-python -astroid==3.1.0 +astroid==3.2.2 # via # pylint # pylint-celery @@ -74,9 +73,9 @@ boltons==21.0.0 # face # glom # semgrep -boto3==1.34.103 +boto3==1.34.117 # via django-ses -botocore==1.34.103 +botocore==1.34.117 # via # boto3 # s3transfer @@ -96,7 +95,7 @@ celery==5.4.0 # via # -c requirements/constraints.txt # taxonomy-connector -certifi==2024.2.2 +certifi==2024.6.2 # via # elasticsearch # requests @@ -146,7 +145,7 @@ colorama==0.4.6 # tox contentful==2.1.1 # via -r requirements/base.in -coverage[toml]==7.5.1 +coverage[toml]==7.5.3 # via # -r requirements/test.in # pytest-cov @@ -196,6 +195,7 @@ distlib==0.3.8 # django-nine # django-parler # django-ses + # django-simple-history # django-solo # django-stdimage # django-storages @@ -219,7 +219,7 @@ distlib==0.3.8 # social-auth-app-django # taxonomy-connector # xss-utils -django-admin-sortable2==2.1.10 +django-admin-sortable2==2.2.1 # via -r requirements/base.in django-appconf==1.0.6 # via django-compressor @@ -292,9 +292,9 @@ django-object-actions==4.2.0 # taxonomy-connector django-parler==2.3 # via -r requirements/base.in -django-ses==4.0.0 +django-ses==4.1.0 # via taxonomy-connector -django-simple-history==3.5.0 +django-simple-history==3.7.0 # via -r requirements/base.in django-solo==2.2.0 # via @@ -368,7 +368,7 @@ edx-django-release-util==1.4.0 # via -r requirements/base.in edx-django-sites-extensions==4.2.0 # via -r requirements/base.in -edx-django-utils==5.13.0 +edx-django-utils==5.14.2 # via # -r requirements/base.in # django-config-models @@ -429,7 +429,7 @@ face==22.0.0 # via glom factory-boy==3.3.0 # via -r requirements/test.in -faker==25.1.0 +faker==25.3.0 # via factory-boy fastavro==1.9.4 # via openedx-events @@ -450,7 +450,7 @@ glom==22.1.0 # via semgrep google-api-core==2.19.0 # via google-api-python-client -google-api-python-client==2.129.0 +google-api-python-client==2.131.0 # via -r requirements/base.in google-auth==2.29.0 # via @@ -467,7 +467,7 @@ google-auth-oauthlib==1.2.0 # via gspread googleapis-common-protos==1.63.0 # via google-api-core -gspread==6.1.0 +gspread==6.1.2 # via -r requirements/base.in h11==0.14.0 # via wsproto @@ -491,7 +491,7 @@ importlib-metadata==6.11.0 # -r requirements/base.in # markdown # sphinx -importlib-resources==5.13.0 +importlib-resources==6.4.0 # via pycountry inflection==0.5.1 # via drf-yasg @@ -519,7 +519,7 @@ kombu==5.3.7 # via celery libsass==0.23.0 # via django-libsass -lxml[html-clean,html_clean]==5.2.1 +lxml[html-clean,html_clean]==5.2.2 # via # -r requirements/base.in # edx-i18n-tools @@ -543,7 +543,7 @@ multidict==6.0.5 # yarl mysqlclient==2.2.4 # via -r requirements/test.in -newrelic==9.9.0 +newrelic==9.10.0 # via edx-django-utils oauthlib==3.2.2 # via @@ -586,7 +586,7 @@ pillow==9.5.0 # -r requirements/base.in # cairosvg # django-stdimage -platformdirs==4.2.1 +platformdirs==4.2.2 # via # pylint # snowflake-connector-python @@ -599,7 +599,7 @@ pluggy==1.5.0 # tox polib==1.2.0 # via edx-i18n-tools -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.45 # via click-repl proto-plus==1.23.0 # via google-api-core @@ -618,7 +618,7 @@ pyasn1-modules==0.4.0 # via google-auth pycodestyle==2.11.1 # via -r requirements/test.in -pycountry==23.12.11 +pycountry==24.6.1 # via -r requirements/base.in pycparser==2.22 # via cffi @@ -638,7 +638,7 @@ pyjwt[crypto]==2.8.0 # simple-salesforce # snowflake-connector-python # social-auth-core -pylint==3.1.0 +pylint==3.2.2 # via # edx-lint # pylint-celery @@ -672,7 +672,7 @@ pyrsistent==0.20.0 # via jsonschema pysocks==1.7.1 # via urllib3 -pytest==8.2.0 +pytest==8.2.1 # via # -r requirements/test.in # pytest-cov @@ -761,7 +761,7 @@ requests==2.31.0 # social-auth-core # sphinx # zeep -requests-file==2.0.0 +requests-file==2.1.0 # via zeep requests-oauthlib==2.0.0 # via @@ -817,7 +817,7 @@ sniffio==1.3.1 # via trio snowballstemmer==2.2.0 # via sphinx -snowflake-connector-python==3.10.0 +snowflake-connector-python==3.10.1 # via -r requirements/base.in social-auth-app-django==5.4.1 # via @@ -862,8 +862,6 @@ stevedore==5.2.0 # code-annotations # edx-django-utils # edx-opaque-keys -strenum==0.4.15 - # via gspread taxonomy-connector==1.50.0 # via -r requirements/base.in testfixtures==8.2.0 @@ -897,7 +895,7 @@ trio==0.24.0 # trio-websocket trio-websocket==0.11.1 # via selenium -typing-extensions==4.11.0 +typing-extensions==4.12.1 # via # asgiref # astroid @@ -913,7 +911,7 @@ tzdata==2024.1 # via # backports-zoneinfo # celery -ujson==5.9.0 +ujson==5.10.0 # via python-lsp-jsonrpc unicodecsv==0.14.1 # via -r requirements/base.in @@ -935,11 +933,11 @@ vine==5.1.0 # amqp # celery # kombu -virtualenv==20.26.1 +virtualenv==20.26.2 # via tox walrus==0.9.3 # via edx-event-bus-redis -wcmatch==8.5.1 +wcmatch==8.5.2 # via semgrep wcwidth==0.2.13 # via prompt-toolkit @@ -955,7 +953,7 @@ yarl==1.9.4 # via aiohttp zeep==4.2.1 # via simple-salesforce -zipp==3.18.1 +zipp==3.19.1 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip.txt b/requirements/pip.txt index c2aafa1049..2bd9e4c6bd 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -10,5 +10,5 @@ wheel==0.43.0 # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.5.1 +setuptools==70.0.0 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index 03069a7cc4..2c0fcda1d0 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -26,7 +26,7 @@ tomli==2.0.1 # pip-tools wheel==0.43.0 # via pip-tools -zipp==3.18.1 +zipp==3.19.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/production.txt b/requirements/production.txt index b8b73e84a8..0e6f703736 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -24,7 +24,6 @@ asgiref==3.8.1 # django # django-cors-headers # django-countries - # django-simple-history asn1crypto==1.5.1 # via snowflake-connector-python async-timeout==4.0.3 @@ -51,9 +50,9 @@ beautifulsoup4==4.12.3 # taxonomy-connector billiard==4.2.0 # via celery -boto3==1.34.103 +boto3==1.34.117 # via django-ses -botocore==1.34.103 +botocore==1.34.117 # via # boto3 # s3transfer @@ -69,7 +68,7 @@ celery==5.4.0 # via # -c requirements/constraints.txt # taxonomy-connector -certifi==2024.2.2 +certifi==2024.6.2 # via # -r requirements/production.in # elasticsearch @@ -142,6 +141,7 @@ django==4.2.13 # django-nine # django-parler # django-ses + # django-simple-history # django-solo # django-stdimage # django-storages @@ -164,7 +164,7 @@ django==4.2.13 # social-auth-app-django # taxonomy-connector # xss-utils -django-admin-sortable2==2.1.10 +django-admin-sortable2==2.2.1 # via -r requirements/base.in django-appconf==1.0.6 # via django-compressor @@ -230,11 +230,11 @@ django-object-actions==4.2.0 # taxonomy-connector django-parler==2.3 # via -r requirements/base.in -django-ses==4.0.0 +django-ses==4.1.0 # via # -r requirements/production.in # taxonomy-connector -django-simple-history==3.5.0 +django-simple-history==3.7.0 # via -r requirements/base.in django-solo==2.2.0 # via @@ -304,7 +304,7 @@ edx-django-release-util==1.4.0 # via -r requirements/base.in edx-django-sites-extensions==4.2.0 # via -r requirements/base.in -edx-django-utils==5.13.0 +edx-django-utils==5.14.2 # via # -r requirements/base.in # django-config-models @@ -364,7 +364,7 @@ gevent==24.2.1 # via -r requirements/production.in google-api-core==2.19.0 # via google-api-python-client -google-api-python-client==2.129.0 +google-api-python-client==2.131.0 # via -r requirements/base.in google-auth==2.29.0 # via @@ -383,7 +383,7 @@ googleapis-common-protos==1.63.0 # via google-api-core greenlet==3.0.3 # via gevent -gspread==6.1.0 +gspread==6.1.2 # via -r requirements/base.in gunicorn==22.0.0 # via -r requirements/production.in @@ -403,7 +403,7 @@ importlib-metadata==6.11.0 # -c requirements/common_constraints.txt # -r requirements/base.in # markdown -importlib-resources==5.13.0 +importlib-resources==6.4.0 # via pycountry inflection==0.5.1 # via drf-yasg @@ -421,7 +421,7 @@ kombu==5.3.7 # via celery libsass==0.23.0 # via django-libsass -lxml[html-clean,html_clean]==5.2.1 +lxml[html-clean,html_clean]==5.2.2 # via # -r requirements/base.in # lxml-html-clean @@ -440,7 +440,7 @@ multidict==6.0.5 # yarl mysqlclient==2.2.4 # via -r requirements/production.in -newrelic==9.9.0 +newrelic==9.10.0 # via # -r requirements/production.in # edx-django-utils @@ -474,11 +474,11 @@ pillow==9.5.0 # -r requirements/base.in # cairosvg # django-stdimage -platformdirs==4.2.1 +platformdirs==4.2.2 # via # snowflake-connector-python # zeep -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.45 # via click-repl proto-plus==1.23.0 # via google-api-core @@ -495,7 +495,7 @@ pyasn1==0.6.0 # rsa pyasn1-modules==0.4.0 # via google-auth -pycountry==23.12.11 +pycountry==24.6.1 # via -r requirements/base.in pycparser==2.22 # via cffi @@ -576,7 +576,7 @@ requests==2.31.0 # snowflake-connector-python # social-auth-core # zeep -requests-file==2.0.0 +requests-file==2.1.0 # via zeep requests-oauthlib==2.0.0 # via @@ -610,7 +610,7 @@ six==1.16.0 # python-monkey-business slumber==0.7.1 # via edx-rest-api-client -snowflake-connector-python==3.10.0 +snowflake-connector-python==3.10.1 # via -r requirements/base.in social-auth-app-django==5.4.1 # via @@ -631,8 +631,6 @@ stevedore==5.2.0 # code-annotations # edx-django-utils # edx-opaque-keys -strenum==0.4.15 - # via gspread taxonomy-connector==1.50.0 # via -r requirements/base.in text-unidecode==1.3 @@ -645,7 +643,7 @@ tomlkit==0.12.5 # via snowflake-connector-python tqdm==4.66.4 # via openai -typing-extensions==4.11.0 +typing-extensions==4.12.1 # via # asgiref # django-countries @@ -688,13 +686,13 @@ yarl==1.9.4 # via aiohttp zeep==4.2.1 # via simple-salesforce -zipp==3.18.1 +zipp==3.19.1 # via # importlib-metadata # importlib-resources zope-event==5.0 # via gevent -zope-interface==6.3 +zope-interface==6.4.post2 # via gevent # The following packages are considered to be unsafe in a requirements file: