ol-openedx-git-auto-export 0.3.2__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ol-openedx-git-auto-export-0.3.2/ol_openedx_git_auto_export.egg-info → ol-openedx-git-auto-export-0.4.1}/PKG-INFO +1 -1
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/signals.py +14 -14
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1/ol_openedx_git_auto_export.egg-info}/PKG-INFO +1 -1
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export.egg-info/requires.txt +1 -1
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/setup.py +2 -2
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/MANIFEST.in +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/__init__.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/backend_shim.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/__init__.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/app.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/constants.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/settings/__init__.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/settings/common.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/settings/production.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export/tasks.py +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export.egg-info/SOURCES.txt +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export.egg-info/dependency_links.txt +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export.egg-info/entry_points.txt +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export.egg-info/namespace_packages.txt +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/ol_openedx_git_auto_export.egg-info/top_level.txt +0 -0
- {ol-openedx-git-auto-export-0.3.2 → ol-openedx-git-auto-export-0.4.1}/setup.cfg +0 -0
|
@@ -2,8 +2,7 @@ import logging
|
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
4
|
from django.conf import settings
|
|
5
|
-
from django
|
|
6
|
-
from xmodule.modulestore.django import SignalHandler, modulestore
|
|
5
|
+
from xmodule.modulestore.django import modulestore
|
|
7
6
|
|
|
8
7
|
from ol_openedx_git_auto_export.constants import ENABLE_GIT_AUTO_EXPORT
|
|
9
8
|
from ol_openedx_git_auto_export.tasks import async_export_to_git
|
|
@@ -11,7 +10,6 @@ from ol_openedx_git_auto_export.tasks import async_export_to_git
|
|
|
11
10
|
log = logging.getLogger(__name__)
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
@receiver(SignalHandler.course_published)
|
|
15
13
|
def listen_for_course_publish(
|
|
16
14
|
sender, # noqa: ARG001
|
|
17
15
|
course_key,
|
|
@@ -20,16 +18,6 @@ def listen_for_course_publish(
|
|
|
20
18
|
"""
|
|
21
19
|
Receives publishing signal and performs publishing related workflows
|
|
22
20
|
"""
|
|
23
|
-
git_repo_export_dir = getattr(
|
|
24
|
-
settings, "GIT_REPO_EXPORT_DIR", "/openedx/export_course_repos"
|
|
25
|
-
)
|
|
26
|
-
if not os.path.exists(git_repo_export_dir): # noqa: PTH110
|
|
27
|
-
# for development/docker/vagrant if GIT_REPO_EXPORT_DIR folder does not exist then create it # noqa: E501
|
|
28
|
-
log.error(
|
|
29
|
-
"GIT_REPO_EXPORT_DIR is not available in settings, please create it first"
|
|
30
|
-
)
|
|
31
|
-
os.makedirs(git_repo_export_dir, 0o755) # noqa: PTH103
|
|
32
|
-
|
|
33
21
|
if settings.FEATURES.get("ENABLE_EXPORT_GIT") and settings.FEATURES.get(
|
|
34
22
|
ENABLE_GIT_AUTO_EXPORT
|
|
35
23
|
):
|
|
@@ -40,9 +28,21 @@ def listen_for_course_publish(
|
|
|
40
28
|
course_module.id,
|
|
41
29
|
)
|
|
42
30
|
return
|
|
43
|
-
|
|
31
|
+
|
|
32
|
+
git_repo_export_dir = getattr(
|
|
33
|
+
settings, "GIT_REPO_EXPORT_DIR", "/openedx/export_course_repos"
|
|
34
|
+
)
|
|
35
|
+
if not os.path.exists(git_repo_export_dir): # noqa: PTH110
|
|
36
|
+
# for development/docker/vagrant if GIT_REPO_EXPORT_DIR folder does not exist then create it # noqa: E501
|
|
37
|
+
log.error(
|
|
38
|
+
"GIT_REPO_EXPORT_DIR is not available in settings, please create it first" # noqa: E501
|
|
39
|
+
)
|
|
40
|
+
os.makedirs(git_repo_export_dir, 0o755) # noqa: PTH103
|
|
41
|
+
|
|
44
42
|
log.info(
|
|
45
43
|
"Course published with auto-export enabled. Starting export... (course id: %s)", # noqa: E501
|
|
46
44
|
course_key,
|
|
47
45
|
)
|
|
46
|
+
|
|
47
|
+
# If the Git auto-export is enabled, push the course changes to Git
|
|
48
48
|
async_export_to_git.delay(str(course_key))
|
|
@@ -15,7 +15,7 @@ setup(**{
|
|
|
15
15
|
'Django>2.0',
|
|
16
16
|
'celery>=4.4.7',
|
|
17
17
|
'edx-django-utils>4.0.0',
|
|
18
|
-
'edx-opaque-keys<
|
|
18
|
+
'edx-opaque-keys<4.0.0,>=3.0.0',
|
|
19
19
|
),
|
|
20
20
|
'license': 'BSD-3-Clause',
|
|
21
21
|
'name': 'ol-openedx-git-auto-export',
|
|
@@ -29,5 +29,5 @@ setup(**{
|
|
|
29
29
|
'ol_openedx_git_auto_export.settings',
|
|
30
30
|
),
|
|
31
31
|
'python_requires': '>=3.8',
|
|
32
|
-
'version': '0.
|
|
32
|
+
'version': '0.4.1',
|
|
33
33
|
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|