diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5865e9f6b..718fc915c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,4 +69,4 @@ jobs: NODE: ${{ matrix.node }} TARGETS: "requirements.js static test_python" - name: code cov - uses: codecov/codecov-action@v2 --disable pycov + uses: codecov/codecov-action@v3 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2b8e26dcb..328eb7448 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,6 +5,11 @@ # Required: the version of this file's schema. version: 2 +build: + os: "ubuntu-20.04" + tools: + python: "3.8" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/en_us/dashboard/source/conf.py @@ -12,6 +17,5 @@ sphinx: # Optionally set the version of Python and requirements required to build your docs python: - version: "3.8" install: - requirements: requirements/doc.txt diff --git a/analytics_dashboard/core/tests/test_views.py b/analytics_dashboard/core/tests/test_views.py index 204517ed1..04ce02018 100644 --- a/analytics_dashboard/core/tests/test_views.py +++ b/analytics_dashboard/core/tests/test_views.py @@ -2,6 +2,7 @@ import logging import unittest.mock as mock +from urllib.parse import quote from django.conf import settings from django.contrib.auth import get_user_model from django.core.cache import cache @@ -9,7 +10,6 @@ from django.test import TestCase from django.test.utils import override_settings from django.urls import reverse, reverse_lazy -from urllib.parse import quote from django_dynamic_fixture import G from testfixtures import LogCapture diff --git a/analytics_dashboard/courses/urls.py b/analytics_dashboard/courses/urls.py index afb0b399a..ee96f8c00 100644 --- a/analytics_dashboard/courses/urls.py +++ b/analytics_dashboard/courses/urls.py @@ -38,7 +38,7 @@ path('geography/', enrollment.EnrollmentGeographyView.as_view(), name='geography'), path('demographics/age/', enrollment.EnrollmentDemographicsAgeView.as_view(), name='demographics_age'), path('demographics/education/', enrollment.EnrollmentDemographicsEducationView.as_view(), - name='demographics_education'), + name='demographics_education'), path('demographics/gender/', enrollment.EnrollmentDemographicsGenderView.as_view(), name='demographics_gender'), ], 'enrollment') @@ -48,45 +48,47 @@ # ordering of the URLS is important for routing the the section, subsection, etc. correctly re_path(video_timeline_regex, engagement.EngagementVideoTimeline.as_view(), name='video_timeline'), re_path(fr'^videos/sections/{SECTION_ID_PATTERN}/subsections/{SUBSECTION_ID_PATTERN}/$', - engagement.EngagementVideoSubsection.as_view(), - name='video_subsection'), + engagement.EngagementVideoSubsection.as_view(), + name='video_subsection'), re_path(fr'^videos/sections/{SECTION_ID_PATTERN}/$', - engagement.EngagementVideoSection.as_view(), - name='video_section'), + engagement.EngagementVideoSection.as_view(), + name='video_section'), ], 'engagement') PERFORMANCE_URLS = ([ path('ungraded_content/', performance.PerformanceUngradedContent.as_view(), name='ungraded_content'), re_path(ungraded_answer_distribution_regex, performance.PerformanceUngradedAnswerDistribution.as_view(), - name='ungraded_answer_distribution'), + name='ungraded_answer_distribution'), re_path(fr'^ungraded_content/sections/{SECTION_ID_PATTERN}/subsections/{SUBSECTION_ID_PATTERN}/$', - performance.PerformanceUngradedSubsection.as_view(), - name='ungraded_subsection'), + performance.PerformanceUngradedSubsection.as_view(), + name='ungraded_subsection'), re_path(fr'^ungraded_content/sections/{SECTION_ID_PATTERN}/$', - performance.PerformanceUngradedSection.as_view(), - name='ungraded_section'), + performance.PerformanceUngradedSection.as_view(), + name='ungraded_section'), path('graded_content/', performance.PerformanceGradedContent.as_view(), name='graded_content'), re_path(r'^graded_content/(?P[\w-]+)/$', - performance.PerformanceGradedContentByType.as_view(), - name='graded_content_by_type'), - re_path(answer_distribution_regex, performance.PerformanceAnswerDistributionView.as_view(), name='answer_distribution'), + performance.PerformanceGradedContentByType.as_view(), + name='graded_content_by_type'), + re_path(answer_distribution_regex, + performance.PerformanceAnswerDistributionView.as_view(), + name='answer_distribution'), # This MUST come AFTER the answer distribution pattern; otherwise, the answer distribution pattern # will be interpreted as an assignment pattern. re_path(fr'^graded_content/assignments/{ASSIGNMENT_ID_PATTERN}/$', - performance.PerformanceAssignment.as_view(), - name='assignment'), + performance.PerformanceAssignment.as_view(), + name='assignment'), path('learning_outcomes/', - performance.PerformanceLearningOutcomesContent.as_view(), - name='learning_outcomes'), + performance.PerformanceLearningOutcomesContent.as_view(), + name='learning_outcomes'), re_path(fr'^learning_outcomes/{TAG_VALUE_ID_PATTERN}/$', - performance.PerformanceLearningOutcomesSection.as_view(), - name='learning_outcomes_section'), + performance.PerformanceLearningOutcomesSection.as_view(), + name='learning_outcomes_section'), re_path(fr'^learning_outcomes/{TAG_VALUE_ID_PATTERN}/problems/{PROBLEM_ID_PATTERN}/$', - performance.PerformanceLearningOutcomesAnswersDistribution.as_view(), - name='learning_outcomes_answers_distribution'), - re_path(r'^learning_outcomes/{}/problems/{}/{}/$'.format(TAG_VALUE_ID_PATTERN, PROBLEM_ID_PATTERN, - PROBLEM_PART_ID_PATTERN), + performance.PerformanceLearningOutcomesAnswersDistribution.as_view(), + name='learning_outcomes_answers_distribution'), + re_path(r'^learning_outcomes/{}/problems/{}/{}/$'.format( + TAG_VALUE_ID_PATTERN, PROBLEM_ID_PATTERN, PROBLEM_PART_ID_PATTERN), performance.PerformanceLearningOutcomesAnswersDistribution.as_view(), name='learning_outcomes_answers_distribution_with_part'), ], 'performance') @@ -95,22 +97,23 @@ path('enrollment/', csv.CourseEnrollmentCSV.as_view(), name='enrollment'), path('enrollment/geography/', csv.CourseEnrollmentByCountryCSV.as_view(), name='enrollment_geography'), path('enrollment/demographics/age/', - csv.CourseEnrollmentDemographicsAgeCSV.as_view(), - name='enrollment_demographics_age'), + csv.CourseEnrollmentDemographicsAgeCSV.as_view(), + name='enrollment_demographics_age'), path('enrollment/demographics/education/', - csv.CourseEnrollmentDemographicsEducationCSV.as_view(), - name='enrollment_demographics_education'), + csv.CourseEnrollmentDemographicsEducationCSV.as_view(), + name='enrollment_demographics_education'), path('enrollment/demographics/gender/', - csv.CourseEnrollmentDemographicsGenderCSV.as_view(), - name='enrollment_demographics_gender'), + csv.CourseEnrollmentDemographicsGenderCSV.as_view(), + name='enrollment_demographics_gender'), path('engagement/activity_trend/', - csv.CourseEngagementActivityTrendCSV.as_view(), - name='engagement_activity_trend'), + csv.CourseEngagementActivityTrendCSV.as_view(), + name='engagement_activity_trend'), re_path(fr'^engagement/videos/{PIPELINE_VIDEO_ID}/$', - csv.CourseEngagementVideoTimelineCSV.as_view(), - name='engagement_video_timeline'), - re_path(r'^performance/graded_content/problems/{}/answer_distribution/{}/$'.format(CONTENT_ID_PATTERN, - PROBLEM_PART_ID_PATTERN), + csv.CourseEngagementVideoTimelineCSV.as_view(), + name='engagement_video_timeline'), + re_path(r'^performance/graded_content/problems/{}/answer_distribution/{}/$'.format( + CONTENT_ID_PATTERN, + PROBLEM_PART_ID_PATTERN), csv.PerformanceAnswerDistributionCSV.as_view(), name='performance_answer_distribution'), re_path(r'problem_responses/', csv.PerformanceProblemResponseCSV.as_view(), name='performance_problem_responses') diff --git a/common/clients.py b/common/clients.py index e96d5211d..32100be2b 100644 --- a/common/clients.py +++ b/common/clients.py @@ -49,7 +49,7 @@ def all_courses(self): return courses - def request(self, method, url, **kwargs): + def request(self, method, url, **kwargs): # pylint: disable=arguments-differ response = super().request(method, url, **kwargs) response.raise_for_status() return response diff --git a/requirements/base.txt b/requirements/base.txt index b48edac55..2e83a8ee9 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -105,9 +105,9 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.2 +edx-drf-extensions==8.9.3 # via -r requirements/base.in -edx-i18n-tools==1.1.0 +edx-i18n-tools==1.2.0 # via -r requirements/base.in edx-opaque-keys==2.5.0 # via @@ -161,8 +161,6 @@ pymongo==3.13.0 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils -python-dateutil==2.8.2 - # via edx-drf-extensions python-slugify==8.0.1 # via # -r requirements/base.in @@ -197,8 +195,6 @@ six==1.16.0 # edx-auth-backends # edx-ccx-keys # edx-django-release-util - # edx-drf-extensions - # python-dateutil slumber==0.7.1 # via edx-rest-api-client social-auth-app-django==5.3.0 @@ -219,12 +215,14 @@ stevedore==5.1.0 # edx-opaque-keys text-unidecode==1.3 # via python-slugify -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # asgiref # django-countries # edx-opaque-keys unicodecsv==0.14.1 # via djangorestframework-csv -urllib3==2.0.4 - # via requests +urllib3==1.26.16 + # via + # -c requirements/constraints.txt + # requests diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 5f1fb71d4..6ffa252d1 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -15,3 +15,6 @@ django-webpack-loader==0.7.0 # Constraint Django to 3.2 LTS django<3.3 + +# urllib3 > 2.0.2 introduces an error +urllib3>=1.26.15, <2 diff --git a/requirements/doc.txt b/requirements/doc.txt index f61466112..5b14fa631 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -133,9 +133,9 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.2 +edx-drf-extensions==8.9.3 # via -r requirements/base.txt -edx-i18n-tools==1.1.0 +edx-i18n-tools==1.2.0 # via -r requirements/base.txt edx-opaque-keys==2.5.0 # via @@ -205,7 +205,7 @@ pycparser==2.21 # via # -r requirements/base.txt # cffi -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.14.0 # via sphinx-book-theme pygments==2.16.1 # via @@ -228,10 +228,6 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -python-dateutil==2.8.2 - # via - # -r requirements/base.txt - # edx-drf-extensions python-slugify==8.0.1 # via # -r requirements/base.txt @@ -277,8 +273,6 @@ six==1.16.0 # edx-auth-backends # edx-ccx-keys # edx-django-release-util - # edx-drf-extensions - # python-dateutil slumber==0.7.1 # via # -r requirements/base.txt @@ -329,7 +323,7 @@ text-unidecode==1.3 # via # -r requirements/base.txt # python-slugify -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/base.txt # asgiref @@ -340,9 +334,10 @@ unicodecsv==0.14.1 # via # -r requirements/base.txt # djangorestframework-csv -urllib3==2.0.4 +urllib3==1.26.16 # via + # -c requirements/constraints.txt # -r requirements/base.txt # requests -zipp==3.16.2 +zipp==3.17.0 # via importlib-metadata diff --git a/requirements/github.in b/requirements/github.in index 94c4fb28f..09284d2bd 100644 --- a/requirements/github.in +++ b/requirements/github.in @@ -2,3 +2,5 @@ -c constraints.txt -r tox.txt + +coverage diff --git a/requirements/github.txt b/requirements/github.txt index 7b52d70f7..75201e442 100644 --- a/requirements/github.txt +++ b/requirements/github.txt @@ -4,11 +4,13 @@ # # make upgrade # +coverage==7.3.1 + # via -r requirements/github.in distlib==0.3.7 # via # -r requirements/tox.txt # virtualenv -filelock==3.12.3 +filelock==3.12.4 # via # -r requirements/tox.txt # tox @@ -44,10 +46,6 @@ tox==3.28.0 # tox-battery tox-battery==0.6.2 # via -r requirements/tox.txt -typing-extensions==4.7.1 - # via - # -r requirements/tox.txt - # filelock virtualenv==20.24.5 # via # -r requirements/tox.txt diff --git a/requirements/local.txt b/requirements/local.txt index b5472d0f0..f05f71e72 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -114,7 +114,7 @@ django-crum==0.7.9 # edx-toggles django-debug-toolbar==4.2.0 # via -r requirements/local.in -django-dynamic-fixture==4.0.0 +django-dynamic-fixture==4.0.1 # via -r requirements/test.txt django-lang-pref-middleware==1.3.0 # via -r requirements/test.txt @@ -158,9 +158,9 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.2 +edx-drf-extensions==8.9.3 # via -r requirements/test.txt -edx-i18n-tools==1.1.0 +edx-i18n-tools==1.2.0 # via -r requirements/test.txt edx-lint==5.3.4 # via -r requirements/test.txt @@ -177,7 +177,7 @@ exceptiongroup==1.1.3 # via # -r requirements/test.txt # pytest -filelock==3.12.3 +filelock==3.12.4 # via # -r requirements/tox.txt # tox @@ -204,7 +204,7 @@ jinja2==3.1.2 # via # -r requirements/test.txt # code-annotations -lazy==1.5 +lazy==1.6 # via # -r requirements/test.txt # bok-choy @@ -339,10 +339,6 @@ pytest-cov==4.1.0 # via -r requirements/test.txt pytest-django==4.5.2 # via -r requirements/test.txt -python-dateutil==2.8.2 - # via - # -r requirements/test.txt - # edx-drf-extensions python-slugify==8.0.1 # via # -r requirements/test.txt @@ -391,9 +387,7 @@ six==1.16.0 # edx-auth-backends # edx-ccx-keys # edx-django-release-util - # edx-drf-extensions # edx-lint - # python-dateutil # tox slumber==0.7.1 # via @@ -423,7 +417,7 @@ stevedore==5.1.0 # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==7.1.0 +testfixtures==7.2.0 # via -r requirements/test.txt text-unidecode==1.3 # via @@ -452,22 +446,21 @@ tox==3.28.0 # tox-battery tox-battery==0.6.2 # via -r requirements/tox.txt -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/test.txt - # -r requirements/tox.txt # asgiref # astroid # django-countries # edx-opaque-keys - # filelock # pylint unicodecsv==0.14.1 # via # -r requirements/test.txt # djangorestframework-csv -urllib3==2.0.4 +urllib3==1.26.16 # via + # -c requirements/constraints.txt # -r requirements/test.txt # requests # selenium @@ -483,7 +476,7 @@ wrapt==1.15.0 # via # -r requirements/test.txt # astroid -zipp==3.16.2 +zipp==3.17.0 # via # -r requirements/pip_tools.txt # importlib-metadata diff --git a/requirements/pip.txt b/requirements/pip.txt index a53f711a5..3e7d8f4a8 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -10,5 +10,5 @@ wheel==0.41.2 # The following packages are considered to be unsafe in a requirements file: pip==23.2.1 # via -r requirements/pip.in -setuptools==68.2.1 +setuptools==68.2.2 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index 3a6a0e240..05d07313e 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -23,7 +23,7 @@ tomli==2.0.1 # pyproject-hooks wheel==0.41.2 # via pip-tools -zipp==3.16.2 +zipp==3.17.0 # 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 f6ccbd429..39ee68150 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -119,9 +119,9 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.2 +edx-drf-extensions==8.9.3 # via -r requirements/base.txt -edx-i18n-tools==1.1.0 +edx-i18n-tools==1.2.0 # via -r requirements/base.txt edx-opaque-keys==2.5.0 # via @@ -208,10 +208,6 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -python-dateutil==2.8.2 - # via - # -r requirements/base.txt - # edx-drf-extensions python-memcached==1.59 # via -r requirements/production.in python-slugify==8.0.1 @@ -258,8 +254,6 @@ six==1.16.0 # edx-auth-backends # edx-ccx-keys # edx-django-release-util - # edx-drf-extensions - # python-dateutil # python-memcached slumber==0.7.1 # via @@ -288,7 +282,7 @@ text-unidecode==1.3 # via # -r requirements/base.txt # python-slugify -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/base.txt # asgiref @@ -298,8 +292,9 @@ unicodecsv==0.14.1 # via # -r requirements/base.txt # djangorestframework-csv -urllib3==2.0.4 +urllib3==1.26.16 # via + # -c requirements/constraints.txt # -r requirements/base.txt # requests diff --git a/requirements/test.txt b/requirements/test.txt index f87d214ca..15707cedb 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -96,7 +96,7 @@ django-crum==0.7.9 # -r requirements/base.txt # edx-django-utils # edx-toggles -django-dynamic-fixture==4.0.0 +django-dynamic-fixture==4.0.1 # via -r requirements/test.in django-lang-pref-middleware==1.3.0 # via -r requirements/base.txt @@ -140,9 +140,9 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.2 +edx-drf-extensions==8.9.3 # via -r requirements/base.txt -edx-i18n-tools==1.1.0 +edx-i18n-tools==1.2.0 # via -r requirements/base.txt edx-lint==5.3.4 # via -r requirements/test.in @@ -171,7 +171,7 @@ jinja2==3.1.2 # via # -r requirements/base.txt # code-annotations -lazy==1.5 +lazy==1.6 # via bok-choy lazy-object-proxy==1.9.0 # via astroid @@ -269,10 +269,6 @@ pytest-cov==4.1.0 # via -r requirements/test.in pytest-django==4.5.2 # via -r requirements/test.in -python-dateutil==2.8.2 - # via - # -r requirements/base.txt - # edx-drf-extensions python-slugify==8.0.1 # via # -r requirements/base.txt @@ -320,9 +316,7 @@ six==1.16.0 # edx-auth-backends # edx-ccx-keys # edx-django-release-util - # edx-drf-extensions # edx-lint - # python-dateutil slumber==0.7.1 # via # -r requirements/base.txt @@ -348,7 +342,7 @@ stevedore==5.1.0 # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==7.1.0 +testfixtures==7.2.0 # via -r requirements/test.in text-unidecode==1.3 # via @@ -361,7 +355,7 @@ tomli==2.0.1 # pytest tomlkit==0.12.1 # via pylint -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/base.txt # asgiref @@ -373,8 +367,9 @@ unicodecsv==0.14.1 # via # -r requirements/base.txt # djangorestframework-csv -urllib3==2.0.4 +urllib3==1.26.16 # via + # -c requirements/constraints.txt # -r requirements/base.txt # requests # selenium diff --git a/requirements/tox.txt b/requirements/tox.txt index 3515dd677..d443f179c 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -6,7 +6,7 @@ # distlib==0.3.7 # via virtualenv -filelock==3.12.3 +filelock==3.12.4 # via # tox # virtualenv @@ -29,7 +29,5 @@ tox==3.28.0 # tox-battery tox-battery==0.6.2 # via -r requirements/tox.in -typing-extensions==4.7.1 - # via filelock virtualenv==20.24.5 # via tox