pyOpenSci / python-package-guide

scientific Python package recommendations & guidance curated by pyOpenSci
https://www.pyopensci.org/python-package-guide/
Other
70 stars 43 forks source link

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

Closed lwasser closed 4 weeks ago

lwasser commented 2 months ago

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 commented 2 months ago

referenced in #224

lwasser commented 2 months ago

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.

willingc commented 2 months ago

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

lwasser commented 2 months ago

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.

flpm commented 1 month ago

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