pyroma icon indicating copy to clipboard operation
pyroma copied to clipboard

Disable checks

Open kasium opened this issue 2 years ago • 6 comments

Hey,

I use setuptools-scm to generate the version of my project. This means, that the setup call has no version? argument. Therefore I can't achieve a full score with pyroma.

It would be cool to have a way to disable check by e.g. a CLI parameter and/or configuration file (pyproject.toml)

kasium avatar Nov 02 '21 11:11 kasium

Supporting more modern PEP standards would be nice. Supporting setuptools-scm specifically isn't anything I'm going to spend time on.

Don't worry about not having a perfect score. It's not a competition. The tool is there to give you hints of what could be improved.

regebro avatar Mar 21 '22 16:03 regebro

Don't worry about not having a perfect score.

The one issue to note with that is a common use case of pyroma is with pre-commit and CIs (as, e.g. I heavily do), where a score below the nominal 10 (which given how relatively straightforward it is to achieve with a bit of extra metadata, otherwise seems reasonable) fails the check, and thus the CI/commit.

This can be partially mitigated by manually configuring the hook invocation to use a lower fail threshold, but given the lack of precision, does run the risk of obscuring other issues.

However, this will hopefully all be fixed as a side effect of #71 .

CAM-Gerlach avatar Mar 21 '22 16:03 CAM-Gerlach

Well, you only need to run it before release. If you use the excellent zest.releaser it will do it as a part of the release process.

regebro avatar Mar 21 '22 17:03 regebro

There's a --min parameter to set the minimum level of a "clean run", does that help? You can't get a full score, but you should be able to get a pass with --min=8 or whatever the acceptable level is?

regebro avatar Mar 22 '22 15:03 regebro

(this was what I was imprecisely referring to with

This can be partially mitigated by manually configuring the hook invocation to use a lower fail threshold, but given the lack of precision, does run the risk of obscuring other issues.

BTW)

CAM-Gerlach avatar Mar 22 '22 23:03 CAM-Gerlach

I see.

Well, I guess that it might be possible to implements something like this in some future major rewrite.

regebro avatar Mar 23 '22 01:03 regebro