check_policy

Policy compliance

This checks that recipes are in accordance with policy (as far as it can be mechanically checked).

Classes

cran_packages_to_conda_forge(_linter)

CRAN packages not depending on Bioconda should go to Conda-Forge

folder_and_package_name_must_match(_linter)

The recipe folder and package name do not match.

gpl_requires_license_distributed(_linter)

The recipe packages GPL software but is missing copy of license.

has_windows_bat_file(_linter)

The recipe directory contains a bat file.

long_summary(_linter)

The summary line is rather long

should_not_use_fn(_linter)

The recipe uses source/fn

uses_vcs_url(_linter)

The recipe downloads source from a VCS

Documentation

class bioconda_utils.lint.check_policy.cran_packages_to_conda_forge(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

CRAN packages not depending on Bioconda should go to Conda-Forge

This recipe builds a CRAN package and does not depend on packages from Bioconda. It should therefore be moved to Conda-Forge.

check_deps(deps)[source]

Execute check on recipe dependencies

Example format for deps:

{
  'setuptools': ['requirements/run',
                 'outputs/0/requirements/run/1'],
  'compiler_cxx': ['requirements/build/0']
}

You can use the values in the list directly as section parameter to self.message().

Parameters

deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.

class bioconda_utils.lint.check_policy.folder_and_package_name_must_match(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The recipe folder and package name do not match.

For clarity, the name of the folder the meta.yaml resides, in and the name of the toplevel package should match.

check_recipe(recipe)[source]

Execute check on recipe

Override this method in subclasses, using self.message() to issue LintMessage as failures are encountered.

Parameters

recipe – The recipe under test.

class bioconda_utils.lint.check_policy.gpl_requires_license_distributed(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The recipe packages GPL software but is missing copy of license.

The GPL requires that a copy of the license accompany all distributions of the software. Please add:

about:
    license_file: name_of_license_file

If the upstream tar ball does not include a copy, please ask the authors of the software to add it to their distribution archive.

check_recipe(recipe)[source]

Execute check on recipe

Override this method in subclasses, using self.message() to issue LintMessage as failures are encountered.

Parameters

recipe – The recipe under test.

class bioconda_utils.lint.check_policy.has_windows_bat_file(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The recipe directory contains a bat file.

Bioconda does not currently build packages for Windows (and has at this time no plans to change this), so these files cannot be tested.

Please remove any *.bat files generated by conda skeleton from the recipe directory.

check_recipe(recipe)[source]

Execute check on recipe

Override this method in subclasses, using self.message() to issue LintMessage as failures are encountered.

Parameters

recipe – The recipe under test.

class bioconda_utils.lint.check_policy.long_summary(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The summary line is rather long

Consider using the description field for longer text:

about:

summary: Fancy Read Simulator (makes drinks) description: |

XYZ is a very fancy read simulator that will not just make coffee while you are waiting but prepare all kinds of exquisite caffeeinated beverages from freshly roasted, single source beans ground to match ambient humidity.

This will fit better into the templates listing and describing recipes, which assume the summary to be a title and the description to be one or more paragraphs.

check_recipe(recipe)[source]

Execute check on recipe

Override this method in subclasses, using self.message() to issue LintMessage as failures are encountered.

Parameters

recipe – The recipe under test.

class bioconda_utils.lint.check_policy.should_not_use_fn(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The recipe uses source/fn

There is no need to specify the filename as the URL should give a name and it will in most cases be unpacked automatically.

check_source(source, section)[source]

Execute check on each source

Parameters
  • source – Dictionary containing the source section

  • section – Path to the section. Can be source or source/0 (1,2,3…).

class bioconda_utils.lint.check_policy.uses_vcs_url(_linter)[source]

Bases: bioconda_utils.lint.LintCheck

The recipe downloads source from a VCS

Please build from source archives and don’t use the git_url, svn_url or hg_url feature of conda.

check_source(source, section)[source]

Execute check on each source

Parameters
  • source – Dictionary containing the source section

  • section – Path to the section. Can be source or source/0 (1,2,3…).