Best practice: Xblock development in Tutor Dev mode

Hi everyone,

I want to write a HOWTO article on xblock development in Tutor dev mode.

One of the challenges my team is facing is that rebuilding the image every time they make changes to the xblock is time consuming. Maybe we should make a plugin? We could probably have something more efficient, like the tutor dev run watchthemes, but something that recompiles the assets? We also want the xblock to use Django for storing data, so our environment would need access to this (my understanding is that won’t work with the XBLOCK SDK).

I would love to hear about how you all have set up your environment for xblock development with Tutor!

Hi @ak00001! I was working on the docs today so I thought I would add my own process directly there. You can check it out in this commit: (the docs were not updated yet)

Basically, I add the XBlock in editable mode to the private.txt requirements file, and the xblock folder is mounted inside the openedx container. Thus, changes made to the xblock code are automatically picked up by runserver and it is not necessary to rebuild the docker image at every change.