Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1.04 KB

Patch.md

File metadata and controls

21 lines (16 loc) · 1.04 KB

Patch tool

Patch tool is used for upgrading YAML configuration files. It parses YAML file and you can access config fields the same way you access them inside the bot.

The main point, is to sync configuration file fields with current changes in repository. For example, to prevent accessing fields that may not exist in old configs. So old configs can't be used with new version and vise versa.

Creating new patches

To create new patch for one of YAML configs you need to do the following things:

  1. Write transition patch in updater.py, you can take a look at examples there
  2. Increase version of config in this patch
  3. Bump corresponding version in const.py

Command line options:

$ python walbot.py patch               # Patch all .yaml files
$ python walbot.py patch config.yaml   # Patch config
$ python walbot.py patch markov.yaml   # Patch Markov model config
$ python walbot.py patch secret.yaml   # Patch secret config
$ python walbot.py patch -h            # Get help for patch tool