Skip to content

xverges/watson-assistant-workbench

 
 

Repository files navigation

I am not a Watson Assistant user anymore, so I cannot properly maintain this project. https://github.com/vanildo/watson-assistant-workbench is an active fork of this repo used by https://github.com/vanildo/wa-cli


WAW-version travis status Python

About

WAW is a toolkit for maintaining Watson Assistant data in github repository. It aims at

  • structured data-driven approach, with easy diffs visible in GitHub
  • easy collaboration among large teams
  • improved dialog tree representation resulting in greater readability and easier updates compared to the original WA JSON format
  • easy-to-use XML format and tools that make authoring of Watson Conversation workspaces easier using standard text editors
  • ability to easily include and combine pieces of dialog together
  • full compatibility with the WA JSON workspace format
  • easy Continuous Integration - each commit to GitHub runs tests and updates conversation workspace if all succeed
  • automatic dialog code generation (go back, abort, etc. - actions needed in each dialog step)
  • support for internationalization
  • and more :)

It contains a bundle of tools for generating WA workspace from the structure data (and viceversa), testing and uploading (working with the WCS API).

Currently supported conversation version is 2017-02-03 except:

  • Fuzzy matching, Folders and Digression are not supported.
  • A name of a dialog node still has to be unique as it is used as node ID.
  • Missing "slot_in_focus" property.
  • Slots are not supported in json to xml conversion scripts.

Prerequisites

Scripts use python 3.8, used modules are listed in the requirements.txt file. To satisfy all requirements run

pip install -r requirements.txt

For brief summary how to run scripts please see scripts.md.

Description of T2C and xml/csv WAW formats can be found in doc folder.

Release notes can be found in release_notes.md.

Instructions on how to use logging can be found in logging.md.


Testing

If you want to run unit tests locally, you first need to install development dependencies from requirements_dev.txt. You can run

pip install -r requirements_dev.txt

Then set following environment variables (i.e. run export VARIABLE_NAME="VARIABLE_VALUE")

  • WA_USERNAME (Watson Assistant username - ALWAYS USE INSTANCE DEDICATED FOR TESTING ONLY! ALL CONTENT WILL BE DELETED DURING TESTING PROCESS!)
  • WA_PASSWORD (Watson Assistant password)
  • WA_WORKSPACES_API_URL (https://.../assistant/api/v1/workspaces)
  • CLOUD_FUNCTIONS_USERNAME (Cloud Functions username)
  • CLOUD_FUNCTIONS_PASSWORD (Cloud Functions password)
  • CLOUD_FUNCTIONS_URL (Cloud Functions namespace - it should contain https:// at the beginning and /api/v1/namespaces at the end)
  • CLOUD_FUNCTIONS_NAMESPACE (Cloud Functions namespace - don't forget enclosing it in apostrophes if it contains spaces)

The unit tests and app tests can be started with these commands (from the top directory of this repository)

PYTHONPATH=./scripts:$PYTHONPATH pytest ci/unit_tests
PYTHONPATH=./scripts:$PYTHONPATH pytest ci/app_tests

About

Fork of the original WAW with some bug fixes + additional features. Superseded by https://github.com/vanildo/watson-assistant-workbench, that is used by https://github.com/vanildo/wa-cli

Resources

License

Stars

Watchers

Forks

Languages

  • Python 97.3%
  • Shell 2.5%
  • Go 0.1%
  • Swift 0.1%
  • JavaScript 0.0%
  • PHP 0.0%