Skip to content

Commit e6472aa

Browse files
committed
Move Vale from a manual installation to pip
- Move the install and configuration documentation of Vale to authors.md.
1 parent 1f993ef commit e6472aa

File tree

4 files changed

+41
-35
lines changed

4 files changed

+41
-35
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ linkcheckbroken: deps ## Run linkcheck and show only broken links
196196

197197
.PHONY: vale
198198
vale: deps ## Run Vale style, grammar, and spell checks
199-
vale sync
200-
vale --no-wrap $(VALEFILES)
199+
bin/vale sync
200+
bin/vale --no-wrap $(VALEFILES)
201201
@echo
202202
@echo "Vale is finished; look for any errors in the above output."
203203

docs/contributing/documentation/authors.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,12 @@ Open `/_build/html/index.html` in a web browser.
5353

5454
### American English spelling, grammar, and syntax, and style guide
5555

56-
Spellings are enforced through [`Vale`](https://vale.sh/).
56+
[Vale](https://vale.sh/) is a linter for narrative text.
57+
It checks spelling, English grammar, and style guides.
5758
Plone uses American English.
5859

59-
Spelling is configured in {file}`Makefile`, {file}`.vale.ini`, and in files in `styles/Vocab/Plone/`.
60-
61-
Authors should add new words and proper names using correct casing to {file}`styles/Vocab/Plone/accept.txt`, sorted alphabetically and case-insensitive.
62-
6360
Vale also provides English grammar and syntax checking, as well as a Style Guide.
64-
We follow the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/).
61+
The Plone Documentation Team selected the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) for its ease of use—especially for non-native English readers and writers—and attention to non-technical audiences.
6562

6663
To perform all these checks, run the following command.
6764

@@ -74,6 +71,41 @@ We also understand that contributors might not be fluent in English.
7471
We encourage contributors to make a reasonable effort, and to request a review of their pull request from community members who are fluent in English to fix grammar and syntax.
7572
Please ask!
7673

74+
```{note}
75+
More corrections to spellings and Vale's configuration are welcome by submitting a pull request.
76+
This is an easy way to become a contributor to Plone.
77+
See {ref}`authors-advanced-vale-usage-label` for details.
78+
```
79+
80+
81+
(authors-advanced-vale-usage-label)=
82+
83+
#### Advanced Vale usage
84+
85+
To have Vale check only a specific file or directory of files, you can issue [Vale commands](https://vale.sh/manual/) with options in a shell session.
86+
To allow this, you must either:
87+
88+
- activate your Python virtual environment
89+
- use the virtual environment path, such as `bin/vale`
90+
- install Vale using operating system's package manager
91+
92+
The Vale `Makefile` command automatically installs Vale into your Python virtual environment—which is also created via any documentation `Makefile` commands—when you invoke it for the first time.
93+
94+
Vale has [integrations](https://vale.sh/docs/integrations/guide/) with various IDEs.
95+
Integration might require installing Vale using operating system's package manager.
96+
97+
- [JetBrains](https://vale.sh/docs/integrations/jetbrains/)
98+
- [Vim](https://github.com/dense-analysis/ale)
99+
- [VS Code](https://github.com/errata-ai/vale-vscode)
100+
101+
Plone configures Vale in three places:
102+
103+
- {file}`.vale.ini` is Vale's configuration file.
104+
This file allows overriding rules or changing their severity.
105+
- {file}`Makefile` passes options to the `vale` command, such as the files Vale checks.
106+
- Plone documentation uses a custom spelling dictionary, with accepted and rejected spellings in `styles/Vocab/Plone`.
107+
Authors should add new words and proper names using correct casing to {file}`styles/Vocab/Plone/accept.txt`, sorted alphabetically and case-insensitive.
108+
77109

78110
(authors-linkcheck-label)=
79111

docs/contributing/documentation/setup-build.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,6 @@ A more recent Python is preferred.
3030
Use your system's package manager or [pyenv](https://github.com/pyenv/pyenv) to install an appropriate version of Python.
3131

3232

33-
(setup-build-installation-vale-label)=
34-
35-
### Vale
36-
37-
Vale is a linter for narrative text.
38-
It checks spelling, English grammar, and style guides.
39-
Plone documentation uses a custom spelling dictionary, with accepted and rejected spellings in `styles/Vocab/Plone`.
40-
41-
Use your operating system's package manager to [install Vale](https://vale.sh/docs/vale-cli/installation/).
42-
43-
Vale also has [integrations](https://vale.sh/docs/integrations/guide/) with various IDEs.
44-
45-
- [JetBrains](https://vale.sh/docs/integrations/jetbrains/)
46-
- [Vim](https://github.com/dense-analysis/ale)
47-
- [VS Code](https://github.com/errata-ai/vale-vscode)
48-
49-
Plone documentation uses a file located at the root of the repository, `.vale.ini`, to configure Vale.
50-
This file allows overriding rules or changing their severity.
51-
52-
The Plone Documentation Team selected the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) for its ease of use—especially for non-native English readers and writers—and attention to non-technical audiences.
53-
54-
```{note}
55-
More corrections to spellings and Vale's configuration are welcome by submitting a pull request.
56-
This is an easy way to become a contributor to Plone.
57-
```
58-
59-
6033
(setup-build-installation-graphviz-label)=
6134

6235
### Graphviz

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ sphinxcontrib.httpdomain # plone.restapi
1616
sphinxcontrib.httpexample # plone.restapi
1717
sphinxcontrib-video
1818
sphinxext-opengraph
19+
vale

0 commit comments

Comments
 (0)