Workflow Runner is a tool that utlizes the Operations and Workflows language to perform queries. A request can be sent to the service containing a TRAPI message and workflow. Workflow Runner will then perform all of the operations included in the workflow on the message. Workflows are defined sequentially, so each operation is performed on the result message of the operation directly preceeding it.
Workflow Runner is dependent on operation providers, which are the services that are able to perform each operation. These operation providers are discoverd through SmartAPI registry, and require services to self report which operations they support. The list of operation providers can be found through the /services endpoint.
A complete list of operations can be found here: https://github.com/NCATSTranslator/OperationsAndWorkflows?tab=readme-ov-file
Available at: https://translator-workflow-runner.renci.org/docs
./main.sh --port <PORT>
The default port is 3084.
docker build . -t workflow_runner
docker run --name workflow_runner --rm -p <PORT>:3084 -it workflow_runner
PORT=<PORT> docker-compose up --build
The "docker-compose" option requires either a) an environment variable called PORT
, or b) a .env
file containing a definition for PORT
.
eval $(minikube -p minikube docker-env) # point session to minikube's docker daemon
docker build . -t workflow_runner # build image
kubectl create -f k8s-deployment.yml # references local image
kubectl port-forward service/workflow-runner <PORT>:7092 # forward to port of your choice
Access Swagger UI at http://localhost:<PORT>/docs
.
Environment variables have the following effects:
OPENAPI_SERVER_URL
: A URL to the target host. Important for generating a portable OpenAPI schema.
The codebase comes with a zero-dependency python management script that can be used to automate basic local development tasks. Make sure you have docker and docker-compose installed and then run:
./manage.py dev # starts server accessible at 5781
./manage.py test # run tests
./manage.py lock # update lockfile if requirements.txt has changed
Testing:
python -m pytest tests/ --cov app --cov-report term-missing