-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Vale 3 and refactor setup in light of ov #4866
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like linting is failing in CI 🤔 It works locally for me, both when running .vale/run
directly and when running lint
.
Ah! It's because CI does not run using I hope it can be solved by just making sure PDM is available when CI is running? 🤔 Update: Yes, that was it. Easy fix in df83269 |
Full-stack documentation: https://docs.openverse.org/_preview/4866 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. Changed files 🔄: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Tests well, LGTM!
Fixes
Fixes #3883 by @zackkrida
Description
I've updated Vale to version 3. Beyond making it work (addressing breaking changes in Vale), I haven't done anything to change the Vale configuration itself. However, I did take the opportunity to remove the usage of Docker for Vale, and move it to running using the Python library, installed as a small pdm project.
This has advantages over installing it with pipx in dev_env/Dockerfile, which I write down in my updates to
.vale/README.md
. TL;DR: renovate can update it for us, we can keep a pinned version, and we can easily make sure the right version is running (without needing to tell someone to runov init
if some version mismatch happens).Every time we run vale, pdm makes sure we've got the latest specified version (the one in the lock file), it syncs the styles (which is fast when they are already synced, it basically noops), and then finally actually runs Vale. I also managed to get all this working still without dumping Vale style configuration documents into the project directory by configuring Vale to use the global stylepath (but it's "global" for
ov
, so not really "global" 🙂).I had to make a small change to the heading of a file because it looks like Vale.Terms might have changed its behaviour, and it didn't like the capitalised "Decision-Making Process" for some reason 🤷 For how many things seem to have changed in Vale, that seemed like a fine thing to let go.
Testing Instructions
Check out the branch and run
ov j .vale/run
. Confirm it runs against the same set of files as before. Checks should pass. It should also run fine inpre-commit
, so runov just lint
and confirm it does!Checklist
Update index.md
).main
) or a parent feature branch.ov just catalog/generate-docs
for catalogPRs) or the media properties generator (
ov just catalog/generate-docs media-props
for the catalog or
ov just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin