Skip to content
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

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

sarayourfriend
Copy link
Contributor

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 run ov 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 in pre-commit, so run ov just lint and confirm it does!

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • [N/A] I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • [N/A] I ran the DAG documentation generator (ov just catalog/generate-docs for catalog
    PRs) 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
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
@sarayourfriend sarayourfriend added 🟩 priority: low Low priority and doesn't need to be rushed ✨ goal: improvement Improvement to an existing user-facing feature 🤖 aspect: dx Concerns developers' experience with the codebase dependencies Pull requests that update a dependency file 🧱 stack: mgmt Related to repo management and automations labels Sep 5, 2024
@sarayourfriend sarayourfriend requested a review from a team as a code owner September 5, 2024 07:03
@sarayourfriend sarayourfriend requested review from AetherUnbound and stacimc and removed request for a team September 5, 2024 07:03
@openverse-bot openverse-bot added the 🧱 stack: documentation Related to Sphinx documentation label Sep 5, 2024
Copy link
Contributor

@stacimc stacimc left a 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.

@sarayourfriend
Copy link
Contributor Author

sarayourfriend commented Sep 7, 2024

Ah! It's because CI does not run using ov, so PDM isn't available ☹️

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

Copy link

github-actions bot commented Sep 9, 2024

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 🔄:

Copy link
Contributor

@stacimc stacimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Tests well, LGTM!

@sarayourfriend sarayourfriend merged commit 5cec5d0 into main Sep 9, 2024
52 checks passed
@sarayourfriend sarayourfriend deleted the improve/ov-vale branch September 9, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase dependencies Pull requests that update a dependency file ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: mgmt Related to repo management and automations
3 participants