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:
12
setup.cfg
12
setup.cfg
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user