update_pinnings

Determine which packages need updates after pinning change

Functions

check(recipe, build_config[, keep_metas, …])

Determine if a given recipe should have its build number increments (bumped) due to a recent change in pinnings.

has_invalid_build_string(meta)

rtype

bool

have_noarch_python_build_number(meta)

Checks if we have a noarch:python build with same version+build_number

have_variant(meta)

Checks if we have an exact match to name/version/buildstring

skip_for_variants(meta, variant_keys)

Check if the recipe uses any given variant keys

will_build_only_missing(metas)

Checks if only new builds will be added (no divergent build ids exist)

will_build_variant(meta)

Check if the recipe variant will be built as currently rendered

Classes

State(value)

Recipe Pinning State

Documentation

class bioconda_utils.update_pinnings.State(value)[source]

Recipe Pinning State

BUMP = 16

Recipe has a variant that needs bumping

BUMPED = 8

Recipe has a variant that was bumped already

FAIL = 1

Recipe had a failure rendering

HAVE = 4

Recipe has a variant that exists already

HAVE_NOARCH_PYTHON = 32

python variant that exists already

Type

Recipe has a noarch

SKIP = 2

Recipe has a variant that will be skipped

failed()[source]

True if the update pinning check failed

Return type

bool

needs_bump()[source]

Checks if the state indicates that the recipe needs to be bumped

Return type

bool

bioconda_utils.update_pinnings.check(recipe, build_config, keep_metas=False, skip_variant_keys=frozenset({}))[source]

Determine if a given recipe should have its build number increments (bumped) due to a recent change in pinnings.

Parameters
  • recipe (Recipe) – The recipe to check

  • build_config – conda build config object

  • keep_metas – If true, Recipe.conda_release is not called

  • skip_variant_keys (AbstractSet[str]) – Variant keys to skip a recipe for if they are used

Return type

State

Returns

Tuple of state and a the input recipe

bioconda_utils.update_pinnings.have_noarch_python_build_number(meta)[source]

Checks if we have a noarch:python build with same version+build_number

Parameters

meta (MetaData) – Variant MetaData object

Returns

python and version+build_number exists already in repodata

Return type

True if noarch

bioconda_utils.update_pinnings.have_variant(meta)[source]

Checks if we have an exact match to name/version/buildstring

Parameters

meta (MetaData) – Variant MetaData object

Return type

bool

Returns

True if the variant’s build string exists already in the repodata

bioconda_utils.update_pinnings.skip_for_variants(meta, variant_keys)[source]

Check if the recipe uses any given variant keys

Parameters

meta (MetaData) – Variant MetaData object

Return type

bool

Returns

True if any variant key from variant_keys is used

bioconda_utils.update_pinnings.will_build_only_missing(metas)[source]

Checks if only new builds will be added (no divergent build ids exist)

Parameters

metas (List[MetaData]) – List of Variant MetaData objects

Return type

bool

Returns

True if no divergent build strings exist in repodata

bioconda_utils.update_pinnings.will_build_variant(meta)[source]

Check if the recipe variant will be built as currently rendered

Parameters

meta (MetaData) – Variant MetaData object

Return type

bool

Returns

True if all extant build numbers are smaller than the one indicated by the variant MetaData.