check_policy¶
Policy compliance
This checks that recipes are in accordance with policy (as far as it can be mechanically checked).
Classes
|
CRAN packages not depending on Bioconda should go to Conda-Forge |
|
The recipe folder and package name do not match. |
|
The recipe packages GPL software but is missing copy of license. |
|
The recipe directory contains a |
|
The summary line is rather long |
|
The recipe uses source/fn |
|
The recipe downloads source from a VCS |
|
The version string should not start with a "v" character |
Documentation
- class bioconda_utils.lint.check_policy.uses_vcs_url(_linter)[source]¶
The recipe downloads source from a VCS
Please build from source archives and don’t use the
git_url
,svn_url
orhg_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
orsource/0
(1,2,3…).
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.folder_and_package_name_must_match(_linter)[source]¶
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 issueLintMessage
as failures are encountered.- Parameters:
recipe – The recipe under test.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.gpl_requires_license_distributed(_linter)[source]¶
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.
- requires: List[LintCheck] = ['missing_license']¶
Checks that must have passed for this check to be executed.
- check_recipe(recipe)[source]¶
Execute check on recipe
Override this method in subclasses, using
self.message()
to issueLintMessage
as failures are encountered.- Parameters:
recipe – The recipe under test.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.should_not_use_fn(_linter)[source]¶
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
orsource/0
(1,2,3…).
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.has_windows_bat_file(_linter)[source]¶
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 byconda skeleton
from the recipe directory.- check_recipe(recipe)[source]¶
Execute check on recipe
Override this method in subclasses, using
self.message()
to issueLintMessage
as failures are encountered.- Parameters:
recipe – The recipe under test.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.long_summary(_linter)[source]¶
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 issueLintMessage
as failures are encountered.- Parameters:
recipe – The recipe under test.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.cran_packages_to_conda_forge(_linter)[source]¶
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 toself.message()
.- Parameters:
deps – Dictionary mapping requirements occurring in the recipe to their locations within the recipe.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked
- class bioconda_utils.lint.check_policy.version_starts_with_v(_linter)[source]¶
The version string should not start with a “v” character
Version numbers in Conda recipes need to follow PEP 386
- check_recipe(recipe)[source]¶
Execute check on recipe
Override this method in subclasses, using
self.message()
to issueLintMessage
as failures are encountered.- Parameters:
recipe – The recipe under test.
- messages: List[LintMessage]¶
Messages collected running tests
- recipe: _recipe.Recipe¶
Recipe currently being checked