Conda Forge Activity (rever.activities.conda_forge)

Activity for updating conda-forge feedstocks.

class rever.activities.conda_forge.CondaForge(*, deps=frozenset({'push_tag', 'tag'}))[source]

Updates conda-forge feedstocks.

The behaviour of this activity may be adjusted through the following environment variables:


str or None, feedstock name or URL, default $PROJECT-feedstock.


str, one of 'ssh', 'http', or 'https' that specifies how the activity should interact with github when cloning, pulling, or pushing to the feedstock repo. Note that 'ssh' requires you to have an SSH key registered with github. The default is 'ssh'.


str, the URL that the recipe will use to download the source code. This is needed so that we may update the hash of the downloaded file. This string is evaluated with the current environment. Default '$GITHUB_ORG/$GITHUB_REPO/archive/$VERSION.tar.gz'.


str, the type of hash that the recipe uses, eg 'md5' or 'sha256'. Default 'sha256'.


list or 3-tuples of str, this is list of (filename, pattern-regex, replacement) tuples that is evaluated inside of the recipe directory. This is similar to the version bump pattern structure. Both the pattern-regex str and the replacement str will have environment variables expanded. The following environment variables are added for this evaluation:

  • $SOURCE_URL: the fully expanded source code URL.

  • $HASH_TYPE: the hash type used to hash $SOURCE_URL.

  • $HASH: the hexdigest of $SOURCE_URL.

The default patterns match most standard recipes.


bool, whether the activity should open a pull request to the upstream conda-forge feestock, default True.


bool, whether the activity should rerender the feedstock using conda-smithy, default True.


bool, whether the activity should create a new fork of the feedstock if it doesn’t exist already, default True.


str, the org to fork the recipe to or which holds the fork, if '' use the registered gh username, defaults to ''

Other environment variables that affect the behavior are:


the credential file to use. This should NOT be set in the rever.xsh file


the github organization that the project belongs to.


the github repository of the project.


str, the template string used to tag the version, by default this is ‘$VERSION’. Used to download project source.


the name of the project being released.


the user’s config directory for rever, which is where the GitHub credential files are stored by default.

namestr, optional

Name of the activity.

depsset of str, optional

Set of activities that must be completed before this activity is executed.

funccallable, optional

Function to perform as activity when this activities is executed (called).

undocallable, optional

Function to undo this activities behaviour and reset the repo state.

setupcallable, optional

Function to help initialize the activity.

checkcallable, optional

Function to check if the activity can be run sucessfully on the user’s machine, with their credentials, etc. This function should return True if the activity can be run, and False otherwise.

requiresdict or None, optional

A dict of dicts of the following form that specifies the command line utility and import requirements for this activity.

    "commands": {"<cli name>": "<package name>", ...}
    "imports": {"<module name>": "<package name>", ...}

The top-level keys are both optional, and this will default to an empty dict.

argstuple, optional

Arguments to be supplied to the func(*args), if needed.

kwargsmapping, optional

Keyword arguments to be supplied to the func(**kwargs), if needed.

descstr, optional

A short description of this activity


Returns all kwargs for this activity.


Calls this activity’s check() function.


Checks that we can rerender and login


Checks that an activities requirements are actually available.


Decorator that sets the check function for this activity.


Removes kwarg from the environment, if they exist.


Obtains possible func() kwarg from the environment.


Calls this activity’s setup() initialization function.


Decorator that sets the setup function for this activity.


Reverts to the last instance of this activity. This default implementation uses the revision in the log file from the last time that the activity was started. This may be overridden in a subclass.


Decorator that sets the undo function for this activity.

property env_names

Dictionary mapping parameter names to the names of environment varaibles that the activity looks for when it is executed.