conda_recipe_manager.parser.v0_recipe_formatter

Description:

The V0 Recipe Formatter attempts to improve parsing capabilities of V0 recipe files by formatting the file prior to parsing. The parser can be easily tripped up on bad indentation and some recipe files have been found to be incredibly malformed. Given the V0 format does not contain legal YAML, we cannot use a common YAML formatting tool, like yamlfmt. This tool is not perfect, but is meant to catch enough common formatting issues to increase CRM's parsing capabilities in the ecosystem.

Classes

V0RecipeFormatter(content)

Class that attempts to format V0 recipe files in a way to improve parsing compatibility.

class conda_recipe_manager.parser.v0_recipe_formatter.V0RecipeFormatter(content: str)[source]

Bases: object

Class that attempts to format V0 recipe files in a way to improve parsing compatibility.

fmt_text() None[source]

Executes a number of custom V0 formatting rules in an attempt to improve the chances a V0 recipe can be parsed.

is_v0_recipe() bool[source]

Indicates if this file is formatted in the V0 recipe format.

Returns:

True if the recipe content provided is in the V0 format. False otherwise.