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

[CI] Enforce Vale on Data documentation #39029

Merged
merged 10 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .buildkite/lint.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@ steps:
- RAY_DISABLE_EXTRA_CPP=1 pip install -e python/[all]
- ./ci/lint/check_api_annotations.py
depends_on: forge

- label: ":lint-roller: lint: documentation style"
commands:
- ./ci/lint/check-documentation-style.sh
depends_on: forge
2 changes: 1 addition & 1 deletion .github/styles/Google/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: conditional
message: "Spell out '%s', if it's unfamiliar to the audience."
link: 'https://developers.google.com/style/abbreviations'
level: warning
level: error
bveeramani marked this conversation as resolved.
Show resolved Hide resolved
ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/Contractions.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: substitution
message: "Use '%s' instead of '%s'."
link: 'https://developers.google.com/style/contractions'
level: warning
level: error
ignorecase: true
action:
name: replace
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/Ellipses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: existence
message: "In general, don't use an ellipsis."
link: 'https://developers.google.com/style/ellipses'
nonword: true
level: warning
level: error
action:
name: remove
tokens:
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/FirstPerson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: existence
message: "Avoid first-person pronouns such as '%s'."
link: 'https://developers.google.com/style/pronouns#personal-pronouns'
ignorecase: true
level: warning
level: error
nonword: true
tokens:
- (?:^|\s)I\s
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/HeadingPunctuation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: existence
message: "Don't put a period at the end of a heading."
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings'
nonword: true
level: warning
level: error
scope: heading
action:
name: edit
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/Headings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: capitalization
message: "'%s' should use sentence-style capitalization."
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings'
level: warning
level: error
scope: heading
match: $sentence
indicators:
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/OxfordComma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ extends: existence
message: "Use the Oxford comma in '%s'."
link: 'https://developers.google.com/style/commas'
scope: sentence
level: warning
level: error
tokens:
- '(?:[^,]+,){1,}\s\w+\s(?:and|or)'
2 changes: 1 addition & 1 deletion .github/styles/Google/Ranges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ extends: existence
message: "Don't add words such as 'from' or 'between' to describe a range of numbers."
link: 'https://developers.google.com/style/hyphens'
nonword: true
level: warning
level: error
tokens:
- '(?:from|between)\s\d+\s?-\s?\d+'
2 changes: 1 addition & 1 deletion .github/styles/Google/Spacing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: existence
message: "'%s' should have one space."
link: 'https://developers.google.com/style/sentence-spacing'
level: warning
level: error
nonword: true
action:
name: remove
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/Spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: existence
message: "In general, use American spelling instead of '%s'."
link: 'https://developers.google.com/style/spelling'
ignorecase: true
level: warning
level: error
tokens:
- '(?:\w+)nised?'
- 'colour'
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/We.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: existence
message: "Try to avoid using first-person plural like '%s'."
link: 'https://developers.google.com/style/pronouns#personal-pronouns'
level: warning
level: error
ignorecase: true
tokens:
- we
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Google/Will.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: existence
message: "Avoid using '%s'."
link: 'https://developers.google.com/style/tense'
ignorecase: true
level: warning
level: error
tokens:
- will
- "'ll"
2 changes: 1 addition & 1 deletion .github/styles/Google/WordList.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: substitution
message: "Use '%s' instead of '%s'."
link: "https://developers.google.com/style/word-list"
level: warning
level: error
ignorecase: false
action:
name: replace
Expand Down
1 change: 1 addition & 0 deletions .github/styles/Vocab/Data/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Spotify('s)?
TFRecord(s)?
UDF(s)?
[Dd]atasource
[Dd]iscretizer(s)?
[Gg]roupby
[Ii]ndexable
[Ii]ngest
Expand Down
9 changes: 9 additions & 0 deletions ci/lint/check-documentation-style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euxo pipefail

wget https://github.com/errata-ai/vale/releases/download/v2.28.0/vale_2.28.0_Linux_64-bit.tar.gz
VALE_BIN=$(mktemp -d)
bveeramani marked this conversation as resolved.
Show resolved Hide resolved
tar -xvzf vale_2.28.0_Linux_64-bit.tar.gz -C "$VALE_BIN" vale
"$VALE_BIN"/vale doc/source/data
rm -rf "$VALE_BIN"
Loading