Exemplo n.º 1
0
def get_fully_qualified_paths(database, target, profile=None):
    """Returns a target with any profile keywords filled in with the given profile.
    If no profile is specified, this method gets the default profile from the database.
    """
    profile = profile_processor.get_fully_qualified_profile(database, profile)
    path_getter = model_utils.replace_keywords_closure(profile)
    target = path_getter(target)
    return target
Exemplo n.º 2
0
def get_fully_qualified_paths(database, target, profile=None):
    """Returns a target with any profile keywords filled in with the given profile.
    If no profile is specified, this method gets the default profile from the database.
    """
    profile = profile_processor.get_fully_qualified_profile(database, profile)
    path_getter = model_utils.replace_keywords_closure(profile)
    target = path_getter(target)
    return target
Exemplo n.º 3
0
def add_structures_from_filesystem(database, profile=None):
    """Adds all structures in a filesystem. Uses the default profile or gets the
    profile that is specified by the user.
    """
    profile = profile_processor.get_fully_qualified_profile(database, profile)
    structure_directory = profile['structures']
    structures = get_structures_from_filesystem(structure_directory)
    structure_tool = structure_model.make_structure_closure(utils.get_timestamp())
    structures = map(structure_tool, structures)
    create_structure_collection(database, structures)
    structures = get_current_structures(database)
    return structures
Exemplo n.º 4
0
def add_structures_from_filesystem(database, profile=None):
    """Adds all structures in a filesystem. Uses the default profile or gets the
    profile that is specified by the user.
    """
    profile = profile_processor.get_fully_qualified_profile(database, profile)
    structure_directory = profile['structures']
    structures = get_structures_from_filesystem(structure_directory)
    structure_tool = structure_model.make_structure_closure(general_utils.get_timestamp())
    structures = list(map(structure_tool, structures))
    create_structure_collection(database, structures)
    structures = get_current_structures(database)
    return structures