KPET: Encapsulate template variable handling into kpet.run.Base
At the moment all template variable handling, including validation and defaulting is done in kpet.cmd_run and tests, and kpet.run.Base, the actual consumer of the variables only passes them to the templates.
As a kpet developer I don't want to care about making sure variables are correct and default to correct values every time I want to pass them to kpet.run.Base. I would like the latter to handle that, and I'd like interfaces for validating the variables for things like command-line parsing.
This is done when:
- kpet.data.Base provides an interface to check if a variable dictionary has unknown variables, and if it defines all required variables.
- kpet.cmd_run.main_generate() uses that interface to validate variables passed via the command line.
- kpet.run.Base.generate() asserts the passed variable dictionary doesn't contain unknown variables, and has required variables, using the same interface.
- kpet.run.Base.generate() assigns defaults to missing optional variables before passing them to templates.
- tests/test_cmd_run.py stops generating its own default variable set for kpet.run.Base.generate()
JIRA ticket created by @nkondras