original_docstring: Parse configurations and execute callback for matching.
docstring: Parse configurations and execute callback for matching.
docstring_tokens: Parse configurations and execute callback for matching .
code: def run_configurations(callback, sections_reader):
      """Parse configurations and execute callback for matching."""
      base = {
          'base_dir': 'requirements',
          'in_ext': 'in',
          'out_ext': 'txt',
          'autoresolve': True,
      }
      sections = sections_reader()
      if sections is None:
          logger.info("Configuration not found in .ini files. "
                      "Running with default settings")
          recompile()
      elif sections == []:
          logger.info("Configuration does not match current runtime. "
                      "Exiting")
      results = []
      for section, options in sections:
          OPTIONS.clear()
          OPTIONS.update(base)
          OPTIONS.update(options)
          logger.debug("Running configuration from section \"%s\". OPTIONS: %r",
                       section, OPTIONS)
          results.append(callback())
      return results
code_tokens: def run_configurations ( callback , sections_reader ) : base = { 'base_dir' : 'requirements' , 'in_ext' : 'in' , 'out_ext' : 'txt' , 'autoresolve' : True , } sections = sections_reader ( ) if sections is None : logger . info ( "Configuration not found in .ini files. " "Running with default settings" ) recompile ( ) elif sections == [ ] : logger . info ( "Configuration does not match current runtime. " "Exiting" ) results = [ ] for section , options in sections : OPTIONS . clear ( ) OPTIONS . update ( base ) OPTIONS . update ( options ) logger . debug ( "Running configuration from section \"%s\". OPTIONS: %r" , section , OPTIONS ) results . append ( callback ( ) ) return results
short_docstring: Parse configurations and execute callback for matching.
short_docstring_tokens: Parse configurations and execute callback for matching .
comment: """Parse configurations and execute callback for matching."""