Skip to content

Commit

Permalink
Update style workflow (#4472)
Browse files Browse the repository at this point in the history
* Update style workflow with sigv4 and sharding

Signed-off-by: Fanit Kolchina <[email protected]>

* Change heading capitalization to work with colons

Signed-off-by: Fanit Kolchina <[email protected]>

* Add more words

Signed-off-by: Fanit Kolchina <[email protected]>

* Ignore lowercase k in k-NN

Signed-off-by: Fanit Kolchina <[email protected]>

* Add sharding

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Fanit Kolchina <[email protected]>
  • Loading branch information
kolchfa-aws authored Jul 5, 2023
1 parent 5d43fa1 commit b2e6234
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 3 deletions.
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
4 changes: 4 additions & 0 deletions .github/vale/styles/Vocab/OpenSearch/Words/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[Aa]utomapping
[Aa]utopopulate
[Bb]ackoff
[Bb]ackporting
[Bb]ackpressure
[Bb]asemap
[Bb]igram
Expand Down Expand Up @@ -53,6 +54,7 @@ Levenshtein
[Ll]ookups?
[Ll]ossy
[Ll]owercases?d?
[Mm]acrobenchmarks?
[Mm]isorder
[Mm]ultifield
[Mm]ultiline
Expand Down Expand Up @@ -83,7 +85,9 @@ pebibyte
[Rr]ewriter
[Rr]ollup
[Rr]unbooks?
[Ss]harding
[Ss]erverless
[Ss]harding
[Ss]ignificand
stdout
[Ss]ubaggregation
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&#8212;such as modifying mappings or queries&#8212;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

0 comments on commit b2e6234

Please sign in to comment.