parameters: (self,
                 working_dir,
                 gold_properties,
                 keys_file,
                 corpus,
                 instance,
                 bucket=None)
docstring: Abstract class to handle all aspects of image comparison via Skia Gold.
  
      A single SkiaGoldSession is valid for a single instance/corpus/keys_file
      combination.
  
      Args:
        working_dir: The directory to store config files, etc.
        gold_properties: A skia_gold_properties.SkiaGoldProperties instance for
            the current test run.
        keys_file: A path to a JSON file containing various comparison config data
            such as corpus and debug information like the hardware/software
            configuration the images will be produced on.
        corpus: The corpus that images that will be compared belong to.
        instance: The name of the Skia Gold instance to interact with.
        bucket: Overrides the formulaic Google Storage bucket name generated by
            goldctl
docstring_summary: Abstract class to handle all aspects of image comparison via Skia Gold.
docstring_tokens: Abstract class to handle all aspects of image comparison via Skia Gold .
function: def __init__(self,
                 working_dir,
                 gold_properties,
                 keys_file,
                 corpus,
                 instance,
                 bucket=None):
      """Abstract class to handle all aspects of image comparison via Skia Gold.
  
      A single SkiaGoldSession is valid for a single instance/corpus/keys_file
      combination.
  
      Args:
        working_dir: The directory to store config files, etc.
        gold_properties: A skia_gold_properties.SkiaGoldProperties instance for
            the current test run.
        keys_file: A path to a JSON file containing various comparison config data
            such as corpus and debug information like the hardware/software
            configuration the images will be produced on.
        corpus: The corpus that images that will be compared belong to.
        instance: The name of the Skia Gold instance to interact with.
        bucket: Overrides the formulaic Google Storage bucket name generated by
            goldctl
      """
      self._working_dir = working_dir
      self._gold_properties = gold_properties
      self._corpus = corpus
      self._instance = instance
      self._bucket = bucket
      self._local_png_directory = (self._gold_properties.local_png_directory
                                   or tempfile.mkdtemp())
      self._triage_link_file = tempfile.NamedTemporaryFile(suffix='.txt',
                                                           dir=working_dir,
                                                           delete=False).name
      # A map of image name (string) to ComparisonResults for that image.
      self._comparison_results = {}
      self._authenticated = False
      self._initialized = False
  
      # Copy the given keys file to the working directory in case it ends up
      # getting deleted before we try to use it.
      self._keys_file = os.path.join(working_dir, 'gold_keys.json')
      shutil.copy(keys_file, self._keys_file)
function_tokens: def __init__ ( self , working_dir , gold_properties , keys_file , corpus , instance , bucket = None ) : self . _working_dir = working_dir self . _gold_properties = gold_properties self . _corpus = corpus self . _instance = instance self . _bucket = bucket self . _local_png_directory = ( self . _gold_properties . local_png_directory or tempfile . mkdtemp ( ) ) self . _triage_link_file = tempfile . NamedTemporaryFile ( suffix = '.txt' , dir = working_dir , delete = False ) . name # A map of image name (string) to ComparisonResults for that image. self . _comparison_results = { } self . _authenticated = False self . _initialized = False # Copy the given keys file to the working directory in case it ends up # getting deleted before we try to use it. self . _keys_file = os . path . join ( working_dir , 'gold_keys.json' ) shutil . copy ( keys_file , self . _keys_file )