https://github.com/conda/conda-recipe-manager

A project for libraries and automated tools that manage and manipulate conda recipe files.

https://github.com/conda/conda-recipe-manager

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A project for libraries and automated tools that manage and manipulate conda recipe files.

Basic Info
  • Host: GitHub
  • Owner: conda
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Size: 8.67 MB
Statistics
  • Stars: 22
  • Watchers: 10
  • Forks: 17
  • Open Issues: 114
  • Releases: 16
Created over 2 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners

README.md

conda-recipe-manager

Commit Checks Integration Tests GitHub Release

Overview

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.

Notes about logging

CRM uses the standard Python logging library. However, the library modules use the NullHandler, so no logs are emitted by default. It is up to the client program to define a log handler.

A log handler is defined and used in the provided crm command line interface. By default, WARNING-level-and-above messages are reported to STDERR. Use crm --verbose to see all the logs.

Recipe Compatibility

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.

History

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.

Getting Started

General Installation

To install the project to your current conda environment, run: sh 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.

CLI Usage

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: ```sh Usage: crm [OPTIONS] COMMAND [ARGS]...

Command line interface for conda recipe management commands.

Options: -v, --verbose Enables verbose logging (for commands that use the logger). --help Show this message and exit.

Commands: bump-recipe Bumps a recipe file to a new version. 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.

Developer Installation and Notes

The make dev directive will configure a conda environment named conda-recipe-manager for you with a development version of the tooling installed.

sh make dev conda activate conda-recipe-manager

Developer Documentation

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

Setup Troubleshooting

  • If you are currently in the 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.
  • There have been known some issues using Berkley 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.

Making Commits

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 _.

Running pre-commit Checks Individually

The provided Makefile also provides a handful of convenience directives for running all or part of the pre-commit checks:

  1. make test: Runs all the unit tests
  2. make test-cov: Reports the current test coverage percentage and indicates which lines are currently untested.
  3. make lint: Runs our pylint configuration, based on Google's Python standards.
  4. make format: Automatically formats code
  5. make analyze: Runs the static analyzer, mypy.
  6. make pre-commit: Runs all the pre-commit checks on every file.

Release process

Here is a brief overview of our current release process: 1. Update CHANGELOG.md, including the "range of changes" link at the bottom of the file. 1. Update the version number in pyproject.toml, docs/conf.py, and recipe/meta.yaml 1. Ensure environment.yaml is up to date with the latest dependencies 1. Create a new release on GitHub with a version tag. 1. Manage the conda-forge feedstock, as per this doc. - If you are an employ of Anaconda, also manage the feedstock on AnacondaRecipes. - We can dog-food our own project by using: crm bump-recipe -t <version> recipe/meta.yaml in the applicable feedstock repository.

Don't forget, you can use crm bump-recipe -t <version> recipe/meta.yaml to help update the recipe file!

Special Thanks

  • @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 the conda file formats.
  • @mrbean-bremen for maintaining the pyfakefs project and for providing guidance and assistance with pyfakefs.

Owner

  • Name: conda
  • Login: conda
  • Kind: organization

conda is system-level, binary package and environment manager running on all major operating systems and platforms.

GitHub Events

Total
  • Create event: 28
  • Release event: 4
  • Issues event: 42
  • Watch event: 4
  • Delete event: 24
  • Member event: 4
  • Issue comment event: 84
  • Push event: 139
  • Pull request review comment event: 50
  • Pull request review event: 58
  • Pull request event: 62
  • Fork event: 5
Last Year
  • Create event: 28
  • Release event: 4
  • Issues event: 42
  • Watch event: 4
  • Delete event: 24
  • Member event: 4
  • Issue comment event: 84
  • Push event: 139
  • Pull request review comment event: 50
  • Pull request review event: 58
  • Pull request event: 62
  • Fork event: 5

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 9
anaconda.org: conda-recipe-manager

Renders local recipes, provides build orders, find outdated recipes.

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 47.0%
Average: 49.4%
Dependent repos count: 51.7%
Last synced: 10 months ago

Dependencies

.github/actions/setup-env/action.yaml actions
  • actions/cache 13aacd865c20de90d75de3b17ebe84f7a17d57d2 composite
  • actions/setup-python 0a5c61591373683505ea898e09a3ea4f39ef2b9c composite
.github/workflows/ci.yaml actions
  • ./.github/actions/setup-env * composite
  • actions/cache 13aacd865c20de90d75de3b17ebe84f7a17d57d2 composite
  • actions/checkout b4ffde65f46336ab88eb53be808477a3936bae11 composite
pyproject.toml pypi
  • click *
  • jinja2 *
  • jsonschema *
  • pyyaml *
  • requests *
environment.yaml conda
  • black
  • click >=8.1.7
  • conda
  • conda-build
  • isort
  • jinja2
  • jsonschema
  • make
  • mypy
  • pip
  • pre-commit
  • pylint
  • pytest
  • pytest-cov
  • pytest-xdist
  • python >=3.11
  • pyyaml
  • types-jsonschema
  • types-pyyaml