Skip to content

Commit

Permalink
Merge pull request #1891 from ytausch/disabled-inspection
Browse files Browse the repository at this point in the history
add "disabled" bot inspection to schema
  • Loading branch information
beckermr authored Mar 25, 2024
2 parents 570fdda + 75773c7 commit 56750bb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
7 changes: 4 additions & 3 deletions conda_smithy/data/conda-forge.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
"inspection": {
"anyOf": [
{
"type": "boolean"
"const": false
},
{
"$ref": "#/$defs/BotConfigInspectionChoice"
Expand Down Expand Up @@ -358,7 +358,8 @@
"hint-grayskull",
"update-all",
"update-source",
"update-grayskull"
"update-grayskull",
"disabled"
],
"title": "BotConfigInspectionChoice",
"type": "string"
Expand Down Expand Up @@ -1783,7 +1784,7 @@
"type": "null"
}
],
"description": "This dictates the behavior of the conda-forge auto-tick bot which issues\nautomatic version updates/migrations for feedstocks.\nA valid example is:\n\n```yaml\nbot:\n # can the bot automerge PRs it makes on this feedstock\n automerge: true\n # only automerge on successful version PRs, migrations are not automerged\n automerge: 'version'\n # only automerge on successful migration PRs, versions are not automerged\n automerge: 'migration'\n\n # only open PRs if resulting environment is solvable, useful for tightly coupled packages\n check_solvable: true\n\n # The bot.inspection key in the conda-forge.yml can have one of six possible values:\n inspection: hint # generate hints using source code (backwards compatible)\n inspection: hint-all # generate hints using all methods\n inspection: hint-source # generate hints using only source code\n inspection: hint-grayskull # generate hints using only grayskull\n inspection: update-all # update recipe using all methods\n inspection: update-source # update recipe using only source code\n inspection: update-grayskull # update recipe using only grayskull\n\n # any branches listed in this section will get bot migration PRs in addition\n # to the default branch\n abi_migration_branches:\n - 'v1.10.x'\n\n version_updates:\n # use this for packages that are updated too frequently\n random_fraction_to_keep: 0.1 # keeps 10% of versions at random\n exclude:\n - '08.14'\n```\n\nThe `abi_migration_branches` feature is useful to, for example, add a\nlong-term support (LTS) branch for a package."
"description": "This dictates the behavior of the conda-forge auto-tick bot which issues\nautomatic version updates/migrations for feedstocks.\nA valid example is:\n\n```yaml\nbot:\n # can the bot automerge PRs it makes on this feedstock\n automerge: true\n # only automerge on successful version PRs, migrations are not automerged\n automerge: 'version'\n # only automerge on successful migration PRs, versions are not automerged\n automerge: 'migration'\n\n # only open PRs if resulting environment is solvable, useful for tightly coupled packages\n check_solvable: true\n\n # The bot.inspection key in the conda-forge.yml can have one of seven possible values and controls\n # the bots behaviour for automatic dependency updates:\n inspection: hint # generate hints using source code (backwards compatible)\n inspection: hint-all # generate hints using all methods\n inspection: hint-source # generate hints using only source code\n inspection: hint-grayskull # generate hints using only grayskull\n inspection: update-all # update recipe using all methods\n inspection: update-source # update recipe using only source code\n inspection: update-grayskull # update recipe using only grayskull\n inspection: disabled # don't update recipe, don't generate hints\n\n # any branches listed in this section will get bot migration PRs in addition\n # to the default branch\n abi_migration_branches:\n - 'v1.10.x'\n\n version_updates:\n # use this for packages that are updated too frequently\n random_fraction_to_keep: 0.1 # keeps 10% of versions at random\n exclude:\n - '08.14'\n```\n\nThe `abi_migration_branches` feature is useful to, for example, add a\nlong-term support (LTS) branch for a package."
},
"build_platform": {
"anyOf": [
Expand Down
13 changes: 9 additions & 4 deletions conda_smithy/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class BotConfigInspectionChoice(StrEnum):
UPDATE_ALL = "update-all"
UPDATE_SOURCE = "update-source"
UPDATE_GRAYSKULL = "update-grayskull"
DISABLED = "disabled"


class BotConfigVersionUpdatesSourcesChoice(StrEnum):
Expand Down Expand Up @@ -353,9 +354,11 @@ class BotConfig(BaseModel):
description="Open PRs only if resulting environment is solvable.",
)

inspection: Optional[Union[bool, BotConfigInspectionChoice]] = Field(
default="hint",
description="Method for generating hints or updating recipe",
inspection: Optional[Union[Literal[False], BotConfigInspectionChoice]] = (
Field(
default="hint",
description="Method for generating hints or updating recipe",
)
)

abi_migration_branches: Optional[List[str]] = Field(
Expand Down Expand Up @@ -612,14 +615,16 @@ class ConfigModel(BaseModel):
# only open PRs if resulting environment is solvable, useful for tightly coupled packages
check_solvable: true
# The bot.inspection key in the conda-forge.yml can have one of six possible values:
# The bot.inspection key in the conda-forge.yml can have one of seven possible values and controls
# the bots behaviour for automatic dependency updates:
inspection: hint # generate hints using source code (backwards compatible)
inspection: hint-all # generate hints using all methods
inspection: hint-source # generate hints using only source code
inspection: hint-grayskull # generate hints using only grayskull
inspection: update-all # update recipe using all methods
inspection: update-source # update recipe using only source code
inspection: update-grayskull # update recipe using only grayskull
inspection: disabled # don't update recipe, don't generate hints
# any branches listed in this section will get bot migration PRs in addition
# to the default branch
Expand Down
23 changes: 23 additions & 0 deletions news/1891-disabled-bot-inspection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* ``disabled`` is now a supported option for ``bot.inspection`` in the ``conda-forge.yml`` file (previously: ``false``)

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>

0 comments on commit 56750bb

Please sign in to comment.