conda-recipe-manager
Conda Recipe Manager (CRM) is a library and tool-set capable of managing conda
recipe files. It is intended
to be used by package builders and developers to automate the generation and editing of conda
recipe files.
The most mature portion of this project is the parser
module, that allows developers to parse, render, and edit
existing recipe files. There is also some on-going work for parsing recipe selectors and Conda Build Config files.
For a more comprehensive break-down and status of the library modules, see this document.
The latest recipe-parsing compatibility statistics can be found in the summary of our automated Integration Tests.
Our integration test data set is available here and is based off of publicly available recipe files from various sources.
NOTE: CRM only officially supports recipe files in the V0. There is on-going work to add full support for editing V1-formatted files.
This project started out as a recipe parsing library in Anaconda's
percy project. Some git
history was lost during that transfer
process.
For those of you who come from conda-forge
, you may associate CRM as "the tool that converts recipe files for
rattler-build
". Admittedly, that was the first-use case of the parsing capabilities provided by in this library. In
the future, we aim to expand past that and offer a number of recipe automation tools and modules.
To install the project to your current conda
environment, run:
conda install -c conda-forge conda-recipe-manager
This will add the commands conda-recipe-manager
and crm
to your environment's path. Note that both of these
commands are the same. crm
is provided for convenience of typing.
Although CRM is a library, it does ship with a handful of command line tools. Running crm --help
will provide a
an up-to-date listing of all available tools. Run crm <tool-name> --help
for usage documentation about each tool.
The following usage message was last updated on 2024-10-31:
Usage: crm [OPTIONS] COMMAND [ARGS]...
Command line interface for conda recipe management commands.
Options:
--help Show this message and exit.
Commands:
convert Converts a `meta.yaml` formatted-recipe file to the new
`recipe.yaml` format.
graph Interactive CLI for examining recipe dependency graphs.
patch Modify recipe files with JSON patch blobs.
rattler-bulk-build Given a directory, performs a bulk rattler-build
operation. Assumes rattler-build is installed.
A high-level overview of the CLI tools can be found here.
The make dev
directive will configure a conda
environment named conda-recipe-manager
for you with
a development version of the tooling installed.
make dev
conda activate conda-recipe-manager
We aim for a very high bar when it comes to code documentation so that we may leverage automatic documentation workflows. API docs are hosted here
conda-recipe-manager
environment, make sure that you exit the environment with
conda deactivate
before running make dev
. There have been known issues with attempting to delete the environment
while an active instance is open.make
(bmake
) to setup the environment. The Makefile
provided
assumes GNU make
is being used. This should only be an issue when running make dev
as the conda-recipe-manager
environment installs a version of GNU make
to the environment.pre-commit
is automatically installed and configured for you to run a number of automated checks on each commit. These
checks will also be strictly enforced by our automated GitHub workflows.
This project uses modern Python type annotations and a strict set of pylint
and mypy
configurations to ensure code
quality. We use the black
text formatter to prevent arguments over code style. We attempt to signify if a type,
variable, function, etc is private
/protected
with a single leading _
.
The provided Makefile
also provides a handful of convenience directives for running all or part of the pre-commit
checks:
make test
: Runs all the unit testsmake test-cov
: Reports the current test coverage percentage and indicates which lines are currently untested.make lint
: Runs our pylint
configuration, based on Google's Python standards.make format
: Automatically formats codemake analyze
: Runs the static analyzer, mypy
.make pre-commit
: Runs all the pre-commit
checks on every file.Here is a brief overview of our current release process:
CHANGELOG.md
pyproject.toml
, docs/conf.py
, and recipe/meta.yaml
environment.yaml
is up to date with the latest dependenciesPercy
and answering questions about the conda
file formats.