-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add special lints for bioconda-repodata-patches recipe (#855)
- Loading branch information
1 parent
417e7da
commit 11c9229
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from bioconda_utils import utils | ||
from bioconda_utils.lint import INFO, LintCheck | ||
|
||
|
||
class repodata_patches_no_version_bump(LintCheck): | ||
"""The bioconda-repodata-patches recipe was changed but does not contain a version bump. | ||
Please set the version to the current date in the format ``YYYYMMDD``. | ||
""" | ||
def check_recipe(self, recipe): | ||
if recipe.get("package/name") != "bioconda-repodata-patches": | ||
return | ||
repodata = utils.RepoData() | ||
old_versions = repodata.get_versions("bioconda-repodata-patches") | ||
if recipe.get('version') in old_versions: | ||
self.message() | ||
|
||
|
||
class repodata_patches_show_diff(LintCheck): | ||
"""The bioconda-repodata-patches recipe was changed. | ||
Here comes the resulting repodata-diff: | ||
""" | ||
|
||
severity = INFO | ||
|
||
def check_recipe(self, recipe): | ||
if recipe.get("package/name") != "bioconda-repodata-patches": | ||
return | ||
# TODO run diff script and display the diff as a lint message |