BE pl Care IM Wrapper
To develop the plug in local environment along with care, follow the steps below:
- Go to the care root directory and clone the plugin repository:
cd care
git clone git@github.com:8sami/care_im_wrapper.git- Add the plugin config in plug_config.py
care_im_wrapper_plugin = Plug(
name="care_im_wrapper", # name of the django app in the plugin
package_name="/app/care_im_wrapper", # this has to be /app/ + plugin folder name
version="", # keep it empty for local development
configs={}, # plugin configurations if any
)
plugs = [care_im_wrapper_plugin]- Tweak the code in plugs/manager.py, install the plugin in editable mode
subprocess.check_call(
[sys.executable, "-m", "pip", "install", "-e", *packages] # add -e flag to install in editable mode
)- Rebuild the docker image and run the server
make re-build
make upImportant
Do not push these changes in a PR. These changes are only for local development.
To install care care_im_wrapper, you can add the plugin config in care/plug_config.py as follows:
care_im_wrapper_plug = Plug(
name="care_im_wrapper",
package_name="git+https://github.com/8sami/care_im_wrapper.git",
version="@master",
configs={},
)
plugs = [care_im_wrapper_plug]or for development:
care_im_wrapper_plug = Plug(
name="care_im_wrapper",
package_name="./care_im_wrapper",
version="", # Empty for local development
configs={},
)
plugs = [care_im_wrapper_plug]Extended Docs on Plug Installation
This plugin was created with Cookiecutter using the ohcnetwork/care-plugin-cookiecutter.