Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix: fix CI workflow syntax (#1500)
Browse files Browse the repository at this point in the history
* fix: fix CI workflow syntax
* fix: docs and testing failure
---------

Co-authored-by: Alie Langston <[email protected]>
  • Loading branch information
UsamaSadiq and alangsto authored Sep 19, 2023
1 parent 69b18b0 commit e4b0cfb
Show file tree
Hide file tree
Showing 16 changed files with 94 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
# 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
fail_on_warning: true

# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.8"
install:
- requirements: requirements/doc.txt
2 changes: 1 addition & 1 deletion analytics_dashboard/core/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
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
from django.db import DatabaseError
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

Expand Down
73 changes: 38 additions & 35 deletions analytics_dashboard/courses/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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<assignment_type>[\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')
Expand All @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion common/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 7 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 7 additions & 12 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions requirements/github.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

-c constraints.txt
-r tox.txt

coverage
8 changes: 3 additions & 5 deletions requirements/github.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit e4b0cfb

Please sign in to comment.