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
- If you are currently in the
conda-recipe-manager
environment, make sure that you exit the environment withconda deactivate
before runningmake dev
. There have been known issues with attempting to delete the environment while an active instance is open. - There have been known some issues using Berkley
make
(bmake
) to setup the environment. TheMakefile
provided assumes GNUmake
is being used. This should only be an issue when runningmake dev
as theconda-recipe-manager
environment installs a version of GNUmake
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 ourpylint
configuration, based on Google's Python standards.make format
: Automatically formats codemake analyze
: Runs the static analyzer,mypy
.make pre-commit
: Runs all thepre-commit
checks on every file.
Here is a brief overview of our current release process:
- Update
CHANGELOG.md
- Update the version number in
pyproject.toml
,docs/conf.py
, andrecipe/meta.yaml
- Ensure
environment.yaml
is up to date with the latest dependencies - Create a new release on GitHub with a version tag.
- Manage the conda-forge feedstock, as per this doc
- @cbouss for his work on the Percy project that originally inspired the recipe parser.
- @akabanovs for his work and experimentation on package dependency graph building.
- @JeanChristopheMorinPerso for his PR review contributions when this project was a part of
Percy
and answering questions about theconda
file formats.