Feedrattler
Convert conda-forge feedstock to rattler-build
Install / Use
/learn @hadim/FeedrattlerREADME
feedrattler 🐍
Convert conda-forge feedstock to rattler-build.
[!IMPORTANT] This project uses Conda Recipe Manager (CRM) to upgrade V0 (
meta.yaml) recipe files to the new V1 (recipe.yaml) files. If you run into issues when it comes to upgrading to therecipe.yamlfile specifically, please consult the list of open CRM Issues and submit a new ticket if you don't see an existing issue that describes your problem.
Usage 🚀
The below command will convert the feedstock https://github.com/conda-forge/my-awesome-package-feedstock to a v1 recipe using rattler-build. The converted branch will be pushed to the gh_user fork of the feedstock (https://github.com/gh_user/my-awesome-package-feedstock) (it will be created if it does not exist).
pixi exec feedrattler my-awesome-package-feedstock
Credentials for the github API will either be taken from the GITHUB_TOKEN environment variable.
Alternatively, if you have the official gh CLI installed and configured credentials will be taken from there.
If you would rather run without GitHub API access, ensure you already have a fork on the feedstock.
The package is also available as a conda package:
conda install -c conda-forge feedrattler
# or
conda install -c conda-forge feedrattler
# or
pixi add feedrattler
# or installed globally
pixi global install feedrattler
# or install latest (main) version from soure
pixi global install --git https://github.com/hadim/feedrattler
Options ⚙️
<!-- Generate and edit with `pixi run typer feedrattler.cli utils docs --name feedrattler` -->Use feedrattler --help to see all available options.
feedrattler [OPTIONS] FEEDSTOCK_NAME [GITHUB_USERNAME]
Arguments:
FEEDSTOCK_NAME: 📦 The name of the feedstock repository. [required][GITHUB_USERNAME]: 👤 The GitHub username or organization that owns the feedstock.
Options:
--use-pixi / --no-use-pixi: 🚀 Addpixito the conda-forge configurationconda_install_toolto manage the conda environment. [default: use-pixi]--local-clone-dir TEXT: 📁 Path to a local clone of the feedstock repository. A temporary dir will be created if not set.--local-clone-dir-force-erase / --no-local-clone-dir-force-erase: 💥 Force erase the local clone directory if it exists. [default: no-local-clone-dir-force-erase]--git-rev TEXT: 📌 The git SHA to clone the feedstock. The default branch HEAD is used when not set.--branch-name TEXT: 🌿 The name of the branch to create for the converted recipe. [default: convert_feedstock_to_v1_recipe_format]--rerender / --no-rerender: 🔄 Whether to re-render the feedstock after conversion. [default: rerender]--draft-pr / --no-draft-pr: 📝 Whether to create a draft pull request or not. [default: draft-pr]--enable-rerender-logs / --no-enable-rerender-logs: 📝 Enable detailed logs from the re-rendering process. [default: no-enable-rerender-logs]--log-level TEXT: 🚦 The log level to use. Options: DEBUG, INFO, WARNING, ERROR, CRITICAL [default: INFO]--github-token TEXT: 🔑 GitHub token. Defaults to the GITHUB_TOKEN environment variable or gh cli. [env var: GITHUB_TOKEN]--dotenv TEXT: 📄 Path to a .env file containing environment variables.--clone-type [auto|ssh|https]: 🐑 The type of clone to use (ssh or https). [default: auto]--version: Show the version of the application.--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
Development 🛠️
You need to use pixi.
# Execute feedrattler CLI
pixi run feedrattler
# Run tests
pixi run tests
# Format code
pixi run format
# Lint code
pixi run lint
# Lint and format code
pixi run lint-format
Release 🚢
The package is not released on PyPi but only on conda-forge at https://github.com/conda-forge/feedrattler-feedstock.
To cut a new release:
- Trigger the
releaseworkflow on the main branch. - A new GitHub Release will be created with the new version.
- The conda-forge bot will create a PR to update the feedstock.
- Once the conda-forge PR merged, the new conda version will be available.
