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