tutor-notes 16.0.2__tar.gz → 18.0.0__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.
- {tutor-notes-16.0.2/tutor_notes.egg-info → tutor-notes-18.0.0}/PKG-INFO +11 -9
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/README.rst +5 -5
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/setup.py +5 -4
- {tutor-notes-16.0.2 → tutor-notes-18.0.0/tutor_notes.egg-info}/PKG-INFO +11 -9
- tutor-notes-18.0.0/tutor_notes.egg-info/requires.txt +4 -0
- tutor-notes-18.0.0/tutornotes/__about__.py +1 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/plugin.py +55 -56
- tutor-notes-18.0.0/tutornotes/templates/notes/build/notes/Dockerfile +38 -0
- tutor-notes-16.0.2/tutor_notes.egg-info/requires.txt +0 -1
- tutor-notes-16.0.2/tutornotes/__about__.py +0 -8
- tutor-notes-16.0.2/tutornotes/templates/notes/build/notes/Dockerfile +0 -30
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/LICENSE.txt +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/MANIFEST.in +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/pyproject.toml +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/setup.cfg +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutor_notes.egg-info/SOURCES.txt +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutor_notes.egg-info/dependency_links.txt +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutor_notes.egg-info/entry_points.txt +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutor_notes.egg-info/top_level.txt +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/__init__.py +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/caddyfile +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/k8s-deployments +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/k8s-jobs +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/k8s-services +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/kustomization-configmapgenerator +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-dev-services +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-jobs-services +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-permissions-command +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-permissions-volumes +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-services +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/openedx-common-settings +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/openedx-lms-common-settings +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/openedx-lms-development-settings +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/openedx-lms-production-settings +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/templates/notes/apps/settings/tutor.py +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/templates/notes/tasks/lms/init +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/templates/notes/tasks/mysql/init +0 -0
- {tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/templates/notes/tasks/notes/init +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tutor-notes
|
|
3
|
-
Version:
|
|
3
|
+
Version: 18.0.0
|
|
4
4
|
Summary: A Tutor plugin for student notes
|
|
5
|
-
Home-page: https://docs.tutor.
|
|
5
|
+
Home-page: https://docs.tutor.edly.io/
|
|
6
6
|
Author: Overhang.IO
|
|
7
7
|
Author-email: contact@overhang.io
|
|
8
8
|
Maintainer: eduNEXT
|
|
9
9
|
License: AGPLv3
|
|
10
|
-
Project-URL: Documentation, https://docs.tutor.
|
|
10
|
+
Project-URL: Documentation, https://docs.tutor.edly.io/
|
|
11
11
|
Project-URL: Code, https://github.com/overhangio/tutor-notes
|
|
12
12
|
Project-URL: Issue tracker, https://github.com/overhangio/tutor-notes/issues
|
|
13
13
|
Project-URL: Community, https://discuss.openedx.org
|
|
@@ -23,14 +23,16 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Requires-Python: >=3.8
|
|
25
25
|
License-File: LICENSE.txt
|
|
26
|
-
Requires-Dist: tutor<
|
|
26
|
+
Requires-Dist: tutor<19.0.0,>=18.0.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: tutor[dev]<19.0.0,>=18.0.0; extra == "dev"
|
|
27
29
|
|
|
28
|
-
Students notes plugin for `Tutor <https://docs.tutor.
|
|
30
|
+
Students notes plugin for `Tutor <https://docs.tutor.edly.io>`_
|
|
29
31
|
===================================================================
|
|
30
32
|
|
|
31
|
-
This is a plugin for `Tutor <https://docs.tutor.
|
|
33
|
+
This is a plugin for `Tutor <https://docs.tutor.edly.io>`_ to easily add the `Open edX note-taking app <https://github.com/openedx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/exercises_tools/notes.html>`_).
|
|
32
34
|
|
|
33
|
-
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-
|
|
35
|
+
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/_images/SFD_SN_bodyexample.png
|
|
34
36
|
:alt: Notes in action
|
|
35
37
|
|
|
36
38
|
Installation
|
|
@@ -50,7 +52,7 @@ Then, to make migrations & tasks::
|
|
|
50
52
|
|
|
51
53
|
You should beware that the ``notes.<LMS_HOST>`` domain name should exist and point to your server. For instance, if your LMS is hosted at http://myopenedx.com, the notes service should be found at http://notes.myopenedx.com.
|
|
52
54
|
|
|
53
|
-
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.
|
|
55
|
+
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.edly.io.
|
|
54
56
|
|
|
55
57
|
To enable student notes for a specific course, you should go to the course advanced settings in the studio, and set "Enable Student Notes" to "true". Then, hit "save changes".
|
|
56
58
|
|
|
@@ -81,7 +83,7 @@ Feel free to add breakpoints (``breakpoint()``) anywhere in your source code to
|
|
|
81
83
|
Troubleshooting
|
|
82
84
|
---------------
|
|
83
85
|
|
|
84
|
-
This Tutor plugin is maintained by Jhony Avella from `eduNEXT <https://www.edunext.co/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.
|
|
86
|
+
This Tutor plugin is maintained by Jhony Avella from `eduNEXT <https://www.edunext.co/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.edly.io/troubleshooting.html>`__ section from the Tutor documentation.
|
|
85
87
|
|
|
86
88
|
License
|
|
87
89
|
-------
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Students notes plugin for `Tutor <https://docs.tutor.
|
|
1
|
+
Students notes plugin for `Tutor <https://docs.tutor.edly.io>`_
|
|
2
2
|
===================================================================
|
|
3
3
|
|
|
4
|
-
This is a plugin for `Tutor <https://docs.tutor.
|
|
4
|
+
This is a plugin for `Tutor <https://docs.tutor.edly.io>`_ to easily add the `Open edX note-taking app <https://github.com/openedx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/exercises_tools/notes.html>`_).
|
|
5
5
|
|
|
6
|
-
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-
|
|
6
|
+
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/_images/SFD_SN_bodyexample.png
|
|
7
7
|
:alt: Notes in action
|
|
8
8
|
|
|
9
9
|
Installation
|
|
@@ -23,7 +23,7 @@ Then, to make migrations & tasks::
|
|
|
23
23
|
|
|
24
24
|
You should beware that the ``notes.<LMS_HOST>`` domain name should exist and point to your server. For instance, if your LMS is hosted at http://myopenedx.com, the notes service should be found at http://notes.myopenedx.com.
|
|
25
25
|
|
|
26
|
-
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.
|
|
26
|
+
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.edly.io.
|
|
27
27
|
|
|
28
28
|
To enable student notes for a specific course, you should go to the course advanced settings in the studio, and set "Enable Student Notes" to "true". Then, hit "save changes".
|
|
29
29
|
|
|
@@ -54,7 +54,7 @@ Feel free to add breakpoints (``breakpoint()``) anywhere in your source code to
|
|
|
54
54
|
Troubleshooting
|
|
55
55
|
---------------
|
|
56
56
|
|
|
57
|
-
This Tutor plugin is maintained by Jhony Avella from `eduNEXT <https://www.edunext.co/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.
|
|
57
|
+
This Tutor plugin is maintained by Jhony Avella from `eduNEXT <https://www.edunext.co/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.edly.io/troubleshooting.html>`__ section from the Tutor documentation.
|
|
58
58
|
|
|
59
59
|
License
|
|
60
60
|
-------
|
|
@@ -15,10 +15,10 @@ with io.open(
|
|
|
15
15
|
|
|
16
16
|
setup(
|
|
17
17
|
name="tutor-notes",
|
|
18
|
-
version=about["
|
|
19
|
-
url="https://docs.tutor.
|
|
18
|
+
version=about["__version__"],
|
|
19
|
+
url="https://docs.tutor.edly.io/",
|
|
20
20
|
project_urls={
|
|
21
|
-
"Documentation": "https://docs.tutor.
|
|
21
|
+
"Documentation": "https://docs.tutor.edly.io/",
|
|
22
22
|
"Code": "https://github.com/overhangio/tutor-notes",
|
|
23
23
|
"Issue tracker": "https://github.com/overhangio/tutor-notes/issues",
|
|
24
24
|
"Community": "https://discuss.openedx.org",
|
|
@@ -32,7 +32,8 @@ setup(
|
|
|
32
32
|
packages=find_packages(exclude=["tests*"]),
|
|
33
33
|
include_package_data=True,
|
|
34
34
|
python_requires=">=3.8",
|
|
35
|
-
install_requires=["tutor>=
|
|
35
|
+
install_requires=["tutor>=18.0.0,<19.0.0"],
|
|
36
|
+
extras_require={"dev": ["tutor[dev]>=18.0.0,<19.0.0"]},
|
|
36
37
|
entry_points={"tutor.plugin.v1": ["notes = tutornotes.plugin"]},
|
|
37
38
|
classifiers=[
|
|
38
39
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tutor-notes
|
|
3
|
-
Version:
|
|
3
|
+
Version: 18.0.0
|
|
4
4
|
Summary: A Tutor plugin for student notes
|
|
5
|
-
Home-page: https://docs.tutor.
|
|
5
|
+
Home-page: https://docs.tutor.edly.io/
|
|
6
6
|
Author: Overhang.IO
|
|
7
7
|
Author-email: contact@overhang.io
|
|
8
8
|
Maintainer: eduNEXT
|
|
9
9
|
License: AGPLv3
|
|
10
|
-
Project-URL: Documentation, https://docs.tutor.
|
|
10
|
+
Project-URL: Documentation, https://docs.tutor.edly.io/
|
|
11
11
|
Project-URL: Code, https://github.com/overhangio/tutor-notes
|
|
12
12
|
Project-URL: Issue tracker, https://github.com/overhangio/tutor-notes/issues
|
|
13
13
|
Project-URL: Community, https://discuss.openedx.org
|
|
@@ -23,14 +23,16 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Requires-Python: >=3.8
|
|
25
25
|
License-File: LICENSE.txt
|
|
26
|
-
Requires-Dist: tutor<
|
|
26
|
+
Requires-Dist: tutor<19.0.0,>=18.0.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: tutor[dev]<19.0.0,>=18.0.0; extra == "dev"
|
|
27
29
|
|
|
28
|
-
Students notes plugin for `Tutor <https://docs.tutor.
|
|
30
|
+
Students notes plugin for `Tutor <https://docs.tutor.edly.io>`_
|
|
29
31
|
===================================================================
|
|
30
32
|
|
|
31
|
-
This is a plugin for `Tutor <https://docs.tutor.
|
|
33
|
+
This is a plugin for `Tutor <https://docs.tutor.edly.io>`_ to easily add the `Open edX note-taking app <https://github.com/openedx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/exercises_tools/notes.html>`_).
|
|
32
34
|
|
|
33
|
-
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-
|
|
35
|
+
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/_images/SFD_SN_bodyexample.png
|
|
34
36
|
:alt: Notes in action
|
|
35
37
|
|
|
36
38
|
Installation
|
|
@@ -50,7 +52,7 @@ Then, to make migrations & tasks::
|
|
|
50
52
|
|
|
51
53
|
You should beware that the ``notes.<LMS_HOST>`` domain name should exist and point to your server. For instance, if your LMS is hosted at http://myopenedx.com, the notes service should be found at http://notes.myopenedx.com.
|
|
52
54
|
|
|
53
|
-
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.
|
|
55
|
+
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.edly.io.
|
|
54
56
|
|
|
55
57
|
To enable student notes for a specific course, you should go to the course advanced settings in the studio, and set "Enable Student Notes" to "true". Then, hit "save changes".
|
|
56
58
|
|
|
@@ -81,7 +83,7 @@ Feel free to add breakpoints (``breakpoint()``) anywhere in your source code to
|
|
|
81
83
|
Troubleshooting
|
|
82
84
|
---------------
|
|
83
85
|
|
|
84
|
-
This Tutor plugin is maintained by Jhony Avella from `eduNEXT <https://www.edunext.co/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.
|
|
86
|
+
This Tutor plugin is maintained by Jhony Avella from `eduNEXT <https://www.edunext.co/>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.edly.io/troubleshooting.html>`__ section from the Tutor documentation.
|
|
85
87
|
|
|
86
88
|
License
|
|
87
89
|
-------
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "18.0.0"
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from glob import glob
|
|
4
3
|
import os
|
|
5
4
|
import typing as t
|
|
5
|
+
from glob import glob
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import importlib_resources
|
|
9
8
|
from tutor import hooks as tutor_hooks
|
|
9
|
+
from tutor.__about__ import __version_suffix__
|
|
10
10
|
|
|
11
11
|
from .__about__ import __version__
|
|
12
12
|
|
|
13
|
+
# Handle version suffix in nightly mode, just like tutor core
|
|
14
|
+
if __version_suffix__:
|
|
15
|
+
__version__ += "-" + __version_suffix__
|
|
16
|
+
|
|
13
17
|
config = {
|
|
14
|
-
"unique": {
|
|
15
|
-
"MYSQL_PASSWORD": "{{ 8|random_string }}",
|
|
16
|
-
"SECRET_KEY": "{{ 24|random_string }}",
|
|
17
|
-
"OAUTH2_SECRET": "{{ 24|random_string }}",
|
|
18
|
-
},
|
|
19
18
|
"defaults": {
|
|
20
19
|
"VERSION": __version__,
|
|
21
20
|
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-notes:{{ NOTES_VERSION }}",
|
|
@@ -25,49 +24,56 @@ config = {
|
|
|
25
24
|
"REPOSITORY": "https://github.com/openedx/edx-notes-api",
|
|
26
25
|
"REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}",
|
|
27
26
|
},
|
|
27
|
+
"unique": {
|
|
28
|
+
"MYSQL_PASSWORD": "{{ 8|random_string }}",
|
|
29
|
+
"SECRET_KEY": "{{ 24|random_string }}",
|
|
30
|
+
"OAUTH2_SECRET": "{{ 24|random_string }}",
|
|
31
|
+
},
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
# To add a custom initialization task, create a bash script template under:
|
|
33
|
-
# tutorcodejail/templates/codejail/tasks/
|
|
34
|
-
# and then add it to the MY_INIT_TASKS list. Each task is in the format:
|
|
35
|
-
# ("<service>", ("<path>", "<to>", "<script>", "<template>"))
|
|
36
|
-
MY_INIT_TASKS: list[tuple[str, tuple[str, ...]]] = [
|
|
37
|
-
("mysql", ("notes", "tasks", "mysql", "init")),
|
|
38
|
-
("lms", ("notes", "tasks", "lms", "init")),
|
|
39
|
-
("notes", ("notes", "tasks", "notes", "init")),
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
# For each task added to MY_INIT_TASKS, we load the task template
|
|
34
|
+
# For each service, we load the task template
|
|
43
35
|
# and add it to the CLI_DO_INIT_TASKS filter, which tells Tutor to
|
|
44
36
|
# run it as part of the `init` job.
|
|
45
|
-
for service,
|
|
46
|
-
full_path: str =
|
|
47
|
-
|
|
37
|
+
for service in ["mysql", "lms", "notes"]:
|
|
38
|
+
full_path: str = str(
|
|
39
|
+
importlib_resources.files("tutornotes")
|
|
40
|
+
/ "templates"
|
|
41
|
+
/ "notes"
|
|
42
|
+
/ "tasks"
|
|
43
|
+
/ service
|
|
44
|
+
/ "init"
|
|
48
45
|
)
|
|
49
46
|
with open(full_path, encoding="utf-8") as init_task_file:
|
|
50
47
|
init_task: str = init_task_file.read()
|
|
51
48
|
tutor_hooks.Filters.CLI_DO_INIT_TASKS.add_item((service, init_task))
|
|
52
49
|
|
|
53
50
|
# Image management
|
|
54
|
-
tutor_hooks.Filters.IMAGES_BUILD.add_item(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
51
|
+
tutor_hooks.Filters.IMAGES_BUILD.add_item(
|
|
52
|
+
(
|
|
53
|
+
"notes",
|
|
54
|
+
("plugins", "notes", "build", "notes"),
|
|
55
|
+
"{{ NOTES_DOCKER_IMAGE }}",
|
|
56
|
+
(),
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
tutor_hooks.Filters.IMAGES_PULL.add_item(
|
|
60
|
+
(
|
|
61
|
+
"notes",
|
|
62
|
+
"{{ NOTES_DOCKER_IMAGE }}",
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
tutor_hooks.Filters.IMAGES_PUSH.add_item(
|
|
66
|
+
(
|
|
67
|
+
"notes",
|
|
68
|
+
"{{ NOTES_DOCKER_IMAGE }}",
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
|
|
68
72
|
|
|
69
73
|
@tutor_hooks.Filters.COMPOSE_MOUNTS.add()
|
|
70
|
-
def _mount_edx_notes_api(
|
|
74
|
+
def _mount_edx_notes_api(
|
|
75
|
+
volumes: list[tuple[str, str]], name: str
|
|
76
|
+
) -> list[tuple[str, str]]:
|
|
71
77
|
"""
|
|
72
78
|
When mounting edx-notes-api with `--mount=/path/to/edx-notes-api`,
|
|
73
79
|
bind-mount the host repo in the notes container.
|
|
@@ -80,10 +86,10 @@ def _mount_edx_notes_api(volumes, name):
|
|
|
80
86
|
]
|
|
81
87
|
return volumes
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
|
|
84
90
|
# Add the "templates" folder as a template root
|
|
85
91
|
tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
|
|
86
|
-
|
|
92
|
+
str(importlib_resources.files("tutornotes") / "templates")
|
|
87
93
|
)
|
|
88
94
|
# Render the "build" and "apps" folders
|
|
89
95
|
tutor_hooks.Filters.ENV_TEMPLATE_TARGETS.add_items(
|
|
@@ -93,36 +99,29 @@ tutor_hooks.Filters.ENV_TEMPLATE_TARGETS.add_items(
|
|
|
93
99
|
],
|
|
94
100
|
)
|
|
95
101
|
# Load patches from files
|
|
96
|
-
for path in glob(
|
|
97
|
-
os.path.join(
|
|
98
|
-
pkg_resources.resource_filename("tutornotes", "patches"),
|
|
99
|
-
"*",
|
|
100
|
-
)
|
|
101
|
-
):
|
|
102
|
+
for path in glob(str(importlib_resources.files("tutornotes") / "patches" / "*")):
|
|
102
103
|
with open(path, encoding="utf-8") as patch_file:
|
|
103
104
|
tutor_hooks.Filters.ENV_PATCHES.add_item(
|
|
104
105
|
(os.path.basename(path), patch_file.read())
|
|
105
106
|
)
|
|
107
|
+
|
|
106
108
|
# Add configuration entries
|
|
107
109
|
tutor_hooks.Filters.CONFIG_DEFAULTS.add_items(
|
|
108
|
-
[
|
|
109
|
-
(f"NOTES_{key}", value)
|
|
110
|
-
for key, value in config.get("defaults", {}).items()
|
|
111
|
-
]
|
|
110
|
+
[(f"NOTES_{key}", value) for key, value in config.get("defaults", {}).items()]
|
|
112
111
|
)
|
|
113
112
|
tutor_hooks.Filters.CONFIG_UNIQUE.add_items(
|
|
114
|
-
[
|
|
115
|
-
(f"NOTES_{key}", value)
|
|
116
|
-
for key, value in config.get("unique", {}).items()
|
|
117
|
-
]
|
|
113
|
+
[(f"NOTES_{key}", value) for key, value in config.get("unique", {}).items()]
|
|
118
114
|
)
|
|
119
115
|
tutor_hooks.Filters.CONFIG_OVERRIDES.add_items(
|
|
120
116
|
list(config.get("overrides", {}).items())
|
|
121
117
|
)
|
|
122
118
|
|
|
119
|
+
|
|
123
120
|
# Notes public hosts
|
|
124
121
|
@tutor_hooks.Filters.APP_PUBLIC_HOSTS.add()
|
|
125
|
-
def _notes_public_hosts(
|
|
122
|
+
def _notes_public_hosts(
|
|
123
|
+
hosts: list[str], context_name: t.Literal["local", "dev"]
|
|
124
|
+
) -> list[str]:
|
|
126
125
|
if context_name == "dev":
|
|
127
126
|
hosts += ["{{ NOTES_HOST }}:8120"]
|
|
128
127
|
else:
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1.4
|
|
2
|
+
FROM docker.io/python:3.12-slim-bookworm
|
|
3
|
+
|
|
4
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
5
|
+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
6
|
+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
7
|
+
apt update && \
|
|
8
|
+
apt upgrade -y && \
|
|
9
|
+
apt install -y \
|
|
10
|
+
locales \
|
|
11
|
+
git \
|
|
12
|
+
python3-dev \
|
|
13
|
+
build-essential \
|
|
14
|
+
default-libmysqlclient-dev \
|
|
15
|
+
pkg-config && \
|
|
16
|
+
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
|
17
|
+
locale-gen
|
|
18
|
+
ENV LC_ALL en_US.UTF-8
|
|
19
|
+
|
|
20
|
+
###### Git-clone Notes repo ######
|
|
21
|
+
ARG APP_USER_ID=1000
|
|
22
|
+
RUN useradd --home-dir /app --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
|
23
|
+
USER ${APP_USER_ID}
|
|
24
|
+
|
|
25
|
+
RUN git clone {{ NOTES_REPOSITORY }} --branch {{ NOTES_REPOSITORY_VERSION }} --depth 1 /app/edx-notes-api
|
|
26
|
+
WORKDIR /app/edx-notes-api
|
|
27
|
+
|
|
28
|
+
###### Install python venv ######
|
|
29
|
+
RUN python -m venv /app/venv
|
|
30
|
+
ENV PATH /app/venv/bin:${PATH}
|
|
31
|
+
# https://pypi.org/project/setuptools/
|
|
32
|
+
# https://pypi.org/project/pip/
|
|
33
|
+
# https://pypi.org/project/wheel/
|
|
34
|
+
RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install setuptools==69.2.0 pip==24.0 wheel==0.43.0
|
|
35
|
+
RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install -r requirements/base.txt
|
|
36
|
+
|
|
37
|
+
EXPOSE 8000
|
|
38
|
+
CMD gunicorn --workers=2 --name notes --bind=0.0.0.0:8000 --max-requests=1000 notesserver.wsgi:application
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tutor<17.0.0,>=16.0.0
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %}
|
|
2
|
-
FROM docker.io/ubuntu:20.04
|
|
3
|
-
|
|
4
|
-
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
5
|
-
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
|
|
6
|
-
apt update && \
|
|
7
|
-
apt upgrade -y && \
|
|
8
|
-
# python 3.8
|
|
9
|
-
apt install -y language-pack-en git python3 python3-pip python3-venv libmysqlclient-dev
|
|
10
|
-
RUN ln -s /usr/bin/python3 /usr/bin/python
|
|
11
|
-
|
|
12
|
-
###### Git-clone Notes repo ######
|
|
13
|
-
ARG APP_USER_ID=1000
|
|
14
|
-
RUN useradd --home-dir /app --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
|
15
|
-
USER ${APP_USER_ID}
|
|
16
|
-
|
|
17
|
-
RUN git clone {{ NOTES_REPOSITORY }} --branch {{ NOTES_REPOSITORY_VERSION }} --depth 1 /app/edx-notes-api
|
|
18
|
-
WORKDIR /app/edx-notes-api
|
|
19
|
-
|
|
20
|
-
###### Install python venv ######
|
|
21
|
-
RUN python -m venv /app/venv
|
|
22
|
-
ENV PATH /app/venv/bin:${PATH}
|
|
23
|
-
# https://pypi.org/project/setuptools/
|
|
24
|
-
# https://pypi.org/project/pip/
|
|
25
|
-
# https://pypi.org/project/wheel/
|
|
26
|
-
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/app/.cache/pip,sharing=shared {% endif %}pip install setuptools==67.8.0 pip==23.1.2 wheel==0.40.0
|
|
27
|
-
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/app/.cache/pip,sharing=shared {% endif %}pip install -r requirements/base.txt
|
|
28
|
-
|
|
29
|
-
EXPOSE 8000
|
|
30
|
-
CMD gunicorn --workers=2 --name notes --bind=0.0.0.0:8000 --max-requests=1000 notesserver.wsgi:application
|
|
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
|
{tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/kustomization-configmapgenerator
RENAMED
|
File without changes
|
{tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-dev-services
RENAMED
|
File without changes
|
{tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/local-docker-compose-jobs-services
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/openedx-lms-development-settings
RENAMED
|
File without changes
|
{tutor-notes-16.0.2 → tutor-notes-18.0.0}/tutornotes/patches/openedx-lms-production-settings
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|