diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1eed08e..595e6b0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,8 @@ Change Log Unreleased ********** +* Add make install-local target for easy devstack installation + 3.5.0 – 2023-09-04 ********************************************** diff --git a/Makefile b/Makefile index 7874fa8..7f8a925 100644 --- a/Makefile +++ b/Makefile @@ -110,3 +110,7 @@ install_transifex_client: ## Install the Transifex client git diff -s --exit-code HEAD || { echo "Please commit changes first."; exit 1; } curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash git checkout -- LICENSE README.md ## overwritten by Transifex installer + +install-local: ## installs your local ai-aside into the LMS and Studio python virtualenvs + docker exec -t edx.devstack.lms bash -c '. /edx/app/edxapp/venvs/edxapp/bin/activate && cd /edx/app/edxapp/edx-platform && pip uninstall -y ai-aside && pip install -e /edx/src/ai-aside && pip freeze | grep ai-aside' + docker exec -t edx.devstack.cms bash -c '. /edx/app/edxapp/venvs/edxapp/bin/activate && cd /edx/app/edxapp/edx-platform && pip uninstall -y ai-aside && pip install -e /edx/src/ai-aside && pip freeze | grep ai-aside' diff --git a/README.rst b/README.rst index 488d74d..c6bcc09 100644 --- a/README.rst +++ b/README.rst @@ -28,11 +28,18 @@ One Time Setup Local testing ~~~~~~~~~~~~~ -To test your changes locally, you will need to install the package from your local branch into edx-platform. For example, if using devstack, copy or clone your branch into /src/ai-aside. Then, in an lms or cms shell, run:: +To test your changes locally, you will need to install the package from your local branch into edx-platform. For example, if using devstack, copy or clone your branch into /src/ai-aside. Bring up the LMS and CMS containers in devstack, and run this make target in the ai-aside directory:: + + make install-local + +You should see it uninstall any existing ai-aside in and install your local source, for both the CMS and LMS. + +The plug-in configuration will automatically be picked up once installed. Changes will be hot reloaded after the next LMS or CMS restart. + +If you would like to manually install ai-aside, go to your lms or cms shell and run:: pip install -e /edx/src/ai-aside -The plug-in configuration will automatically be picked up once installed, and changes will be hot reloaded. Run Migrations ..............