mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-25 06:18:23 +00:00
docs: improve the "Working on edx-platform Python dependencies" section (#1048)
This commit is contained in:
parent
e6cb076038
commit
943bee6cbe
1
changelog.d/20240425_105236_braden_bind_mount_docs.md
Normal file
1
changelog.d/20240425_105236_braden_bind_mount_docs.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
- [Improvement] Auto-detect bind mounts of openedx-learning for edx-platform (by @bradenmacdonald)
|
@ -100,6 +100,8 @@ Verify that your repository is properly bind-mounted by running ``tutor mounts l
|
|||||||
- service: cms-job
|
- service: cms-job
|
||||||
container_path: /mnt/edx-ora2
|
container_path: /mnt/edx-ora2
|
||||||
|
|
||||||
|
(If the ``_mounts`` entries are empty, it didn't work automatically - see below.)
|
||||||
|
|
||||||
You should then re-build the "openedx" Docker image to pick up your changes::
|
You should then re-build the "openedx" Docker image to pick up your changes::
|
||||||
|
|
||||||
tutor images build openedx-dev
|
tutor images build openedx-dev
|
||||||
@ -111,6 +113,18 @@ To push your changes in production, you should do the same with ``tutor local``
|
|||||||
tutor images build openedx
|
tutor images build openedx
|
||||||
tutor local start -d
|
tutor local start -d
|
||||||
|
|
||||||
|
What if my edx-platform package is not automatically bind-mounted?
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
It is quite possible that your package is not automatically recognized and bind-mounted by Tutor. Out of the box, Tutor defines a set of regular expressions: if your package name matches this regular expression, it will be automatically bind-mounted. But if it does not, you have to tell Tutor about it.
|
||||||
|
|
||||||
|
To do so, you will need to create a :ref:`Tutor plugin <plugin_development_tutorial>` that implements the :py:data:`tutor.hooks.Filters.MOUNTED_DIRECTORIES` filter::
|
||||||
|
|
||||||
|
from tutor import hooks
|
||||||
|
hooks.Filters.MOUNTED_DIRECTORIES.add_item(("openedx", "my-package"))
|
||||||
|
|
||||||
|
After you implement and enable that plugin, ``tutor mounts list`` should display your directory among the bind-mounted directories.
|
||||||
|
|
||||||
Debugging with breakpoints
|
Debugging with breakpoints
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
@ -153,18 +167,6 @@ Then, run unit tests with ``pytest`` commands::
|
|||||||
.. note::
|
.. note::
|
||||||
Getting all edx-platform unit tests to pass on Tutor is currently a work-in-progress. Some unit tests are still failing. If you manage to fix some of these, please report your findings in the `Open edX forum <https://discuss.openedx.org/tag/tutor>`__.
|
Getting all edx-platform unit tests to pass on Tutor is currently a work-in-progress. Some unit tests are still failing. If you manage to fix some of these, please report your findings in the `Open edX forum <https://discuss.openedx.org/tag/tutor>`__.
|
||||||
|
|
||||||
What if my edx-platform package is not automatically bind-mounted?
|
|
||||||
------------------------------------------------------------------
|
|
||||||
|
|
||||||
It is quite possible that your package is not automatically recognized and bind-mounted by Tutor. Out of the box, Tutor defines a set of regular expressions: if your package name matches this regular expression, it will be automatically bind-mounted. But if it does not, you have to tell Tutor about it.
|
|
||||||
|
|
||||||
To do so, you will need to create a :ref:`Tutor plugin <plugin_development_tutorial>` that implements the :py:data:`tutor.hooks.Filters.MOUNTED_DIRECTORIES` filter::
|
|
||||||
|
|
||||||
from tutor import hooks
|
|
||||||
hooks.Filters.MOUNTED_DIRECTORIES.add_item(("openedx", "my-package"))
|
|
||||||
|
|
||||||
After you implement and enable that plugin, ``tutor mounts list`` should display your directory among the bind-mounted directories.
|
|
||||||
|
|
||||||
Do I have to re-build the "openedx" Docker image after every change?
|
Do I have to re-build the "openedx" Docker image after every change?
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ hooks.Filters.MOUNTED_DIRECTORIES.add_items(
|
|||||||
("openedx", "edx-enterprise"),
|
("openedx", "edx-enterprise"),
|
||||||
("openedx", "edx-ora2"),
|
("openedx", "edx-ora2"),
|
||||||
("openedx", "edx-search"),
|
("openedx", "edx-search"),
|
||||||
|
("openedx", "openedx-learning"),
|
||||||
("openedx", r"platform-plugin-.*"),
|
("openedx", r"platform-plugin-.*"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user