# Path: dftimewolf/lib/errors.py
# class DFTimewolfError(Exception):
# class BadConfigurationError(DFTimewolfError):
# class RecipeParseError(DFTimewolfError):
# class CommandLineParseError(DFTimewolfError):
# class CriticalError(DFTimewolfError):
#   def __init__(self,
#                message: Optional[str]=None,
#                name: Optional[str]=None,
#                stacktrace: Optional[str]=None,
#                critical: bool=False,
#                unexpected: bool=False) -> None:
# 
# Path: dftimewolf/lib/resources.py
# class Recipe(object):
#   def __init__(self,
#                description: str,
#                contents: Dict[str, Any],
#                args: List[Tuple[str, str, Any]]) -> None:
#   def GetHelpString(self) -> str:
# 
# Path: dftimewolf/lib/resources.py
# class Recipe(object):
#   """Recipe.
# 
#   Attributes:
#     args (list[tuple[str, str, object]]): command line arguments of
#         the recipe.
#     contents (dict[str, object]): recipe contents.
#     description (str): description.
#     name (str): name that identifies the recipe.
#   """
# 
#   def __init__(self,
#                description: str,
#                contents: Dict[str, Any],
#                args: List[Tuple[str, str, Any]]) -> None:
#     """Initializes a recipe.
# 
#     Args:
#       description (str): description.
#       contents (dict[str, object]): recipe contents.
#       args (list[tuple[str, str, object]]): command line arguments of
#           the recipe.
#     """
#     super(Recipe, self).__init__()
#     self.args = args
#     self.contents = contents
#     self.name = contents['name']  # type: str
#     self.description = description
# 
#   def GetHelpString(self) -> str:
#     """Generates a description for argparse help.
# 
#     Returns:
#       str: help text.
#     """
#     short_description = self.contents.get(
#         'short_description', 'No description')
#     return ' {0:<35s}{1:s}\n'.format(self.name, short_description)


import glob
import io
import json
import os
from io import StringIO, TextIOWrapper
from typing import List, Union, Dict
from dftimewolf.lib import errors, resources
from dftimewolf.lib.resources import Recipe
    """Registers a recipe.

    The recipe are identified based on their lower case name.

    Args:
      recipe (Recipe): the recipe.

    Raises:
      KeyError: if recipe is already set for the corresponding name.
    """
    recipe_name = recipe.name.lower()
    if recipe_name in self._recipes and not self.ALLOW_RECIPE_OVERRIDE:
      raise KeyError('Recipe already set for name: {0:s}.'.format(recipe.name))

    self._recipes[recipe_name] = recipe

  def RegisterRecipes(self, recipes: List[Recipe]) -> None:
    """Registers recipes.

    The recipes are identified based on their lower case name.

    Args:
      recipes (list[Recipe]): the recipes.

    Raises:
      KeyError: if a recipe is already set for the corresponding name.
    """
    for recipe in recipes:
      self.RegisterRecipe(recipe)


# Path: dftimewolf/lib/errors.py
# class DFTimewolfError(Exception):
# class BadConfigurationError(DFTimewolfError):
# class RecipeParseError(DFTimewolfError):
# class CommandLineParseError(DFTimewolfError):
# class CriticalError(DFTimewolfError):
#   def __init__(self,
#                message: Optional[str]=None,
#                name: Optional[str]=None,
#                stacktrace: Optional[str]=None,
#                critical: bool=False,
#                unexpected: bool=False) -> None:
# 
# Path: dftimewolf/lib/resources.py
# class Recipe(object):
#   def __init__(self,
#                description: str,
#                contents: Dict[str, Any],
#                args: List[Tuple[str, str, Any]]) -> None:
#   def GetHelpString(self) -> str:
# 
# Path: dftimewolf/lib/resources.py
# class Recipe(object):
#   """Recipe.
# 
#   Attributes:
#     args (list[tuple[str, str, object]]): command line arguments of
#         the recipe.
#     contents (dict[str, object]): recipe contents.
#     description (str): description.
#     name (str): name that identifies the recipe.
#   """
# 
#   def __init__(self,
#                description: str,
#                contents: Dict[str, Any],
#                args: List[Tuple[str, str, Any]]) -> None:
#     """Initializes a recipe.
# 
#     Args:
#       description (str): description.
#       contents (dict[str, object]): recipe contents.
#       args (list[tuple[str, str, object]]): command line arguments of
#           the recipe.
#     """
#     super(Recipe, self).__init__()
#     self.args = args
#     self.contents = contents
#     self.name = contents['name']  # type: str
#     self.description = description
# 
#   def GetHelpString(self) -> str:
#     """Generates a description for argparse help.
# 
#     Returns:
#       str: help text.
#     """
#     short_description = self.contents.get(
#         'short_description', 'No description')
#     return ' {0:<35s}{1:s}\n'.format(self.name, short_description)


# Path: dftimewolf/lib/recipes/manager.py
import glob
import io
import json
import os
from io import StringIO, TextIOWrapper
from typing import List, Union, Dict
from dftimewolf.lib import errors, resources
from dftimewolf.lib.resources import Recipe

    """Registers a recipe.

    The recipe are identified based on their lower case name.

    Args:
      recipe (Recipe): the recipe.

    Raises:
      KeyError: if recipe is already set for the corresponding name.
    """
    recipe_name = recipe.name.lower()
    if recipe_name in self._recipes and not self.ALLOW_RECIPE_OVERRIDE:
      raise KeyError('Recipe already set for name: {0:s}.'.format(recipe.name))

    self._recipes[recipe_name] = recipe

  def RegisterRecipes(self, recipes: List[Recipe]) -> None:
    """Registers recipes.

    The recipes are identified based on their lower case name.

    Args:
      recipes (list[Recipe]): the recipes.

    Raises:
      KeyError: if a recipe is already set for the corresponding name.
    """
    for recipe in recipes:
      self.RegisterRecipe(recipe)


  def Recipes(self) -> Dict[str, resources.Recipe]: