Skip to content

Commit

Permalink
Merge pull request #61 from edx/ashultz0/make_install
Browse files Browse the repository at this point in the history
build: add local installation make target
  • Loading branch information
ashultz0 authored Sep 19, 2023
2 parents ccfacd8 + 510d7f6 commit 988e5b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Change Log
Unreleased
**********

* Add make install-local target for easy devstack installation

3.5.0 – 2023-09-04
**********************************************

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
11 changes: 9 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <devstack-parent>/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 <devstack-parent>/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
..............
Expand Down

0 comments on commit 988e5b1

Please sign in to comment.