def to_string(self, keyword=None): from mltemplate.ci.writers import yaml_as_string cmd = self.compile_aliases() if self.aliased else self.compile() compiled = {keyword if keyword is not None else self.name: cmd} alias_names = [self.name] if self.aliased else [] text = yaml_as_string(compiled, aliases_names=alias_names) return text
def __repr__(self): from mltemplate.ci.writers import yaml_as_string text = yaml_as_string([self.compile()]) return f"{self.__class__.__name__}:\n{text}"
def __repr__(self): from mltemplate.ci.writers import yaml_as_string stages = {s.name: s.compile() for s in self.stages} text = yaml_as_string(stages, aliases_names=self.aliased_names()) return f"{self.__class__.__name__}:\n{text}"
def __repr__(self): from mltemplate.ci.writers import yaml_as_string text = yaml_as_string(self.compile(), aliases_names=self.aliased_names()) return f"{self.__class__.__name__}:\n{text}"