docs: def scan(context, root_dir):
      """Scan a directory for analyses."""
      root_dir = root_dir or context.obj['root']
      config_files = Path(root_dir).glob('*/analysis/*_config.yaml')
      for config_file in config_files:
          LOG.debug("found analysis config: %s", config_file)
          with config_file.open() as stream:
              context.invoke(log_cmd, config=stream, quiet=True)
  
      context.obj['store'].track_update()