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 style workflow #4472

Merged
merged 6 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .github/vale/styles/OpenSearch/AcronymParentheses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ second: '(?:\b[A-Za-z-]+ )+\(([A-Z]{1,3}\/?[A-Z]{1,3}\d{0,2})\)'
exceptions:
- API
- ASCII
- AWS
- BASIC
- BM25
- CPU
Expand Down
7 changes: 6 additions & 1 deletion .github/vale/styles/OpenSearch/HeadingCapitalization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ extends: capitalization
message: "'%s' is a heading and should be in sentence case."
level: error
scope: heading
match: $sentence
match: $sentence
threshold: 1
indicators:
- ":"
exceptions:
- k # ignores lowercase k-NN
11 changes: 11 additions & 0 deletions .github/vale/styles/OpenSearch/SignatureV4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: substitution
message: "'%s': Use 'AWS Signature Version 4' instead of '%s' on first appearance. Then, Signature Version 4 may be used. Only use SigV4 when space is limited."
ignorecase: true
link: 'https://github.com/opensearch-project/documentation-website/blob/main/TERMS.md'
level: warning
action:
name: replace
swap:
sigv4: Signature Version 4
AWS sigv4: AWS Signature Version 4

2 changes: 2 additions & 0 deletions .github/vale/styles/OpenSearch/TableHeadings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ message: "'%s' is a table heading and should be in sentence case."
level: error
scope: table.header
match: $sentence
exceptions:
- k # ignores lowercase k-NN
1 change: 1 addition & 0 deletions .github/vale/styles/Vocab/OpenSearch/Plugins/accept.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Alerting plugin
Anomaly Detection plugin
Asynchronous Search plugin
Crypto plugin
Cross-Cluster Replication plugin
Maps plugin
Notebooks plugin
Expand Down
2 changes: 1 addition & 1 deletion .github/vale/styles/Vocab/OpenSearch/Products/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Okta
Open Distro
OpenID Connect
OpenSearch
OpenSearch Benchmark
OpenSearch Dashboards
OpenSearch Project
OpenSearch Service
Expand All @@ -73,7 +74,6 @@ Querqy
Query Workbench
RPM Package Manager
Ruby
SigV4
Simple Schema for Observability
Tableau
TorchScript
Expand Down
2 changes: 2 additions & 0 deletions .github/vale/styles/Vocab/OpenSearch/Words/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Levenshtein
[Ll]ookups?
[Ll]ossy
[Ll]owercases?d?
[Mm]acrobenchmarks?
[Mm]isorder
[Mm]ultifield
[Mm]ultiline
Expand Down Expand Up @@ -83,6 +84,7 @@ pebibyte
[Rr]ewriter
[Rr]ollup
[Rr]unbooks?
[Ss]harding
[Ss]erverless
[Ss]ignificand
stdout
Expand Down
61 changes: 61 additions & 0 deletions .github/vale/tests/test-headings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This should not be flagged

---

# Example with OpenSearch should not be flagged

---

# Example with Canada should not be flagged

---

# Example with: OpenSearch should not be flagged

---

# This: Should not be flagged

---

# Step 2: (Optional) Test OpenSearch should not be flagged

---

# Example with something else: Should not be flagged

---

# Example 2: Should not be flagged

---

# Example: should be flagged

---

# Example 3: should be flagged

---

# Example with something else: should be Flagged twice

---

# Example With something else: should be flagged twice

---

# Example: with OpenSearch should be flagged

---

# this should be flagged

---

# This Should Be Flagged

---

The King of England should not be flagged.
2 changes: 2 additions & 0 deletions .github/vale/tests/test-style-neg.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ This sentence tests rollover as a noun. To roll over, we test this as a verb.

This sentence tests setup as a noun. To set up, we test this as a verb.

This sentence tests AWS Signature Version 4.

This sentence tests the "simple" rule by doing it.

These two sentences. Test the spacing punctuation.
Expand Down
2 changes: 2 additions & 0 deletions .github/vale/tests/test-style-pos.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ This sentence tests roll-over as a noun. To rollover, we test this as a verb.

This sentence tests set-up as a noun. To setup, we test this as a verb.

This sentence tests AWS SigV4 and sigv4.

This sentence simply tests the "simple" rule by just doing it.

These two sentences. Test the spacing punctuation.
Expand Down
1 change: 1 addition & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ OpenSearch.RolloverNoun = YES
OpenSearch.RolloverVerb = YES
OpenSearch.SetupNoun = YES
OpenSearch.SetupVerb = YES
OpenSearch.SignatureV4 = YES
OpenSearch.Simple = YES
OpenSearch.SpacingPunctuation = YES
OpenSearch.SpacingSlash = YES
Expand Down
2 changes: 1 addition & 1 deletion _benchmark/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OpenSearch Benchmark is a macrobenchmark utility provided by the [OpenSearch Pro

- Tracking the overall performance of an OpenSearch cluster.
- Informing decisions about when to upgrade your cluster to a new version.
- Determining how changes to your workflow—such as modifying mappings or queries—might impact your cluster.
- Determining how changes to your workflow---such as modifying mappings or queries---might impact your cluster.

OpenSearch Benchmark can be installed directly on a compatible host running Linux and macOS. You can also run OpenSearch Benchmark in a Docker container. See [Installing OpenSearch Benchmark]({{site.url}}{{site.baseurl}}/benchmark/installing-benchmark/) for more information.

Expand Down