How to use the sceptre.helpers.normalise_path function in sceptre

To help you get started, we’ve selected a few sceptre examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Sceptre / sceptre / tests / test_helpers.py View on Github external
def test_normalise_path_with_leading_slash(self):
        path = normalise_path("/this/is/valid")
        assert path == join("{}this".format(sep), "is", "valid")
github Sceptre / sceptre / tests / test_helpers.py View on Github external
def test_normalise_path_with_leading_backslash(self):
        path = normalise_path('\\this\path\is\\valid')
        assert path == join("{}this".format(sep), "path", "is", "valid")
github Sceptre / sceptre / tests / test_helpers.py View on Github external
def test_normalise_path_with_valid_path(self):
        path = normalise_path("valid/path")
        assert path == join("valid", "path")
github Sceptre / sceptre / tests / test_helpers.py View on Github external
def test_normalise_path_with_backslashes_in_path(self):
        path = normalise_path("valid\path")
        assert path == join("valid", "path")
github Sceptre / sceptre / tests / test_helpers.py View on Github external
def test_normalise_path_with_trailing_backslash(self):
        with pytest.raises(PathConversionError):
            normalise_path(
                'this\path\is\invalid\\'
            )
github Sceptre / sceptre / tests / test_helpers.py View on Github external
def test_normalise_path_with_double_backslashes_in_path(self):
        path = normalise_path('valid\\path')
        assert path == join("valid", "path")
github Sceptre / sceptre / sceptre / resolvers / stack_output.py View on Github external
def setup(self):
        """
        Adds dependency to a Stack.
        """
        dep_stack_name, self.output_key = self.argument.split("::")
        self.dependency_stack_name = sceptreise_path(normalise_path(dep_stack_name))
        self.stack.dependencies.append(self.dependency_stack_name)
github Sceptre / sceptre / sceptre / context.py View on Github external
def __init__(self, project_path, command_path,
                 user_variables=None, options=None, output_format=None,
                 no_colour=False, ignore_dependencies=False):
        # project_path: absolute path to the base sceptre project folder
        # e.g. absolute_path/to/sceptre_directory
        self.project_path = normalise_path(project_path)

        # config_path: holds the project stack_groups
        # e.g {project_path}/config
        self.config_path = "config"  # user definable later in v2

        # command_path path to either stack group or stack
        # e.g. {project_path/config_path}/command_path
        self.command_path = normalise_path(command_path)

        self.normal_command_path = normalise_path(command_path)

        # config_file: stack group config. User definable later in v2
        # e.g. {project_path/config/command_path}/config_file
        self.config_file = "config.yaml"

        # templates_path: holds tempaltes. User definable later in v2
        # e.g. {project_path/}templates
        self.templates_path = "templates"

        self.user_variables = user_variables if user_variables else {}
        self.user_variables = user_variables\
            if user_variables is not None else {}
        self.options = options if options else {}
        self.output_format = output_format if output_format else ""
github Sceptre / sceptre / sceptre / context.py View on Github external
def __init__(self, project_path, command_path,
                 user_variables=None, options=None, output_format=None,
                 no_colour=False, ignore_dependencies=False):
        # project_path: absolute path to the base sceptre project folder
        # e.g. absolute_path/to/sceptre_directory
        self.project_path = normalise_path(project_path)

        # config_path: holds the project stack_groups
        # e.g {project_path}/config
        self.config_path = "config"  # user definable later in v2

        # command_path path to either stack group or stack
        # e.g. {project_path/config_path}/command_path
        self.command_path = normalise_path(command_path)

        self.normal_command_path = normalise_path(command_path)

        # config_file: stack group config. User definable later in v2
        # e.g. {project_path/config/command_path}/config_file
        self.config_file = "config.yaml"

        # templates_path: holds tempaltes. User definable later in v2
github Sceptre / sceptre / sceptre / context.py View on Github external
def __init__(self, project_path, command_path,
                 user_variables=None, options=None, output_format=None,
                 no_colour=False, ignore_dependencies=False):
        # project_path: absolute path to the base sceptre project folder
        # e.g. absolute_path/to/sceptre_directory
        self.project_path = normalise_path(project_path)

        # config_path: holds the project stack_groups
        # e.g {project_path}/config
        self.config_path = "config"  # user definable later in v2

        # command_path path to either stack group or stack
        # e.g. {project_path/config_path}/command_path
        self.command_path = normalise_path(command_path)

        self.normal_command_path = normalise_path(command_path)

        # config_file: stack group config. User definable later in v2
        # e.g. {project_path/config/command_path}/config_file
        self.config_file = "config.yaml"

        # templates_path: holds tempaltes. User definable later in v2
        # e.g. {project_path/}templates
        self.templates_path = "templates"

        self.user_variables = user_variables if user_variables else {}
        self.user_variables = user_variables\
            if user_variables is not None else {}
        self.options = options if options else {}
        self.output_format = output_format if output_format else ""
        self.no_colour = no_colour if no_colour is True else False
        self.ignore_dependencies = ignore_dependencies if ignore_dependencies is True else False