Skip to content
Permalink
Browse files

Add instructions for xblock development

  • Loading branch information
regisb committed Mar 16, 2020
1 parent cf04156 commit 43e841b1cbc757add8e1a170fb3d7f4b53564bda
Showing with 22 additions and 1 deletion.
  1. +21 −0 docs/dev.rst
  2. +1 −1 docs/troubleshooting.rst
@@ -108,6 +108,27 @@ To debug a local edx-platform repository, add a ``import ipdb; ipdb.set_trace()`

tutor dev runserver -v /path/to/edx-platform:/openedx/edx-platform lms

XBlock and edx-platform plugin development
------------------------------------------

In some cases you will have to develop features for packages that are pip-installed next to edx-platform. This is quite easy with Tutor. Just add your packages to the `$(tutor config printroot)/env/build/openedx/requirements/private.txt`` file. To avoid re-building the openedx Docker image at every change, you should add your package in editable mode. For instance::

echo "-e ./mypackage" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt"

The ``requirements`` folder should have the following content::

env/build/openedx/requirements/
private.txt
mypackage/
setup.py
...

You will have to re-build the openedx Docker image once::
tutor images build openedx

You should then run the development server as usual, with ``runserver``. Every change made to the ``mypackage`` folder will be picked up and the development server will be automatically reloaded.

.. _theming:

Customised themes
@@ -47,7 +47,7 @@ This is not an error with Tutor, but with your Docker installation. This is freq
docker run --rm hello-world
If the above command does not work, you should fix your Docker installation. Some people will suggest to run Docker as root, or with `sudo`; *do not do this*. Instead, what you should probably do is to add your user to the "docker" group. For more information, check out the `official Docker installation instructions <https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user>`__.
If the above command does not work, you should fix your Docker installation. Some people will suggest to run Docker as root, or with ``sudo``; **do not do this**. Instead, what you should probably do is to add your user to the "docker" group. For more information, check out the `official Docker installation instructions <https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user>`__.

Help! The Docker containers are eating all my RAM/CPU/CHEESE
------------------------------------------------------------

0 comments on commit 43e841b

Please sign in to comment.
You can’t perform that action at this time.