This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c129b11
commit 0c8b3d8
Showing
15 changed files
with
70 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from django.conf.urls import include, url | ||
from django.urls import include, re_path | ||
from rest_framework.urlpatterns import format_suffix_patterns | ||
|
||
app_name = 'analytics_data_api' | ||
|
||
urlpatterns = [ | ||
url(r'^v0/', include('analytics_data_api.v0.urls')), | ||
url(r'^v1/', include('analytics_data_api.v1.urls')), | ||
re_path(r'^v0/', include('analytics_data_api.v0.urls')), | ||
re_path(r'^v1/', include('analytics_data_api.v1.urls')), | ||
] | ||
|
||
urlpatterns = format_suffix_patterns(urlpatterns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
default_app_config = 'analytics_data_api.v0.apps.ApiAppConfig' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
from django.conf.urls import include, url | ||
from django.urls import reverse_lazy | ||
from django.urls import include, path, reverse_lazy | ||
from django.views.generic import RedirectView | ||
|
||
app_name = 'analytics_data_api.v0' | ||
|
||
COURSE_ID_PATTERN = r'(?P<course_id>[^/+]+[/+][^/+]+[/+][^/]+)' | ||
|
||
urlpatterns = [ | ||
url(r'^courses/', include('analytics_data_api.v0.urls.courses')), | ||
url(r'^problems/', include('analytics_data_api.v0.urls.problems')), | ||
url(r'^videos/', include('analytics_data_api.v0.urls.videos')), | ||
url('^', include('analytics_data_api.v0.urls.learners')), | ||
url('^', include('analytics_data_api.v0.urls.course_summaries')), | ||
url('^', include('analytics_data_api.v0.urls.programs')), | ||
path('courses/', include('analytics_data_api.v0.urls.courses')), | ||
path('problems/', include('analytics_data_api.v0.urls.problems')), | ||
path('videos/', include('analytics_data_api.v0.urls.videos')), | ||
path('', include('analytics_data_api.v0.urls.learners')), | ||
path('', include('analytics_data_api.v0.urls.course_summaries')), | ||
path('', include('analytics_data_api.v0.urls.programs')), | ||
|
||
# pylint: disable=no-value-for-parameter | ||
url(r'^authenticated/$', RedirectView.as_view(url=reverse_lazy('authenticated')), name='authenticated'), | ||
url(r'^health/$', RedirectView.as_view(url=reverse_lazy('health')), name='health'), | ||
url(r'^status/$', RedirectView.as_view(url=reverse_lazy('status')), name='status'), | ||
path('authenticated/', RedirectView.as_view(url=reverse_lazy('authenticated')), name='authenticated'), | ||
path('health/', RedirectView.as_view(url=reverse_lazy('health')), name='health'), | ||
path('status/', RedirectView.as_view(url=reverse_lazy('status')), name='status'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from analytics_data_api.v0.views import course_summaries as views | ||
|
||
app_name = 'course_summaries' | ||
|
||
urlpatterns = [ | ||
url(r'^course_summaries/$', views.CourseSummariesView.as_view(), name='course_summaries'), | ||
re_path(r'^course_summaries/$', views.CourseSummariesView.as_view(), name='course_summaries'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from django.conf.urls import url | ||
from django.urls import path | ||
|
||
from analytics_data_api.v0.views import programs as views | ||
|
||
app_name = 'programs' | ||
|
||
urlpatterns = [ | ||
url(r'^programs/$', views.ProgramsView.as_view(), name='programs'), | ||
path('programs/', views.ProgramsView.as_view(), name='programs'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
[tox] | ||
skipsdist = True | ||
envlist = py38-django{32} | ||
envlist = py38-django{32, 42} | ||
|
||
[testenv] | ||
passenv = | ||
ELASTICSEARCH_LEARNERS_HOST | ||
COVERAGE_DIR | ||
setenv = | ||
tests: DJANGO_SETTINGS_MODULE = analyticsdataserver.settings.test | ||
NODE_BIN = ./node_modules/.bin | ||
PATH = $PATH:$NODE_BIN | ||
deps = | ||
django32: Django>=3.2,<3.3 | ||
-r requirements/test.txt | ||
commands = | ||
{posargs:pytest} | ||
passenv = | ||
ELASTICSEARCH_LEARNERS_HOST | ||
COVERAGE_DIR | ||
setenv = | ||
tests: DJANGO_SETTINGS_MODULE = analyticsdataserver.settings.test | ||
NODE_BIN = ./node_modules/.bin | ||
PATH = $PATH:$NODE_BIN | ||
deps = | ||
django32: Django>=3.2,<3.3 | ||
django42: Django>=4.2,<4.3 | ||
-r requirements/test.txt | ||
commands = | ||
{posargs:pytest} | ||
|
||
[testenv:docs] | ||
deps = | ||
deps = | ||
-r{toxinidir}/requirements/doc.txt | ||
allowlist_externals = | ||
allowlist_externals = | ||
make | ||
env | ||
setenv = | ||
# -W will treat warnings as errors. | ||
setenv = | ||
SPHINXOPTS = -W | ||
commands = | ||
# -e allows for overriding setting from the environment. | ||
# -C changes the directory to `docs` before running the command. | ||
commands = | ||
make -e -C docs/api clean | ||
make -e -C docs/api html |