-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from eduNEXT/lfc/sumac-support
perf: sumac release support
- Loading branch information
Showing
36 changed files
with
983 additions
and
299 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test suite workflow | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
|
||
jobs: | ||
run_tests: | ||
name: tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
python-version: ['3.11'] | ||
toxenv: [django42] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install pip | ||
run: pip install -r requirements/pip.txt | ||
|
||
- name: Install Dependencies | ||
run: pip install -r requirements/ci.txt | ||
|
||
- name: Run Tests | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
run: tox |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Run commitlint on the commit messages in a pull request. | ||
|
||
name: Lint Commit Messages | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
commitlint: | ||
uses: openedx/.github/.github/workflows/commitlint.yml@master |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Flow Control Django application initialization. | ||
""" | ||
|
||
from django.apps import AppConfig | ||
|
||
|
||
class FlowControlConfig(AppConfig): | ||
""" | ||
Configuration for the Flow Control Django application. | ||
""" | ||
name = "flow_control" | ||
|
||
plugin_app = { | ||
"settings_config": { | ||
"lms.djangoapp": { | ||
"common": {"relative_path": "settings.common"}, | ||
"test": {"relative_path": "settings.test"}, | ||
"production": {"relative_path": "settings.production"}, | ||
}, | ||
"cms.djangoapp": { | ||
"common": {"relative_path": "settings.common"}, | ||
"test": {"relative_path": "settings.test"}, | ||
"production": {"relative_path": "settings.production"}, | ||
}, | ||
} | ||
} |
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
Score module definitions for Open edX Sumac release. | ||
""" | ||
# pylint: disable=import-error | ||
from lms.djangoapps.courseware.model_data import ScoresClient | ||
|
||
|
||
def get_score_module(*args, **kwargs): | ||
""" | ||
Get ScoresClient model. | ||
Returns: | ||
ScoresClient: ScoresClient object. | ||
""" | ||
return ScoresClient(*args, **kwargs) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Score module generalized definitions. | ||
""" | ||
|
||
from importlib import import_module | ||
from django.conf import settings | ||
|
||
|
||
def get_score_module_function(*args, **kwargs): | ||
"""Get ScoreModule model.""" | ||
|
||
backend_function = settings.FLOW_CONTROL_SCORE_MODULE_BACKEND | ||
backend = import_module(backend_function) | ||
|
||
return backend.get_score_module(*args, **kwargs) | ||
|
||
|
||
score_module = get_score_module_function |
Oops, something went wrong.