browniebroke / pypackage-template

A project template for Python package with heavy use of Github actions
MIT License
53 stars 13 forks source link

Change `rangeStrategy` for `python` #597

Closed 34j closed 8 months ago

34j commented 8 months ago

Is your feature request related to a problem? Please describe. I am frustrated when Renovate opens a PR that tries to shrink the Python version. (e.g. >=3.8,<3.12 -> >=3.12,<3.13)

Describe the solution you'd like I am not very familiar with Renovate, but I was wondering if this could be accomplished by setting the rangeStrategy to widen (only for python). https://docs.renovatebot.com/configuration-options/#rangestrategy

Additional context https://github.com/34j/cached-historical-data-fetcher/pull/17

browniebroke commented 8 months ago

Nice suggestion, I didn't know about that option. I never had this problem, maybe because I usually don't set an upper limit on my Python versions?

Could you try it on that repo and feedback how it goes? The default renovate config in renovate.json comes from my shared ones, they are on my renovate-configs repo. You can either add more options or completely replace it.

34j commented 8 months ago

It was very easy.

{
  "extends": ["github>browniebroke/renovate-configs:python"],
  "packageRules": [
    {
      "matchPackageNames": ["python"],
      "rangeStrategy": "widen"
    }
  ]
}

Seems to be working well. https://github.com/34j/cached-historical-data-fetcher/pull/17 https://github.com/34j/cached-historical-data-fetcher/commit/0839a6c4a759c6e56511cef7b9b0f27d8544e104

browniebroke commented 8 months ago

Nice! Added to my base config, let's see how it goes.