Care Auto Tag is a plugin for care to automatically tag certain events.
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:ohcnetwork/care_auto_tag.git- Add the plugin config in plug_config.py
...
care_auto_tag_plugin = Plug(
name="care_auto_tag", # name of the django app in the plugin
package_name="/app/care_auto_tag", # this has to be /app/ + plugin folder name
version="", # keep it empty for local development
configs={}, # plugin configurations if any
)
plugs = [care_auto_tag_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 auto tag, you can add the plugin config in care/plug_config.py as follows:
...
care_auto_tag_plugin = Plug(
name="care_auto_tag",
package_name="git+https://github.com/ohcnetwork/care_auto_tag.git",
version="@master",
configs={},
)
plugs = [care_auto_tag_plugin]
...Extended Docs on Plug Installation
The following configurations variables are available for Care Auto Tag:
AUTO_TAG_CONSENT_MISSING_TAG_ID: The external ID of the consent_missing tag.
The plugin will try to find the API key from the config first and then from the environment variable.
This project is licensed under the terms of the MIT license.
This plugin was created with Cookiecutter using the ohcnetwork/care-plugin-cookiecutter.