Installing Private Django-app Requirements

Greetings👋🏽
I need assistance on the aforementioned Topic. I am trying to install a “private” Django App Plugin (Dap) created with the edx-cookiecutter, cookiecutter-django-app.

Context:
I installed my private Dap according to the Tutor documentation by cloning the “private” repo to the path $(tutor config printroot)/env/build/openedx/requirements/ and appending it to a private.txt file.
Here is my private.txt file:

-e ./myprivaterepo

My requirements/ file structure also follows and adheres to the Tutor specification

Problem:
However, after re-building the openedx-dev image, pip does not find the Dap package, nor does it appear in the list of INSTALLED_APPS.

# pip check
$ tutor dev run lms bash
~/edx-platform$ pip show myprivatedap    # WARNING: Package(s) not found: myprivatedap

# alternatively
$ tutor dev run lms ./manage.py lms shell
In [1]: from django.conf import settings
In [2]: settings.INSTALLED_APPS    # myprivatedap NOT listed

Note:
I’ve installed a virtually identical “public” variant of my “private” Dap with success. This was accomplished, however, by using a VCS URL rather than a path to the local project. For example, instead of -e ./myprivaterepo/, insert git+https://github.com/user/myprivaterepo.git/ to the private.txt file. This worked perfectly. When I try to install the same “public” Dap using a path to a local (editable) project, pip similarly cannot find the Dap package nor is it listed in the INSTALLED_APPS. How can I resolve this without needing to change my Dap’s repo from “private” to “public”? The problem seems to be with the installation approach used: VCS URL vs path to the local project

Additional:

  • I am using Tutor-nightly.
  • I currently do not have a bind-mount to any local fork of the edx-platform.
  • I am using the dev Tutor variant (hence, tutor-nightly-dev).
  • I am sure the private requirement is being installed because edits to the Dap trigger a rerun of [python/requirements] steps in the Docker build of the openedx-dev image.
  • I tried the following without success:
    – Rebuild the ‘openedx-dev’ image once (tutor images build openedx-dev)
    – Relaunch the ‘openedx-dev’ platform (tutor dev launch)
    – Rebuild the ‘openedx-dev’ image + relaunch the ‘openedx-dev’ platform (tutor images build openedx-dev && tutor dev launch).

My last resort would be to install Tutor (default version) and test “private” Dap installation on the local Tutor flavor.

Thanks in advance, for all forms of contributions⚡

1 Like