refactor: update to use Learning Core's new public API

This also bumps our openedx-learning dependency to 0.10.0 (the first
version with the new openedx_learning.api package).
This commit is contained in:
David Ormsbee
2024-05-16 13:08:02 -04:00
parent f820961de5
commit be03938377
13 changed files with 59 additions and 56 deletions

View File

@@ -62,6 +62,7 @@ root_packages =
lms
cms
openedx
openedx_learning
include_external_packages = True
contract_types =
# Our custom contract which checks that we're only importing from 'api.py'
@@ -185,3 +186,14 @@ allowed_modules =
# Only imports from api.py are allowed elsewhere in the code
# See https://open-edx-proposals.readthedocs.io/en/latest/best-practices/oep-0049-django-app-patterns.html#api-py
api
[importlinter:contract:3]
name = Do not import apps from openedx-learning (only import from openedx_learning.api.* and openedx_learning.lib.*).
type = forbidden
source_modules =
cms
lms
openedx
forbidden_modules =
openedx_learning.apps
allow_indirect_imports = True