Skip to content

feat(checks): Renovate checks#823

Draft
abkfenris wants to merge 4 commits into
scientific-python:mainfrom
abkfenris:renovate
Draft

feat(checks): Renovate checks#823
abkfenris wants to merge 4 commits into
scientific-python:mainfrom
abkfenris:renovate

Conversation

@abkfenris

@abkfenris abkfenris commented Jun 27, 2026

Copy link
Copy Markdown

Adds an initial set of checks for Renovate equal to GH200 (REN200 is there a config) and GH210 (REN210 - basic management of GitHub Actions).

Made a choice that as long as there was either Renovate or Dependabot configured, repo review should pass out of the box. To do that added DEP200 that will pass if either a Renovate or Dependabot config exists, and made REN200 and GH200 return None to skip them and downstream checks.

Tries to read all non package.json locations (which is deprecated). Uses a preprocessor to strip comments and trailing commas which supports most of the renovate config varieties. An optional dependency on the pure Python json5 library takes care of the rest.

Closes #463 #740


📚 Documentation preview 📚: https://scientific-python-cookie--823.org.readthedocs.build/

@abkfenris

Copy link
Copy Markdown
Author

I manually tested against a range of repos with different renovate configs and locations, some from #463 and others randomly found by searching Github.

Here are roughly the ones per format that I tried:

SUPPORTED_RENOVATE_FILES = [
    "renovate.json",  # gulfofmaine/climatology_py_dash
    "renovate.jsonc",  # jumpstarter-dev/jumpstarter
    "renovate.json5",  # SonarSource/docker-sonarqube
    ".github/renovate.json",  # adobe/spectrum-css
    ".github/renovate.jsonc",
    ".github/renovate.json5",  # paddyroddy/.github
    ".gitlab/renovate.json",  # zammad/zammad
    ".gitlab/renovate.jsonc",
    ".gitlab/renovate.json5",
    ".renovaterc",  #     prettier/eslint-config-prettier
    ".renovaterc.json",  # Esri/calcite-design-system
    ".renovaterc.jsonc",
    ".renovaterc.json5",
    # "package.json"  # Deprecated, renovate is a field within the file
]

Also

There were some of the .jsonc and .json5 that didn't have anything special and were able to be parsed by the standard lib json module, so I didn't disable the formats. Any that throw an error opening are treated as empty configs.

It looks like json5 might be a relatively common config variant, but I didn't want to add a dependency for this first pass.

I also only checked for directly enabling GitHub actions, or that it's in two common presets. If there are other common presets that should be included those can be added, but for less common presets, REN210 might need to be disabled.

@henryiii

Copy link
Copy Markdown
Collaborator

I wonder if we can support jsonc with a little preprocessing? Stripping comments should be easy, trailing commas less so. Any dependencies we take on must support Pyodide. I haven't used renovate so can't be of too much help.

@abkfenris

Copy link
Copy Markdown
Author

I can try giving a preprocessor a shot.

What about making https://pypi.org/project/json5/ an optional dependency? It's supposedly not fast, but it is pure Python. I could structure it so that we try preprocessing first, and then fall back to json5 if it's available.

@henryiii

Copy link
Copy Markdown
Collaborator

I doubt speed is that important. I'd be fine with json5 as a dependency.

@abkfenris

Copy link
Copy Markdown
Author

Ok, added a preprocessor default, and an optional dependency for full json5 support.

abkfenris and others added 4 commits July 24, 2026 19:59
Adds an initial set of checks for Renovate equal to GH200 (REN200 is there a config) and GH210 (REN210 - basic management of GitHub Actions). 

Made a choice that as long as there was either Renovate or Dependabot configured, repo review should pass out of the box. To do that added DEP200 that will pass if either a Renovate or Dependabot config exists, and made REN200 and GH200 return `None` to skip them and downstream checks.

Tries to read all non `package.json` locations (`package.json`), but only supports configs that can be parsed by the built in `json` library.

Closes scientific-python#463 scientific-python#740
Adds a preprocessor that can deal with most comments and trailing commas in JSONC and JSON%, but will fall back to an optional json5 for full format support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recommend Renovate as an alternative to dependabot

2 participants