Skip to content

Commit

Permalink
feat: add special lints for bioconda-repodata-patches recipe (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester authored Oct 4, 2023
1 parent 417e7da commit 11c9229
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions bioconda_utils/lint/check_repodata_patches.py
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

0 comments on commit 11c9229

Please sign in to comment.