conda_recipe_manager.commands package

Subpackages

Submodules

conda_recipe_manager.commands.conda_recipe_manager module

Description:

Base CLI for all conda-recipe-manager commands

conda_recipe_manager.commands.convert module

Description:

CLI for converting an old recipe file to the "new" format.

class conda_recipe_manager.commands.convert.ConversionResult(code: ExitCode, content: str, file_path: Path, msg_tbl: MessageTable, project_name: str)[source]

Bases: object

Struct that contains the results, metadata, errors, etc of converting a single recipe file.

code: ExitCode
content: str
file_path: Path
msg_tbl: MessageTable
project_name: str
set_return_code() None[source]

Given the current state of the message table, set the appropriate return code. Does not overwrite the existing state unless errors or warnings were found.

conda_recipe_manager.commands.convert.convert_file(file_path: Path, output: Path | None, print_output: bool, debug: bool) ConversionResult[source]

Converts a single recipe file to the V1 format, tracking results.

Parameters:
  • file_path -- Path to the recipe file to convert

  • output -- If specified, the file contents are written to this file path. Otherwise, the file is dumped to STDOUT IF print_output is set to True.

  • print_output -- Prints the recipe to STDOUT/STDERR if the output file is not specified and this flag is True.

  • debug -- Enables debug mode output. Prints to STDERR.

Returns:

A struct containing the results of the conversion process, including debugging metadata.

conda_recipe_manager.commands.convert.process_recipe(file: Path, path: Path, output: Path | None, debug: bool) tuple[str, ConversionResult][source]

Helper function that performs the conversion operation for parallelizable execution.

Parameters:
  • file -- Recipe file to convert

  • path -- Path argument provided by the user

  • output -- Output argument file provided by the user

  • debug -- Enables debug mode output. Prints to STDERR.

Returns:

Tuple containing the key/value pairing that tracks the result of the conversion operation

conda_recipe_manager.commands.rattler_bulk_build module

Description:

CLI tool that performs a bulk build operation for rattler-build.

class conda_recipe_manager.commands.rattler_bulk_build.BuildResult(code: int, errors: list[str])[source]

Bases: object

Struct that contains the results, metadata, errors, etc of building a single recipe file.

code: int
errors: list[str]
conda_recipe_manager.commands.rattler_bulk_build.build_recipe(file: Path, path: Path, args: list[str]) tuple[str, BuildResult][source]

Helper function that performs the build operation for parallelizable execution. Logs rattler-build failures to STDERR.

Parameters:
  • file -- Recipe file to build

  • path -- Path argument provided by the user

  • args -- List of arguments to provide whole-sale to rattler-build

Returns:

Tuple containing the key/value pairing that tracks the result of the build operation

conda_recipe_manager.commands.rattler_bulk_build.create_debug_file(debug_log: Path, results: dict[str, BuildResult], error_histogram: dict[str, int]) None[source]

Generates a debug file containing an organized dump of all the recipes that got a particular error message.

Parameters:
  • debug_log -- Log file to write to

  • results

  • error_histogram

Module contents