How to fix Pre-commit and Benchmarks run failures? #505
-
I have setup my package using the project template and am getting errors on the benchmarks and pre-commit runs. I have tried googling the errors but haven't found anything useful (that I can understand). For the workflow run entitled "Run pre-commit hooks / pre-commit-ci ", it produces thousands of lines of output and ends with: Does anyone have any advice on how to proceed? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Addendum: I installed pre-commit locally and ran it. There were a number of linter errors, some of which I don't want to fix (eg. mixed case variable names). Anyway, I will chip away at these errors to see if that helps, and report back. |
Beta Was this translation helpful? Give feedback.
-
We just debugging a similar sounding error in one of our repositories. The root cause for us was a missing dependency in the pyproject.toml file. We were using matplotlib in one of the Python files, but had only included it in the dev dependencies. Without the debug trace, I can't say if this is happening to you as well. But you can scan for any mention of missing libraries. |
Beta Was this translation helpful? Give feedback.
-
Hi @evevkovacs, thanks for reaching out to us! Hopefully I am looking at the correct workflow. It seems like the issue might be that the Python version specified for the benchmarking tool (ASV) is not compatible with the one specified for the package:
I suspect that upgrading the Python version here to "3.12" should help. Can you please give it a try? |
Beta Was this translation helpful? Give feedback.
As a follow-up, running pre-commit (and various required helper packages) locally was helpful. I either resolved all the linter errors or changed the precommit yaml file to ignore the ones I didn't want to change and was able to get the pre-commit to pass all tests. After I pushed the changes to the repository, the test succeeded.