This document provides a brief overview of all the CLI tools provided by Conda Recipe Manager (CRM).
All tools are executed by running conda-recipe-manger <tool-name> or crm <tool-name>.
To get a full list of all currently available tools, run: crm --help
To get help with a particular tool, run: crm <tool-name> --help
All of these commands should return a POSIX-style error code when they encounter an issue. The codes should correlate to unique error cases.
This tool takes an existing recipe file and "bumps" it to target a new software version.
As of writing, this tool can automatically update:
- The
/build/numberfield - The package version number (either by canonical
versionvariable or/package/versionfield) - Any applicable
sha-256fields in the/sourcesection
If a network request is required to perform a modification, this script will use a retry-with-a-back-off mechanism to recover in the event of a network failure.
If the recipe only needs to increment the /build/number field, --build-num flag can be used.
Usage: crm bump-recipe [OPTIONS] RECIPE_FILE_PATH
Bumps a recipe to a new version.
RECIPE_FILE_PATH: Path to the target recipe file
Options:
-b, --build-num Bump the build number by 1.
-d, --dry-run Performs a dry-run operation that prints the
recipe to STDOUT and does not save to the recipe
file.
-t, --target-version TEXT New project version to target. Required if
`--build-num` is NOT specified.
-i, --retry-interval FLOAT Retry interval (in seconds) for network
requests. Scales with number of failed attempts.
Defaults to 30 seconds
--help Show this message and exit.Upgrade the types-toml feedstock from version 0.10.8.6 to 0.10.8.20240310.
crm bump-recipe -t 0.10.8.20240310 types-toml-feedstock/recipe/meta.yamlOnly increment the /build/number field.
crm bump-recipe --build-num types-toml-feedstock/recipe/meta.yamlThis tool converts one or more recipe files from the V0 recipe format to the V1 recipe format.
In single file mode, a converted recipe file is dumped to STDOUT or can be written to a specified file using the -o
option. Warnings and errors are printed to STDERR
In bulk (multi-recipe) mode, the converted recipe files can written to a recipe.yaml file in the same directory as
the original V0 meta.yaml file is found in. Various statistics about the bulk conversion process are dumped to a
JSON blob to STDOUT.
Usage: crm convert [OPTIONS] PATH
Recipe conversion CLI utility. By default, recipes print to STDOUT. Messages
always print to STDERR. Takes 1 file or a directory containing multiple
feedstock repositories. If the `PATH` provided is a directory, the script
will attempt a bulk operation conversion across all subdirectories.
Options:
-o, --output PATH File to dump a new recipe to. For bulk
operations, specify the file basename only
(i.e. recipe.yaml).
-m, --min-success-rate FLOAT RANGE
Sets a minimum passing success rate for bulk
operations. [0<=x<=1]
-t, --truncate Truncates logging. On large tests in a
GitHub CI environment, this can eliminate
log buffering issues.
-d, --debug Debug mode, prints debugging information to
STDERR.
--help Show this message and exit.This tool provides a simple interface to for editing recipe files using JSON-patch-like blobs. This primarily exists for proof-of-concept type work and as a simple demo of CRM's editing capabilities.
Usage: crm patch [OPTIONS] JSON_PATCH_FILE_PATH RECIPE_FILE_PATH
Patches recipe files with JSON patch blobs.
JSON_PATCH_FILE_PATH: Path to the json file containing the patch blobs
RECIPE_FILE_PATH: Path to the target recipe file
Options:
--help Show this message and exit.This tool is used by our automated integration tests to run a dry-run of rattler-build against thousands of recipe
files, after a bulk convert command. Like the bulk variant of convert, this tool dumps a JSON blob of statistics
at the end of the command.
Usage: crm rattler-bulk-build [OPTIONS] PATH
Given a directory of feedstock repositories, performs multiple recipe builds
using rattler-build. All unknown trailing options and arguments for this
script are passed directly to `rattler-build build`. NOTE: - The build
command is run as `rattler-build build -r <recipe.yaml> <ARGS>` -
rattler-build errors are dumped to STDERR
Options:
-m, --min-success-rate FLOAT RANGE
Sets a minimum passing success rate for bulk
operations. [0<=x<=1]
-t, --truncate Truncates logging. On large tests in a
GitHub CI environment, this can eliminate
log buffering issues.
-l, --debug-log FILE Dumps a large debug log to the file
specified.
--help Show this message and exit.