# Path: sampletester/parser.py
# SCHEMA_TYPE_KEY = 'type'
# SCHEMA_TYPE_ABSENT = '(no type)' # for indexing docs with no SCHEMA_TYPE_KEY
# SCHEMA_TYPE_SEPARATOR = '/'
# SCHEMA_VERSION_KEY = 'schema_version'
# class SchemaDescriptor:
# class IndexedDocs(object):
# class YamlDocSyntaxError(Exception):
#   def __post_init__(self) -> str:
#   def has_version(self) -> bool:
#   def __init__(self,
#                strict: bool = False,
#                resolver: Callable[[Document], str] = None):
#   def contains(self, *type_names: str) -> bool:
#   def from_files(self, *paths: str):
#   def from_strings(self, *sources: Tuple[str, str]):
#   def add(self, content:str, file_name: str):
#   def add_documents(self, *documents: Document):
#   def of_type(self, type_name: str) -> List[Document]:
#   def resolve_uncategorized(self):
# def only_files_in(paths: Iterable[str]) -> Set[str]:
# 
# Path: sampletester/sample_manifest.py
# SCHEMA = parser.SchemaDescriptor('manifest')
# RESERVED_SYMBOL_PREFIX = '@'
# IMPLICIT_TAG_SOURCE = '{}manifest_source'.format(RESERVED_SYMBOL_PREFIX)
# IMPLICIT_TAG_DIR = '{}manifest_dir'.format(RESERVED_SYMBOL_PREFIX)
# class Manifest:
# class ManifestSyntaxError(Exception):
# class CycleError(Exception):
# class Inclusions:
# class ItemNotUniqueError(Exception):
# class ReadManifestError(Exception):
#   def __init__(self, *indices: str):
#   def set_indices(self, *indices: str):
#   def from_docs(self, indexed_docs: parser.IndexedDocs):
#   def read_sources(self, sources):
#   def string(self):
#   def index(self):
#   def index_source_v1(self, input, implicit_tags):
#   def index_source_v2(self, input, implicit_tags):
#   def index_source_v3(self, input, implicit_tags):
#   def _index_elements(self, all_elements):
#   def get_all_elements(self):
#   def _get_element(self, tags, idx_num):
#   def get_keys(self, *specified_keys):
#   def get(self, *keys, **filters):
#   def get_one(self, *keys, **filters):
# def get_elements_v3(input):
# def get_flattened_elements_v1_v2(input):
# def resolve_inclusions(all_elements):
# def resolve_element_inclusions(element):
# def resolve_tag_inclusion (element, tag_name, history,
#                            resolved, original_element, original_tag):
#   def __init__(self, parts):
#   def resolve(self, values):
#   def determine(value, element, tag_name):
# def create_implicit_tags(source='', dir=''):
# def extend_all_with(src, dst):
# def get_or_create(d, key, empty_value):
# def from_indexed_docs(indexed_docs: parser.IndexedDocs):
# def check_tag_names(src):
# 
# Path: sampletester/testenv.py
# class Base:
#   def __init__(self, name='#Base', description=''):
#   def name(self):
#   def setup(self):
#   def teardown(self):
#   def get_call(self, *args, **kwargs):
#   def get_symbol(self, symbol):
#   def get_testcase_settings(self):
# def process_args(*args, **kwargs):
# def quote(s: str):


import glob
import logging
from typing import Iterable
from sampletester import parser
from sampletester import sample_manifest
from sampletester import testenv


class ManifestEnvironment(testenv.Base):
  """Sets up a manifest-derived Base for a single environment.

  All artifacts with the same ENVIRONMENT_KEY are grouped in an instance of this
  class.

  Artifacts may also have a value specified for the INVOCATION_KEY to denote how
  to run the artifact. This value may in turn use PLACEHOLDER_ARGS to denote
  where to insert the command-line arguments.

  If an artifact does not have an INVOCATION_KEY defined, but has a BINARY_KEY
  defined, the binary is executed with the value of PATH_KEY as its first
  argument, followed by the sample arguments. (Note that this usage is
  deprecated.)

  If neither INVOCATION_KEY nor BINARY_KEY are specified but PATH_KEY is
  specified, then path is executed with the artifact arguments.

  If none of INVOCATION_KEY, BINARY_KEY, nor PATH_KEY are specified, calls
  result in errors.

  The default invocation key can be overriden by passing a key-value pair
  (INVOCATION_KEY:  "new_invocation_key") in the manifest_options argument to init.

  Similarly, the default chdir key can be overriden by passing a key-value pair
  (CHDIR_KEY:  "new_chdir_key") in the manifest_options argument to init.
  """


# Path: sampletester/parser.py
# SCHEMA_TYPE_KEY = 'type'
# SCHEMA_TYPE_ABSENT = '(no type)' # for indexing docs with no SCHEMA_TYPE_KEY
# SCHEMA_TYPE_SEPARATOR = '/'
# SCHEMA_VERSION_KEY = 'schema_version'
# class SchemaDescriptor:
# class IndexedDocs(object):
# class YamlDocSyntaxError(Exception):
#   def __post_init__(self) -> str:
#   def has_version(self) -> bool:
#   def __init__(self,
#                strict: bool = False,
#                resolver: Callable[[Document], str] = None):
#   def contains(self, *type_names: str) -> bool:
#   def from_files(self, *paths: str):
#   def from_strings(self, *sources: Tuple[str, str]):
#   def add(self, content:str, file_name: str):
#   def add_documents(self, *documents: Document):
#   def of_type(self, type_name: str) -> List[Document]:
#   def resolve_uncategorized(self):
# def only_files_in(paths: Iterable[str]) -> Set[str]:
# 
# Path: sampletester/sample_manifest.py
# SCHEMA = parser.SchemaDescriptor('manifest')
# RESERVED_SYMBOL_PREFIX = '@'
# IMPLICIT_TAG_SOURCE = '{}manifest_source'.format(RESERVED_SYMBOL_PREFIX)
# IMPLICIT_TAG_DIR = '{}manifest_dir'.format(RESERVED_SYMBOL_PREFIX)
# class Manifest:
# class ManifestSyntaxError(Exception):
# class CycleError(Exception):
# class Inclusions:
# class ItemNotUniqueError(Exception):
# class ReadManifestError(Exception):
#   def __init__(self, *indices: str):
#   def set_indices(self, *indices: str):
#   def from_docs(self, indexed_docs: parser.IndexedDocs):
#   def read_sources(self, sources):
#   def string(self):
#   def index(self):
#   def index_source_v1(self, input, implicit_tags):
#   def index_source_v2(self, input, implicit_tags):
#   def index_source_v3(self, input, implicit_tags):
#   def _index_elements(self, all_elements):
#   def get_all_elements(self):
#   def _get_element(self, tags, idx_num):
#   def get_keys(self, *specified_keys):
#   def get(self, *keys, **filters):
#   def get_one(self, *keys, **filters):
# def get_elements_v3(input):
# def get_flattened_elements_v1_v2(input):
# def resolve_inclusions(all_elements):
# def resolve_element_inclusions(element):
# def resolve_tag_inclusion (element, tag_name, history,
#                            resolved, original_element, original_tag):
#   def __init__(self, parts):
#   def resolve(self, values):
#   def determine(value, element, tag_name):
# def create_implicit_tags(source='', dir=''):
# def extend_all_with(src, dst):
# def get_or_create(d, key, empty_value):
# def from_indexed_docs(indexed_docs: parser.IndexedDocs):
# def check_tag_names(src):
# 
# Path: sampletester/testenv.py
# class Base:
#   def __init__(self, name='#Base', description=''):
#   def name(self):
#   def setup(self):
#   def teardown(self):
#   def get_call(self, *args, **kwargs):
#   def get_symbol(self, symbol):
#   def get_testcase_settings(self):
# def process_args(*args, **kwargs):
# def quote(s: str):


# Path: sampletester/convention/tag.py
import glob
import logging
from typing import Iterable
from sampletester import parser
from sampletester import sample_manifest
from sampletester import testenv



class ManifestEnvironment(testenv.Base):
  """Sets up a manifest-derived Base for a single environment.

  All artifacts with the same ENVIRONMENT_KEY are grouped in an instance of this
  class.

  Artifacts may also have a value specified for the INVOCATION_KEY to denote how
  to run the artifact. This value may in turn use PLACEHOLDER_ARGS to denote
  where to insert the command-line arguments.

  If an artifact does not have an INVOCATION_KEY defined, but has a BINARY_KEY
  defined, the binary is executed with the value of PATH_KEY as its first
  argument, followed by the sample arguments. (Note that this usage is
  deprecated.)

  If neither INVOCATION_KEY nor BINARY_KEY are specified but PATH_KEY is
  specified, then path is executed with the artifact arguments.

  If none of INVOCATION_KEY, BINARY_KEY, nor PATH_KEY are specified, calls
  result in errors.

  The default invocation key can be overriden by passing a key-value pair
  (INVOCATION_KEY:  "new_invocation_key") in the manifest_options argument to init.

  Similarly, the default chdir key can be overriden by passing a key-value pair
  (CHDIR_KEY:  "new_chdir_key") in the manifest_options argument to init.
  """


  def __init__(self, name: str, description: str, manifest: sample_manifest.Manifest,