Skip to content

ohcnetwork/care_nhcx

Repository files navigation

Care NHCX

Release Status Build Status

Care NHCX is a sample plugin, a plugin boilerplate to begin developing the plugin for care.

Local Development

To develop the plug in local environment along with care, follow the steps below:

  1. Go to the care root directory and clone the plugin repository:
cd care
git clone [email protected]:ohcnetwork/care_nhcx.git
  1. Add the plugin config in plug_config.py
...

nhcx_plugin = Plug(
    name="nhcx", # name of the django app in the plugin
    package_name="/app/care_nhcx", # this has to be /app/ + plugin folder name
    version="", # keep it empty for local development
    configs={}, # plugin configurations if any
)
plugs = [nhcx_plug]

...
  1. 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
)

...
  1. Rebuild the docker image and run the server
make re-build
make up

Important

Do not push these changes in a PR. These changes are only for local development.

Production Setup

To install care nhcx, you can add the plugin config in care/plug_config.py as follows:

...

nhcx_plug = Plug(
    name="nhcx",
    package_name="git+https://github.com/ohcnetwork/care_nhcx.git",
    version="@master",
    configs={},
)
plugs = [nhcx_plug]
...

Extended Docs on Plug Installation

Configuration

The following configurations variables are available for Care NHCX:

  • NHCX_DUMMY_ENV: Dummy environment variable for testing

The plugin will try to find the API key from the config first and then from the environment variable.

License

This project is licensed under the terms of the MIT license.


This plugin was created with Cookiecutter using the ohcnetwork/care-plugin-cookiecutter.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published