-
Notifications
You must be signed in to change notification settings - Fork 1
Developing and Testing apps
To develop and tests your apps locally, you need to setup a conda environment like the one on web-kadi. The web-kadi repository has an environment file for this (there are actually two versions: flight and test).
In the following example, I first saved the environment.yml file locally and ran:
conda create --name ska3-flight-web
conda activate ska3-flight-web
conda env update --file environment.yml
This should be enough to run the unit tests. For some features (e.g. to test the astromon API using a development flask server locally) you might need to customize the configuration (see below)
- Get the files I have in
/home/jgonzale/kadi-apps-configand place them somewhere in your machine. This includes aconfig.pyfile and a JSON file with devel credentials. - Edit the
config.pyfile to point to files in your system. - Define the
KADI_APPS_CONFIG_DIRenvironment variable to point to where you placed the config files in the last step. -
Optional: instead of the last step, I keep a file called
.env_develin my kadi-apps local repository. I setKADI_APPS_CONFIG_DIRin this file, and kadi-apps automatically reads it when called from this directory.
change to the kadi-apps local repository and do:
./kadi_apps/app.py
If you are trying to test out of the repo you may need to set PYTHONPATH to include kadi_apps -- otherwise you'll be testing agains the kadi_apps installed in your environment.
You can change the port using the KADI_APPS_PORT environment variable.