python-package-guide icon indicating copy to clipboard operation
python-package-guide copied to clipboard

Use Vale (or some other tool) to check for style in a github action?

Open lwasser opened this issue 10 months ago • 5 comments

Is this possible? see comment below frm me in an open pr!

FUTURE IDEA: This is of course for another issue / PR BUT there is this tool I use locally called Vale that @Batalex turned me on to. it's nice because you can create your own style guide. i wonder if there is a way to set this up as a ci check for the organization in the future? we could then have the style guide information in a single repo and use it across all of our repositories.

Originally posted by @lwasser in https://github.com/pyOpenSci/python-package-guide/issues/224#issuecomment-2045809703

lwasser avatar Apr 09 '24 18:04 lwasser

referenced in #224

lwasser avatar Apr 09 '24 18:04 lwasser

this actually already exists - https://github.com/errata-ai/vale-action we'd just need to figure out how / where to store the styleguide files (essentially text files that tell it what to look for and what to update / fix.

lwasser avatar Apr 09 '24 18:04 lwasser

Pretty sure that I have used vale in CI in the past @lwasser.

willingc avatar Apr 09 '24 18:04 willingc

awesome @willingc your expertise would be great!!

what keeps coming up (and @kierisi has caught this too) is spelling things like PyPI pypi, test pypi testPyPI etc differently. we could create a setup that would implement / check for consistency of capitalization and spelling in CI and have a process where whenever we find a new word spelled or cased differently we can add it to the pyos styles.

lwasser avatar Apr 09 '24 20:04 lwasser

I am going to look into this issue (PyCon US 2024 sprints)

flpm avatar May 20 '24 19:05 flpm