diff --git a/vizro-ai/changelog.d/20240325_165942_jo_stichbury_add_vale_styles.md b/vizro-ai/changelog.d/20240325_165942_jo_stichbury_add_vale_styles.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-ai/changelog.d/20240325_165942_jo_stichbury_add_vale_styles.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-ai/docs/.vale/.vale.ini b/vizro-ai/docs/.vale/.vale.ini new file mode 100644 index 000000000..d286c96b5 --- /dev/null +++ b/vizro-ai/docs/.vale/.vale.ini @@ -0,0 +1,8 @@ +StylesPath = styles + +MinAlertLevel = suggestion + + +[*.md] +BasedOnStyles = Vale, Microsoft +Vale.Spelling = NO diff --git a/vizro-ai/docs/.vale/styles/Microsoft/AMPM.yml b/vizro-ai/docs/.vale/styles/Microsoft/AMPM.yml new file mode 100644 index 000000000..8b9fed162 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: Use 'AM' or 'PM' (preceded by a space). +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Accessibility.yml b/vizro-ai/docs/.vale/styles/Microsoft/Accessibility.yml new file mode 100644 index 000000000..05bf92739 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Accessibility.yml @@ -0,0 +1,25 @@ +extends: existence +message: "Don't use language (such as '%s') that defines people by their disability." +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms +level: suggestion +ignorecase: true +tokens: + - a victim of + - able-bodied + - affected by + - an epileptic + - crippled + - disabled + - dumb + - handicapped + - handicaps + - healthy + - lame + - maimed + - missing a limb + - mute + - normal + - sight-impaired + - stricken with + - suffers from + - vision-impaired diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Acronyms.yml b/vizro-ai/docs/.vale/styles/Microsoft/Acronyms.yml new file mode 100644 index 000000000..fe2fd9214 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Acronyms.yml @@ -0,0 +1,68 @@ +extends: conditional +message: "'%s' has no definition." +link: https://docs.microsoft.com/en-us/style-guide/acronyms +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - AI + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GDP + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - LLM + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - Vizro-AI + - XML + - XSS + - YAML + - ZIP diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Adverbs.yml b/vizro-ai/docs/.vale/styles/Microsoft/Adverbs.yml new file mode 100644 index 000000000..07d98d83e --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Adverbs.yml @@ -0,0 +1,270 @@ +extends: existence +message: "Consider removing '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences +ignorecase: true +level: warning +action: + name: remove +tokens: + - abnormally + - absentmindedly + - accidentally + - adventurously + - anxiously + - arrogantly + - awkwardly + - bashfully + - beautifully + - bitterly + - bleakly + - blindly + - blissfully + - boastfully + - boldly + - bravely + - briefly + - brightly + - briskly + - broadly + - busily + - calmly + - carefully + - carelessly + - cautiously + - cheerfully + - cleverly + - closely + - coaxingly + - colorfully + - continually + - coolly + - courageously + - crossly + - cruelly + - curiously + - daintily + - dearly + - deceivingly + - deeply + - defiantly + - deliberately + - delightfully + - diligently + - dimly + - doubtfully + - dreamily + - easily + - elegantly + - energetically + - enormously + - enthusiastically + - excitedly + - extremely + - fairly + - faithfully + - famously + - ferociously + - fervently + - fiercely + - fondly + - foolishly + - fortunately + - frankly + - frantically + - freely + - frenetically + - frightfully + - furiously + - generally + - generously + - gently + - gladly + - gleefully + - gracefully + - gratefully + - greatly + - greedily + - happily + - hastily + - healthily + - heavily + - helplessly + - honestly + - hopelessly + - hungrily + - innocently + - inquisitively + - intensely + - intently + - interestingly + - inwardly + - irritably + - jaggedly + - jealously + - jovially + - joyfully + - joyously + - jubilantly + - judgmentally + - justly + - keenly + - kiddingly + - kindheartedly + - knavishly + - knowingly + - knowledgeably + - lazily + - lightly + - limply + - lively + - loftily + - longingly + - loosely + - loudly + - lovingly + - loyally + - madly + - majestically + - meaningfully + - mechanically + - merrily + - miserably + - mockingly + - mortally + - mysteriously + - naturally + - nearly + - neatly + - nervously + - nicely + - noisily + - obediently + - obnoxiously + - oddly + - offensively + - optimistically + - overconfidently + - painfully + - partially + - patiently + - perfectly + - playfully + - politely + - poorly + - positively + - potentially + - powerfully + - promptly + - properly + - punctually + - quaintly + - queasily + - queerly + - questionably + - quickly + - quietly + - quirkily + - quizzically + - randomly + - rapidly + - rarely + - readily + - really + - reassuringly + - recklessly + - regularly + - reluctantly + - repeatedly + - reproachfully + - restfully + - righteously + - rightfully + - rigidly + - roughly + - rudely + - safely + - scarcely + - scarily + - searchingly + - sedately + - seemingly + - selfishly + - separately + - seriously + - shakily + - sharply + - sheepishly + - shrilly + - shyly + - silently + - sleepily + - slowly + - smoothly + - softly + - solemnly + - solidly + - speedily + - stealthily + - sternly + - strictly + - suddenly + - supposedly + - surprisingly + - suspiciously + - sweetly + - swiftly + - sympathetically + - tenderly + - tensely + - terribly + - thankfully + - thoroughly + - thoughtfully + - tightly + - tremendously + - triumphantly + - truthfully + - ultimately + - unabashedly + - unaccountably + - unbearably + - unethically + - unexpectedly + - unfortunately + - unimpressively + - unnaturally + - unnecessarily + - urgently + - usefully + - uselessly + - utterly + - vacantly + - vaguely + - vainly + - valiantly + - vastly + - verbally + - very + - viciously + - victoriously + - violently + - vivaciously + - voluntarily + - warmly + - weakly + - wearily + - wetly + - wholly + - wildly + - willfully + - wisely + - woefully + - wonderfully + - worriedly + - yawningly + - yearningly + - yieldingly + - youthfully + - zealously + - zestfully + - zestily diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Auto.yml b/vizro-ai/docs/.vale/styles/Microsoft/Auto.yml new file mode 100644 index 000000000..4da439353 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Auto.yml @@ -0,0 +1,11 @@ +extends: existence +message: "In general, don't hyphenate '%s'." +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/auto +ignorecase: true +level: error +action: + name: convert + params: + - simple +tokens: + - 'auto-\w+' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Avoid.yml b/vizro-ai/docs/.vale/styles/Microsoft/Avoid.yml new file mode 100644 index 000000000..dab7822c7 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Avoid.yml @@ -0,0 +1,14 @@ +extends: existence +message: "Don't use '%s'. See the A-Z word list for details." +# See the A-Z word list +link: https://docs.microsoft.com/en-us/style-guide +ignorecase: true +level: error +tokens: + - abortion + - and so on + - app(?:lication)?s? (?:developer|program) + - app(?:lication)? file + - backbone + - backend + - contiguous selection diff --git a/vizro-ai/docs/.vale/styles/Microsoft/ComplexWords.yml b/vizro-ai/docs/.vale/styles/Microsoft/ComplexWords.yml new file mode 100644 index 000000000..fca474831 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/ComplexWords.yml @@ -0,0 +1,117 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences +ignorecase: true +level: suggestion +action: + name: replace +swap: + "approximate(?:ly)?": about + abundance: plenty + accelerate: speed up + accentuate: stress + accompany: go with + accomplish: carry out|do + accorded: given + accordingly: so + accrue: add + accurate: right|exact + acquiesce: agree + acquire: get|buy + additional: more|extra + address: discuss + addressees: you + adjacent to: next to + adjustment: change + admissible: allowed + advantageous: helpful + advise: tell + aggregate: total + aircraft: plane + alleviate: ease + allocate: assign|divide + alternatively: or + alternatives: choices|options + ameliorate: improve + amend: change + anticipate: expect + apparent: clear|plain + ascertain: discover|find out + assistance: help + attain: meet + attempt: try + authorize: allow + belated: late + bestow: give + cease: stop|end + collaborate: work together + commence: begin + compensate: pay + comprise: form|include + concept: idea + concerning: about + confer: give|award + consequently: so + consolidate: merge + constitutes: forms + convene: meet + demonstrate: show|prove + depart: leave + designate: choose + desire: want|wish + determine: decide|find + detrimental: bad|harmful + disclose: share|tell + discontinue: stop + disseminate: send|give + eliminate: end + elucidate: explain + employ: use + enclosed: inside|included + encounter: meet + endeavor: try + enumerate: count + equitable: fair + equivalent: equal + exclusively: only + expedite: hurry + facilitate: ease + females: women + finalize: complete|finish + identical: same + incorrect: wrong + indication: sign + initiate: start|begin + itemized: listed + jeopardize: risk + liaise: work with|partner with + maintain: keep|support + methodology: method + modify: change + monitor: check|watch + multiple: many + necessitate: cause + notify: tell + numerous: many + objective: aim|goal + obligate: bind|compel + optimum: best|most + permit: let + portion: part + possess: own + previous: earlier + previously: before + prioritize: rank + procure: buy + provide: give|offer + purchase: buy + relocate: move + solicit: request + state-of-the-art: latest + subsequent: later|next + substantial: large + sufficient: enough + terminate: end + transmit: send + utilization: use + utilize: use diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Dashes.yml b/vizro-ai/docs/.vale/styles/Microsoft/Dashes.yml new file mode 100644 index 000000000..2894cf722 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Dashes.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Remove the spaces around '%s'." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/emes +ignorecase: true +nonword: true +level: error +action: + name: edit + params: + - remove + - ' ' +tokens: + - '[—–]\s|\s[—–]' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/DateFormat.yml b/vizro-ai/docs/.vale/styles/Microsoft/DateFormat.yml new file mode 100644 index 000000000..196531394 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/DateFormat.yml @@ -0,0 +1,8 @@ +extends: existence +message: Use 'July 31, 2016' format, not '%s'. +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/DateNumbers.yml b/vizro-ai/docs/.vale/styles/Microsoft/DateNumbers.yml new file mode 100644 index 000000000..14d46747c --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/DateNumbers.yml @@ -0,0 +1,40 @@ +extends: existence +message: "Don't use ordinal numbers for dates." +link: https://docs.microsoft.com/en-us/style-guide/numbers#numbers-in-dates +level: error +nonword: true +ignorecase: true +raw: + - \b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?)\b\s* +tokens: + - first + - second + - third + - fourth + - fifth + - sixth + - seventh + - eighth + - ninth + - tenth + - eleventh + - twelfth + - thirteenth + - fourteenth + - fifteenth + - sixteenth + - seventeenth + - eighteenth + - nineteenth + - twentieth + - twenty-first + - twenty-second + - twenty-third + - twenty-fourth + - twenty-fifth + - twenty-sixth + - twenty-seventh + - twenty-eighth + - twenty-ninth + - thirtieth + - thirty-first diff --git a/vizro-ai/docs/.vale/styles/Microsoft/DateOrder.yml b/vizro-ai/docs/.vale/styles/Microsoft/DateOrder.yml new file mode 100644 index 000000000..12d69ba51 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/DateOrder.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Always spell out the name of the month." +link: https://docs.microsoft.com/en-us/style-guide/numbers#numbers-in-dates +ignorecase: true +level: error +nonword: true +tokens: + - '\b\d{1,2}/\d{1,2}/(?:\d{4}|\d{2})\b' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/FirstPerson.yml b/vizro-ai/docs/.vale/styles/Microsoft/FirstPerson.yml new file mode 100644 index 000000000..77761af88 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/FirstPerson.yml @@ -0,0 +1,16 @@ +extends: existence +message: "Use first person (such as '%s') sparingly." +link: https://docs.microsoft.com/en-us/style-guide/grammar/person +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'd\b + - \bI'll\b + - \bI'm\b + - \bI've\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Foreign.yml b/vizro-ai/docs/.vale/styles/Microsoft/Foreign.yml new file mode 100644 index 000000000..0d3d6002a --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Foreign.yml @@ -0,0 +1,13 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)[\s,]': for example + '\b(?:ie|i\.e\.)[\s,]': that is + '\b(?:viz\.)[\s,]': namely + '\b(?:ergo)[\s,]': therefore diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Gender.yml b/vizro-ai/docs/.vale/styles/Microsoft/Gender.yml new file mode 100644 index 000000000..47c080247 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Gender.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Don't use '%s'." +link: https://github.com/MicrosoftDocs/microsoft-style-guide/blob/master/styleguide/grammar/nouns-pronouns.md#pronouns-and-gender +level: error +ignorecase: true +tokens: + - he/she + - s/he diff --git a/vizro-ai/docs/.vale/styles/Microsoft/GenderBias.yml b/vizro-ai/docs/.vale/styles/Microsoft/GenderBias.yml new file mode 100644 index 000000000..3d873aa31 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/GenderBias.yml @@ -0,0 +1,44 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +ignorecase: true +level: error +swap: + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + chair(?:m[ae]n|wom[ae]n): chair(s) + congress(?:m[ae]n|wom[ae]n): member(s) of congress + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + landlord: building manager + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind + manmade: manufactured + manpower: personnel + men and girls: men and women + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/vizro-ai/docs/.vale/styles/Microsoft/HeadingColons.yml b/vizro-ai/docs/.vale/styles/Microsoft/HeadingColons.yml new file mode 100644 index 000000000..7013c3914 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/HeadingColons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Capitalize '%s'." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/colons +nonword: true +level: error +scope: heading +tokens: + - ':\s[a-z]' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/HeadingPunctuation.yml b/vizro-ai/docs/.vale/styles/Microsoft/HeadingPunctuation.yml new file mode 100644 index 000000000..2454c7a6e --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/HeadingPunctuation.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't use end punctuation in headings." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - remove + - '.!' +tokens: + - '[a-z][.!](?:\s|$)' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Headings.yml b/vizro-ai/docs/.vale/styles/Microsoft/Headings.yml new file mode 100644 index 000000000..44b7ffed8 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Headings.yml @@ -0,0 +1,77 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: https://docs.microsoft.com/en-us/style-guide/capitalization +level: suggestion +scope: heading +match: $sentence +indicators: + - ':' +exceptions: + - Kedro + - Kedro-Viz + - Vizro + - Vizro-AI + - Jupyter + - Notebook + - Airflow + - Amazon + - Amazon Web Services + - Anaconda Navigator + - API + - AWS Step Functions + - AWS Systems Manager + - Azure + - Azure App Service + - Azure App Service Plan + - Azure Blob Storage + - Azure Event Hub + - CI/CD + - DataCatalog + - Data Catalog + - Data Manager + - DataFrame + - DataTable + - Dash + - Docker + - Docker Compose + - Docker Swarm + - Dockerfile + - FAQ + - GitHub + - GitHub Actions + - Google + - Google Analytics + - Google Cloud + - Google Cloud Functions + - GraphQL + - Hook + - Hooks + - IDs + - Jenkins + - JFrog + - JFrog Artifactory + - Jira + - Kafka + - Kubernetes + - Kubernetes Engine + - Kubernetes Pod + - Kubernetes Service + - Lambda + - Linux + - MySQL + - Notebook + - Pandas + - Plotly + - Pydantic + - Python + - QuantumBlack + - QuantumBlack Labs + - Red Hat + - Redis + - Slack + - Streamlit + - Ubuntu + - Unix + - URL + - URLs + - Vizro diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Hyphens.yml b/vizro-ai/docs/.vale/styles/Microsoft/Hyphens.yml new file mode 100644 index 000000000..90bbb5def --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Hyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/hyphens +level: warning +ignorecase: false +nonword: true +action: + name: edit + params: + - replace + - '-' + - ' ' +tokens: + - '\s[^\s-]+ly-' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Negative.yml b/vizro-ai/docs/.vale/styles/Microsoft/Negative.yml new file mode 100644 index 000000000..d6ff2f224 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Negative.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Form a negative number with an en dash, not a hyphen." +link: https://docs.microsoft.com/en-us/style-guide/numbers +nonword: true +level: error +action: + name: edit + params: + - replace + - '-' + - '–' +tokens: + - '\s-\d+\s' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Ordinal.yml b/vizro-ai/docs/.vale/styles/Microsoft/Ordinal.yml new file mode 100644 index 000000000..e3483e380 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Ordinal.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't add -ly to an ordinal number." +link: https://docs.microsoft.com/en-us/style-guide/numbers +level: error +action: + name: edit + params: + - trim + - ly +tokens: + - firstly + - secondly + - thirdly diff --git a/vizro-ai/docs/.vale/styles/Microsoft/OxfordComma.yml b/vizro-ai/docs/.vale/styles/Microsoft/OxfordComma.yml new file mode 100644 index 000000000..493b55c3c --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/OxfordComma.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/commas +scope: sentence +level: suggestion +nonword: true +tokens: + - '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Percentages.yml b/vizro-ai/docs/.vale/styles/Microsoft/Percentages.yml new file mode 100644 index 000000000..b68a7363f --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Percentages.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use a numeral plus the units." +link: https://docs.microsoft.com/en-us/style-guide/numbers +nonword: true +level: error +tokens: + - '\b[a-zA-z]+\spercent\b' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/RangeTime.yml b/vizro-ai/docs/.vale/styles/Microsoft/RangeTime.yml new file mode 100644 index 000000000..cdd4b3346 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/RangeTime.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Use 'to' instead of a dash in '%s'." +link: https://docs.microsoft.com/en-us/style-guide/numbers +nonword: true +level: error +action: + name: edit + params: + - replace + - '[-–]' + - 'to' +tokens: + - '\b(?:AM|PM)\s?[-–]\s?.+(?:AM|PM)\b' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Semicolon.yml b/vizro-ai/docs/.vale/styles/Microsoft/Semicolon.yml new file mode 100644 index 000000000..4d905467d --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Semicolon.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Try to simplify this sentence." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/semicolons +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/SentenceLength.yml b/vizro-ai/docs/.vale/styles/Microsoft/SentenceLength.yml new file mode 100644 index 000000000..8ed2e1c81 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/SentenceLength.yml @@ -0,0 +1,7 @@ +extends: occurrence +message: "Try to keep sentences short (< 40 words)." +scope: sentence +level: suggestion +max: 40 +token: \b(\w+)\b + diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Spacing.yml b/vizro-ai/docs/.vale/styles/Microsoft/Spacing.yml new file mode 100644 index 000000000..10ae8778a --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Spacing.yml @@ -0,0 +1,7 @@ +extends: existence +message: "'%s' should have one space." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods +level: error +nonword: true +tokens: + - '[a-z][.?!] {2,}[A-Z]' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Suspended.yml b/vizro-ai/docs/.vale/styles/Microsoft/Suspended.yml new file mode 100644 index 000000000..7282e9c9c --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Suspended.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use '%s' unless space is limited." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/hyphens +ignorecase: true +level: warning +tokens: + - '\w+- and \w+-' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Terms.yml b/vizro-ai/docs/.vale/styles/Microsoft/Terms.yml new file mode 100644 index 000000000..40e971115 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Terms.yml @@ -0,0 +1,49 @@ +extends: substitution +message: "Prefer '%s' over '%s'." +# term preference should be based on microsoft style guide, such as +link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/adapter +level: warning +ignorecase: true +action: + name: replace +swap: + '(?:agent|virtual assistant|intelligent personal assistant)': personal digital assistant + '(?:drive C:|drive C>|C: drive)': drive C + '(?:internet bot|web robot)s?': bot(s) + '(?:microsoft cloud|the cloud)': cloud + '(?:mobile|smart) ?phone': phone + '24/7': every day + 'audio(?:-| )book': audiobook + 'back(?:-| )light': backlight + 'chat ?bots?': chatbot(s) + adaptor: adapter + administrate: administer + afterwards: afterward + allow: enable + allows: enables + alphabetic: alphabetical + alphanumerical: alphanumeric + anti-aliasing: antialiasing + anti-malware: antimalware + anti-spyware: antispyware + anti-virus: antivirus + appendixes: appendices + artificial intelligence: AI + '(?:assembler|machine language)': assembly language + caap: CaaP + conversation-as-a-platform: conversation as a platform + eb: EB + gb: GB + gbps: Gbps + kb: KB + keypress: keystroke + mb: MB + pb: PB + tb: TB + zb: ZB + notebook: Notebook + python: Python + leverage: use + leverages: uses + utilize: use + utilizes: uses diff --git a/vizro-ai/docs/.vale/styles/Microsoft/URLFormat.yml b/vizro-ai/docs/.vale/styles/Microsoft/URLFormat.yml new file mode 100644 index 000000000..82e702f98 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/URLFormat.yml @@ -0,0 +1,10 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +ignorecase: true +level: error +action: + name: replace +swap: + URL for: URL of + an URL: a URL + diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Units.yml b/vizro-ai/docs/.vale/styles/Microsoft/Units.yml new file mode 100644 index 000000000..f062418ee --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Units.yml @@ -0,0 +1,16 @@ +extends: existence +message: "Don't spell out the number in '%s'." +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/units-of-measure-terms +level: error +raw: + - '[a-zA-Z]+\s' +tokens: + - '(?:centi|milli)?meters' + - '(?:kilo)?grams' + - '(?:kilo)?meters' + - '(?:mega)?pixels' + - cm + - inches + - lb + - miles + - pounds diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Vocab.yml b/vizro-ai/docs/.vale/styles/Microsoft/Vocab.yml new file mode 100644 index 000000000..e3870f526 --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Vocab.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't use '%s'!" +link: 'https://docs.microsoft.com/en-us/style-guide' +level: error +ignorecase: true +tokens: + - please + - simple + - kindly + - easily + - simply + - just + - straightforward diff --git a/vizro-ai/docs/.vale/styles/Microsoft/Wordiness.yml b/vizro-ai/docs/.vale/styles/Microsoft/Wordiness.yml new file mode 100644 index 000000000..22a4c932c --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/Wordiness.yml @@ -0,0 +1,122 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences +ignorecase: true +level: warning +action: + name: replace +swap: + (?:give|gave) rise to: lead to + (?:previous|prior) to: before + a (?:large)? majority of: most + a (?:large)? number of: many + a myriad of: myriad + adversely impact: hurt + all across: across + all of a sudden: suddenly + all of these: these + all of: all + all-time record: record + almost all: most + almost never: seldom + along the lines of: similar to + an adequate number of: enough + an appreciable number of: many + an estimated: about + any and all: all + are in agreement: agree + as a matter of fact: in fact + as a means of: to + as a result of: because of + as of yet: yet + as per: per + at a later date: later + at all times: always + at the present time: now + at this point in time: at this point + based in large part on: based on + based on the fact that: because + basic necessity: necessity + because of the fact that: because + came to a realization: realized + came to an abrupt end: ended abruptly + carry out an evaluation of: evaluate + close down: close + closed down: closed + complete stranger: stranger + completely separate: separate + concerning the matter of: regarding + conduct a review of: review + conduct an investigation: investigate + conduct experiments: experiment + continue on: continue + despite the fact that: although + disappear from sight: disappear + drag and drop: drag + drag-and-drop: drag + doomed to fail: doomed + due to the fact that: because + during the period of: during + during the time that: while + emergency situation: emergency + except when: unless + excessive number: too many + extend an invitation: invite + fall down: fall + fell down: fell + for the duration of: during + gather together: gather + has the ability to: can + has the capacity to: can + has the opportunity to: could + hold a meeting: meet + if this is not the case: if not + in a careful manner: carefully + in a thoughtful manner: thoughtfully + in a timely manner: timely + in an effort to: to + in between: between + in lieu of: instead of + in many cases: often + in most cases: usually + in order to: to + in some cases: sometimes + in spite of the fact that: although + in spite of: despite + in the (?:very)? near future: soon + in the event that: if + in the neighborhood of: roughly + in the vicinity of: close to + it would appear that: apparently + lift up: lift + made reference to: referred to + make reference to: refer to + mix together: mix + none at all: none + not in a position to: unable + not possible: impossible + of major importance: important + perform an assessment of: assess + pertaining to: about + place an order: order + plays a key role in: is essential to + present time: now + readily apparent: apparent + some of the: some + span across: span + subsequent to: after + successfully complete: complete + sufficient number (?:of)?: enough + take action: act + take into account: consider + the question as to whether: whether + there is no doubt but that: doubtless + this day and age: this age + this is a subject that: this subject + time (?:frame|period): time + under the provisions of: under + until such time as: until + used for fuel purposes: used for fuel + whether or not: whether + with regard to: regarding + with the exception of: except for diff --git a/vizro-ai/docs/.vale/styles/Microsoft/links.yml b/vizro-ai/docs/.vale/styles/Microsoft/links.yml new file mode 100644 index 000000000..94a54f92b --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/links.yml @@ -0,0 +1,23 @@ +extends: substitution +message: "Avoid vague text in links like '%s' unless you can pair it with more descriptive text." +ignorecase: true +scope: raw +nonword: true +level: error + +swap: +# For the word 'here' in Markdown and HTML links + '\[here\]\(.*?\)': 'here' + '\s*here\s*': 'here' + +# For the word 'this' in Markdown and HTML links + '\[this\]\(.*?\)': 'this' + '\s*this\s*': 'this' + +# For the word 'page' in Markdown and HTML links + '\[page\]\(.*?\)': 'page' + '\s*page\s*': 'page' + +# For the phrase 'this page' in Markdown and HTML links + '\[this page\]\(.*?\)': 'this page' + '\s*this page\s*': 'this page' diff --git a/vizro-ai/docs/.vale/styles/Microsoft/meta.json b/vizro-ai/docs/.vale/styles/Microsoft/meta.json new file mode 100644 index 000000000..297719bbb --- /dev/null +++ b/vizro-ai/docs/.vale/styles/Microsoft/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Microsoft/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/vizro-core/changelog.d/20240325_170005_jo_stichbury_add_vale_styles.md b/vizro-core/changelog.d/20240325_170005_jo_stichbury_add_vale_styles.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-core/changelog.d/20240325_170005_jo_stichbury_add_vale_styles.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/docs/.vale/.vale.ini b/vizro-core/docs/.vale/.vale.ini new file mode 100644 index 000000000..d286c96b5 --- /dev/null +++ b/vizro-core/docs/.vale/.vale.ini @@ -0,0 +1,8 @@ +StylesPath = styles + +MinAlertLevel = suggestion + + +[*.md] +BasedOnStyles = Vale, Microsoft +Vale.Spelling = NO diff --git a/vizro-core/docs/.vale/styles/Microsoft/AMPM.yml b/vizro-core/docs/.vale/styles/Microsoft/AMPM.yml new file mode 100644 index 000000000..8b9fed162 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: Use 'AM' or 'PM' (preceded by a space). +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Accessibility.yml b/vizro-core/docs/.vale/styles/Microsoft/Accessibility.yml new file mode 100644 index 000000000..05bf92739 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Accessibility.yml @@ -0,0 +1,25 @@ +extends: existence +message: "Don't use language (such as '%s') that defines people by their disability." +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms +level: suggestion +ignorecase: true +tokens: + - a victim of + - able-bodied + - affected by + - an epileptic + - crippled + - disabled + - dumb + - handicapped + - handicaps + - healthy + - lame + - maimed + - missing a limb + - mute + - normal + - sight-impaired + - stricken with + - suffers from + - vision-impaired diff --git a/vizro-core/docs/.vale/styles/Microsoft/Acronyms.yml b/vizro-core/docs/.vale/styles/Microsoft/Acronyms.yml new file mode 100644 index 000000000..fe2fd9214 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Acronyms.yml @@ -0,0 +1,68 @@ +extends: conditional +message: "'%s' has no definition." +link: https://docs.microsoft.com/en-us/style-guide/acronyms +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - AI + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GDP + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - LLM + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - Vizro-AI + - XML + - XSS + - YAML + - ZIP diff --git a/vizro-core/docs/.vale/styles/Microsoft/Adverbs.yml b/vizro-core/docs/.vale/styles/Microsoft/Adverbs.yml new file mode 100644 index 000000000..07d98d83e --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Adverbs.yml @@ -0,0 +1,270 @@ +extends: existence +message: "Consider removing '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences +ignorecase: true +level: warning +action: + name: remove +tokens: + - abnormally + - absentmindedly + - accidentally + - adventurously + - anxiously + - arrogantly + - awkwardly + - bashfully + - beautifully + - bitterly + - bleakly + - blindly + - blissfully + - boastfully + - boldly + - bravely + - briefly + - brightly + - briskly + - broadly + - busily + - calmly + - carefully + - carelessly + - cautiously + - cheerfully + - cleverly + - closely + - coaxingly + - colorfully + - continually + - coolly + - courageously + - crossly + - cruelly + - curiously + - daintily + - dearly + - deceivingly + - deeply + - defiantly + - deliberately + - delightfully + - diligently + - dimly + - doubtfully + - dreamily + - easily + - elegantly + - energetically + - enormously + - enthusiastically + - excitedly + - extremely + - fairly + - faithfully + - famously + - ferociously + - fervently + - fiercely + - fondly + - foolishly + - fortunately + - frankly + - frantically + - freely + - frenetically + - frightfully + - furiously + - generally + - generously + - gently + - gladly + - gleefully + - gracefully + - gratefully + - greatly + - greedily + - happily + - hastily + - healthily + - heavily + - helplessly + - honestly + - hopelessly + - hungrily + - innocently + - inquisitively + - intensely + - intently + - interestingly + - inwardly + - irritably + - jaggedly + - jealously + - jovially + - joyfully + - joyously + - jubilantly + - judgmentally + - justly + - keenly + - kiddingly + - kindheartedly + - knavishly + - knowingly + - knowledgeably + - lazily + - lightly + - limply + - lively + - loftily + - longingly + - loosely + - loudly + - lovingly + - loyally + - madly + - majestically + - meaningfully + - mechanically + - merrily + - miserably + - mockingly + - mortally + - mysteriously + - naturally + - nearly + - neatly + - nervously + - nicely + - noisily + - obediently + - obnoxiously + - oddly + - offensively + - optimistically + - overconfidently + - painfully + - partially + - patiently + - perfectly + - playfully + - politely + - poorly + - positively + - potentially + - powerfully + - promptly + - properly + - punctually + - quaintly + - queasily + - queerly + - questionably + - quickly + - quietly + - quirkily + - quizzically + - randomly + - rapidly + - rarely + - readily + - really + - reassuringly + - recklessly + - regularly + - reluctantly + - repeatedly + - reproachfully + - restfully + - righteously + - rightfully + - rigidly + - roughly + - rudely + - safely + - scarcely + - scarily + - searchingly + - sedately + - seemingly + - selfishly + - separately + - seriously + - shakily + - sharply + - sheepishly + - shrilly + - shyly + - silently + - sleepily + - slowly + - smoothly + - softly + - solemnly + - solidly + - speedily + - stealthily + - sternly + - strictly + - suddenly + - supposedly + - surprisingly + - suspiciously + - sweetly + - swiftly + - sympathetically + - tenderly + - tensely + - terribly + - thankfully + - thoroughly + - thoughtfully + - tightly + - tremendously + - triumphantly + - truthfully + - ultimately + - unabashedly + - unaccountably + - unbearably + - unethically + - unexpectedly + - unfortunately + - unimpressively + - unnaturally + - unnecessarily + - urgently + - usefully + - uselessly + - utterly + - vacantly + - vaguely + - vainly + - valiantly + - vastly + - verbally + - very + - viciously + - victoriously + - violently + - vivaciously + - voluntarily + - warmly + - weakly + - wearily + - wetly + - wholly + - wildly + - willfully + - wisely + - woefully + - wonderfully + - worriedly + - yawningly + - yearningly + - yieldingly + - youthfully + - zealously + - zestfully + - zestily diff --git a/vizro-core/docs/.vale/styles/Microsoft/Auto.yml b/vizro-core/docs/.vale/styles/Microsoft/Auto.yml new file mode 100644 index 000000000..4da439353 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Auto.yml @@ -0,0 +1,11 @@ +extends: existence +message: "In general, don't hyphenate '%s'." +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/auto +ignorecase: true +level: error +action: + name: convert + params: + - simple +tokens: + - 'auto-\w+' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Avoid.yml b/vizro-core/docs/.vale/styles/Microsoft/Avoid.yml new file mode 100644 index 000000000..dab7822c7 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Avoid.yml @@ -0,0 +1,14 @@ +extends: existence +message: "Don't use '%s'. See the A-Z word list for details." +# See the A-Z word list +link: https://docs.microsoft.com/en-us/style-guide +ignorecase: true +level: error +tokens: + - abortion + - and so on + - app(?:lication)?s? (?:developer|program) + - app(?:lication)? file + - backbone + - backend + - contiguous selection diff --git a/vizro-core/docs/.vale/styles/Microsoft/ComplexWords.yml b/vizro-core/docs/.vale/styles/Microsoft/ComplexWords.yml new file mode 100644 index 000000000..fca474831 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/ComplexWords.yml @@ -0,0 +1,117 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences +ignorecase: true +level: suggestion +action: + name: replace +swap: + "approximate(?:ly)?": about + abundance: plenty + accelerate: speed up + accentuate: stress + accompany: go with + accomplish: carry out|do + accorded: given + accordingly: so + accrue: add + accurate: right|exact + acquiesce: agree + acquire: get|buy + additional: more|extra + address: discuss + addressees: you + adjacent to: next to + adjustment: change + admissible: allowed + advantageous: helpful + advise: tell + aggregate: total + aircraft: plane + alleviate: ease + allocate: assign|divide + alternatively: or + alternatives: choices|options + ameliorate: improve + amend: change + anticipate: expect + apparent: clear|plain + ascertain: discover|find out + assistance: help + attain: meet + attempt: try + authorize: allow + belated: late + bestow: give + cease: stop|end + collaborate: work together + commence: begin + compensate: pay + comprise: form|include + concept: idea + concerning: about + confer: give|award + consequently: so + consolidate: merge + constitutes: forms + convene: meet + demonstrate: show|prove + depart: leave + designate: choose + desire: want|wish + determine: decide|find + detrimental: bad|harmful + disclose: share|tell + discontinue: stop + disseminate: send|give + eliminate: end + elucidate: explain + employ: use + enclosed: inside|included + encounter: meet + endeavor: try + enumerate: count + equitable: fair + equivalent: equal + exclusively: only + expedite: hurry + facilitate: ease + females: women + finalize: complete|finish + identical: same + incorrect: wrong + indication: sign + initiate: start|begin + itemized: listed + jeopardize: risk + liaise: work with|partner with + maintain: keep|support + methodology: method + modify: change + monitor: check|watch + multiple: many + necessitate: cause + notify: tell + numerous: many + objective: aim|goal + obligate: bind|compel + optimum: best|most + permit: let + portion: part + possess: own + previous: earlier + previously: before + prioritize: rank + procure: buy + provide: give|offer + purchase: buy + relocate: move + solicit: request + state-of-the-art: latest + subsequent: later|next + substantial: large + sufficient: enough + terminate: end + transmit: send + utilization: use + utilize: use diff --git a/vizro-core/docs/.vale/styles/Microsoft/Dashes.yml b/vizro-core/docs/.vale/styles/Microsoft/Dashes.yml new file mode 100644 index 000000000..2894cf722 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Dashes.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Remove the spaces around '%s'." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/emes +ignorecase: true +nonword: true +level: error +action: + name: edit + params: + - remove + - ' ' +tokens: + - '[—–]\s|\s[—–]' diff --git a/vizro-core/docs/.vale/styles/Microsoft/DateFormat.yml b/vizro-core/docs/.vale/styles/Microsoft/DateFormat.yml new file mode 100644 index 000000000..196531394 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/DateFormat.yml @@ -0,0 +1,8 @@ +extends: existence +message: Use 'July 31, 2016' format, not '%s'. +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/vizro-core/docs/.vale/styles/Microsoft/DateNumbers.yml b/vizro-core/docs/.vale/styles/Microsoft/DateNumbers.yml new file mode 100644 index 000000000..14d46747c --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/DateNumbers.yml @@ -0,0 +1,40 @@ +extends: existence +message: "Don't use ordinal numbers for dates." +link: https://docs.microsoft.com/en-us/style-guide/numbers#numbers-in-dates +level: error +nonword: true +ignorecase: true +raw: + - \b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?)\b\s* +tokens: + - first + - second + - third + - fourth + - fifth + - sixth + - seventh + - eighth + - ninth + - tenth + - eleventh + - twelfth + - thirteenth + - fourteenth + - fifteenth + - sixteenth + - seventeenth + - eighteenth + - nineteenth + - twentieth + - twenty-first + - twenty-second + - twenty-third + - twenty-fourth + - twenty-fifth + - twenty-sixth + - twenty-seventh + - twenty-eighth + - twenty-ninth + - thirtieth + - thirty-first diff --git a/vizro-core/docs/.vale/styles/Microsoft/DateOrder.yml b/vizro-core/docs/.vale/styles/Microsoft/DateOrder.yml new file mode 100644 index 000000000..12d69ba51 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/DateOrder.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Always spell out the name of the month." +link: https://docs.microsoft.com/en-us/style-guide/numbers#numbers-in-dates +ignorecase: true +level: error +nonword: true +tokens: + - '\b\d{1,2}/\d{1,2}/(?:\d{4}|\d{2})\b' diff --git a/vizro-core/docs/.vale/styles/Microsoft/FirstPerson.yml b/vizro-core/docs/.vale/styles/Microsoft/FirstPerson.yml new file mode 100644 index 000000000..77761af88 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/FirstPerson.yml @@ -0,0 +1,16 @@ +extends: existence +message: "Use first person (such as '%s') sparingly." +link: https://docs.microsoft.com/en-us/style-guide/grammar/person +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'd\b + - \bI'll\b + - \bI'm\b + - \bI've\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/vizro-core/docs/.vale/styles/Microsoft/Foreign.yml b/vizro-core/docs/.vale/styles/Microsoft/Foreign.yml new file mode 100644 index 000000000..0d3d6002a --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Foreign.yml @@ -0,0 +1,13 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)[\s,]': for example + '\b(?:ie|i\.e\.)[\s,]': that is + '\b(?:viz\.)[\s,]': namely + '\b(?:ergo)[\s,]': therefore diff --git a/vizro-core/docs/.vale/styles/Microsoft/Gender.yml b/vizro-core/docs/.vale/styles/Microsoft/Gender.yml new file mode 100644 index 000000000..47c080247 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Gender.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Don't use '%s'." +link: https://github.com/MicrosoftDocs/microsoft-style-guide/blob/master/styleguide/grammar/nouns-pronouns.md#pronouns-and-gender +level: error +ignorecase: true +tokens: + - he/she + - s/he diff --git a/vizro-core/docs/.vale/styles/Microsoft/GenderBias.yml b/vizro-core/docs/.vale/styles/Microsoft/GenderBias.yml new file mode 100644 index 000000000..3d873aa31 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/GenderBias.yml @@ -0,0 +1,44 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +ignorecase: true +level: error +swap: + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + chair(?:m[ae]n|wom[ae]n): chair(s) + congress(?:m[ae]n|wom[ae]n): member(s) of congress + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + landlord: building manager + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind + manmade: manufactured + manpower: personnel + men and girls: men and women + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/vizro-core/docs/.vale/styles/Microsoft/HeadingColons.yml b/vizro-core/docs/.vale/styles/Microsoft/HeadingColons.yml new file mode 100644 index 000000000..7013c3914 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/HeadingColons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Capitalize '%s'." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/colons +nonword: true +level: error +scope: heading +tokens: + - ':\s[a-z]' diff --git a/vizro-core/docs/.vale/styles/Microsoft/HeadingPunctuation.yml b/vizro-core/docs/.vale/styles/Microsoft/HeadingPunctuation.yml new file mode 100644 index 000000000..2454c7a6e --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/HeadingPunctuation.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't use end punctuation in headings." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - remove + - '.!' +tokens: + - '[a-z][.!](?:\s|$)' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Headings.yml b/vizro-core/docs/.vale/styles/Microsoft/Headings.yml new file mode 100644 index 000000000..44b7ffed8 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Headings.yml @@ -0,0 +1,77 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: https://docs.microsoft.com/en-us/style-guide/capitalization +level: suggestion +scope: heading +match: $sentence +indicators: + - ':' +exceptions: + - Kedro + - Kedro-Viz + - Vizro + - Vizro-AI + - Jupyter + - Notebook + - Airflow + - Amazon + - Amazon Web Services + - Anaconda Navigator + - API + - AWS Step Functions + - AWS Systems Manager + - Azure + - Azure App Service + - Azure App Service Plan + - Azure Blob Storage + - Azure Event Hub + - CI/CD + - DataCatalog + - Data Catalog + - Data Manager + - DataFrame + - DataTable + - Dash + - Docker + - Docker Compose + - Docker Swarm + - Dockerfile + - FAQ + - GitHub + - GitHub Actions + - Google + - Google Analytics + - Google Cloud + - Google Cloud Functions + - GraphQL + - Hook + - Hooks + - IDs + - Jenkins + - JFrog + - JFrog Artifactory + - Jira + - Kafka + - Kubernetes + - Kubernetes Engine + - Kubernetes Pod + - Kubernetes Service + - Lambda + - Linux + - MySQL + - Notebook + - Pandas + - Plotly + - Pydantic + - Python + - QuantumBlack + - QuantumBlack Labs + - Red Hat + - Redis + - Slack + - Streamlit + - Ubuntu + - Unix + - URL + - URLs + - Vizro diff --git a/vizro-core/docs/.vale/styles/Microsoft/Hyphens.yml b/vizro-core/docs/.vale/styles/Microsoft/Hyphens.yml new file mode 100644 index 000000000..90bbb5def --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Hyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/hyphens +level: warning +ignorecase: false +nonword: true +action: + name: edit + params: + - replace + - '-' + - ' ' +tokens: + - '\s[^\s-]+ly-' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Negative.yml b/vizro-core/docs/.vale/styles/Microsoft/Negative.yml new file mode 100644 index 000000000..d6ff2f224 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Negative.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Form a negative number with an en dash, not a hyphen." +link: https://docs.microsoft.com/en-us/style-guide/numbers +nonword: true +level: error +action: + name: edit + params: + - replace + - '-' + - '–' +tokens: + - '\s-\d+\s' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Ordinal.yml b/vizro-core/docs/.vale/styles/Microsoft/Ordinal.yml new file mode 100644 index 000000000..e3483e380 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Ordinal.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't add -ly to an ordinal number." +link: https://docs.microsoft.com/en-us/style-guide/numbers +level: error +action: + name: edit + params: + - trim + - ly +tokens: + - firstly + - secondly + - thirdly diff --git a/vizro-core/docs/.vale/styles/Microsoft/OxfordComma.yml b/vizro-core/docs/.vale/styles/Microsoft/OxfordComma.yml new file mode 100644 index 000000000..493b55c3c --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/OxfordComma.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/commas +scope: sentence +level: suggestion +nonword: true +tokens: + - '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Percentages.yml b/vizro-core/docs/.vale/styles/Microsoft/Percentages.yml new file mode 100644 index 000000000..b68a7363f --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Percentages.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use a numeral plus the units." +link: https://docs.microsoft.com/en-us/style-guide/numbers +nonword: true +level: error +tokens: + - '\b[a-zA-z]+\spercent\b' diff --git a/vizro-core/docs/.vale/styles/Microsoft/RangeTime.yml b/vizro-core/docs/.vale/styles/Microsoft/RangeTime.yml new file mode 100644 index 000000000..cdd4b3346 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/RangeTime.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Use 'to' instead of a dash in '%s'." +link: https://docs.microsoft.com/en-us/style-guide/numbers +nonword: true +level: error +action: + name: edit + params: + - replace + - '[-–]' + - 'to' +tokens: + - '\b(?:AM|PM)\s?[-–]\s?.+(?:AM|PM)\b' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Semicolon.yml b/vizro-core/docs/.vale/styles/Microsoft/Semicolon.yml new file mode 100644 index 000000000..4d905467d --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Semicolon.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Try to simplify this sentence." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/semicolons +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/vizro-core/docs/.vale/styles/Microsoft/SentenceLength.yml b/vizro-core/docs/.vale/styles/Microsoft/SentenceLength.yml new file mode 100644 index 000000000..8ed2e1c81 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/SentenceLength.yml @@ -0,0 +1,7 @@ +extends: occurrence +message: "Try to keep sentences short (< 40 words)." +scope: sentence +level: suggestion +max: 40 +token: \b(\w+)\b + diff --git a/vizro-core/docs/.vale/styles/Microsoft/Spacing.yml b/vizro-core/docs/.vale/styles/Microsoft/Spacing.yml new file mode 100644 index 000000000..10ae8778a --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Spacing.yml @@ -0,0 +1,7 @@ +extends: existence +message: "'%s' should have one space." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods +level: error +nonword: true +tokens: + - '[a-z][.?!] {2,}[A-Z]' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Suspended.yml b/vizro-core/docs/.vale/styles/Microsoft/Suspended.yml new file mode 100644 index 000000000..7282e9c9c --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Suspended.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use '%s' unless space is limited." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/hyphens +ignorecase: true +level: warning +tokens: + - '\w+- and \w+-' diff --git a/vizro-core/docs/.vale/styles/Microsoft/Terms.yml b/vizro-core/docs/.vale/styles/Microsoft/Terms.yml new file mode 100644 index 000000000..40e971115 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Terms.yml @@ -0,0 +1,49 @@ +extends: substitution +message: "Prefer '%s' over '%s'." +# term preference should be based on microsoft style guide, such as +link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/adapter +level: warning +ignorecase: true +action: + name: replace +swap: + '(?:agent|virtual assistant|intelligent personal assistant)': personal digital assistant + '(?:drive C:|drive C>|C: drive)': drive C + '(?:internet bot|web robot)s?': bot(s) + '(?:microsoft cloud|the cloud)': cloud + '(?:mobile|smart) ?phone': phone + '24/7': every day + 'audio(?:-| )book': audiobook + 'back(?:-| )light': backlight + 'chat ?bots?': chatbot(s) + adaptor: adapter + administrate: administer + afterwards: afterward + allow: enable + allows: enables + alphabetic: alphabetical + alphanumerical: alphanumeric + anti-aliasing: antialiasing + anti-malware: antimalware + anti-spyware: antispyware + anti-virus: antivirus + appendixes: appendices + artificial intelligence: AI + '(?:assembler|machine language)': assembly language + caap: CaaP + conversation-as-a-platform: conversation as a platform + eb: EB + gb: GB + gbps: Gbps + kb: KB + keypress: keystroke + mb: MB + pb: PB + tb: TB + zb: ZB + notebook: Notebook + python: Python + leverage: use + leverages: uses + utilize: use + utilizes: uses diff --git a/vizro-core/docs/.vale/styles/Microsoft/URLFormat.yml b/vizro-core/docs/.vale/styles/Microsoft/URLFormat.yml new file mode 100644 index 000000000..82e702f98 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/URLFormat.yml @@ -0,0 +1,10 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +ignorecase: true +level: error +action: + name: replace +swap: + URL for: URL of + an URL: a URL + diff --git a/vizro-core/docs/.vale/styles/Microsoft/Units.yml b/vizro-core/docs/.vale/styles/Microsoft/Units.yml new file mode 100644 index 000000000..f062418ee --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Units.yml @@ -0,0 +1,16 @@ +extends: existence +message: "Don't spell out the number in '%s'." +link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/units-of-measure-terms +level: error +raw: + - '[a-zA-Z]+\s' +tokens: + - '(?:centi|milli)?meters' + - '(?:kilo)?grams' + - '(?:kilo)?meters' + - '(?:mega)?pixels' + - cm + - inches + - lb + - miles + - pounds diff --git a/vizro-core/docs/.vale/styles/Microsoft/Vocab.yml b/vizro-core/docs/.vale/styles/Microsoft/Vocab.yml new file mode 100644 index 000000000..e3870f526 --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Vocab.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't use '%s'!" +link: 'https://docs.microsoft.com/en-us/style-guide' +level: error +ignorecase: true +tokens: + - please + - simple + - kindly + - easily + - simply + - just + - straightforward diff --git a/vizro-core/docs/.vale/styles/Microsoft/Wordiness.yml b/vizro-core/docs/.vale/styles/Microsoft/Wordiness.yml new file mode 100644 index 000000000..22a4c932c --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/Wordiness.yml @@ -0,0 +1,122 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences +ignorecase: true +level: warning +action: + name: replace +swap: + (?:give|gave) rise to: lead to + (?:previous|prior) to: before + a (?:large)? majority of: most + a (?:large)? number of: many + a myriad of: myriad + adversely impact: hurt + all across: across + all of a sudden: suddenly + all of these: these + all of: all + all-time record: record + almost all: most + almost never: seldom + along the lines of: similar to + an adequate number of: enough + an appreciable number of: many + an estimated: about + any and all: all + are in agreement: agree + as a matter of fact: in fact + as a means of: to + as a result of: because of + as of yet: yet + as per: per + at a later date: later + at all times: always + at the present time: now + at this point in time: at this point + based in large part on: based on + based on the fact that: because + basic necessity: necessity + because of the fact that: because + came to a realization: realized + came to an abrupt end: ended abruptly + carry out an evaluation of: evaluate + close down: close + closed down: closed + complete stranger: stranger + completely separate: separate + concerning the matter of: regarding + conduct a review of: review + conduct an investigation: investigate + conduct experiments: experiment + continue on: continue + despite the fact that: although + disappear from sight: disappear + drag and drop: drag + drag-and-drop: drag + doomed to fail: doomed + due to the fact that: because + during the period of: during + during the time that: while + emergency situation: emergency + except when: unless + excessive number: too many + extend an invitation: invite + fall down: fall + fell down: fell + for the duration of: during + gather together: gather + has the ability to: can + has the capacity to: can + has the opportunity to: could + hold a meeting: meet + if this is not the case: if not + in a careful manner: carefully + in a thoughtful manner: thoughtfully + in a timely manner: timely + in an effort to: to + in between: between + in lieu of: instead of + in many cases: often + in most cases: usually + in order to: to + in some cases: sometimes + in spite of the fact that: although + in spite of: despite + in the (?:very)? near future: soon + in the event that: if + in the neighborhood of: roughly + in the vicinity of: close to + it would appear that: apparently + lift up: lift + made reference to: referred to + make reference to: refer to + mix together: mix + none at all: none + not in a position to: unable + not possible: impossible + of major importance: important + perform an assessment of: assess + pertaining to: about + place an order: order + plays a key role in: is essential to + present time: now + readily apparent: apparent + some of the: some + span across: span + subsequent to: after + successfully complete: complete + sufficient number (?:of)?: enough + take action: act + take into account: consider + the question as to whether: whether + there is no doubt but that: doubtless + this day and age: this age + this is a subject that: this subject + time (?:frame|period): time + under the provisions of: under + until such time as: until + used for fuel purposes: used for fuel + whether or not: whether + with regard to: regarding + with the exception of: except for diff --git a/vizro-core/docs/.vale/styles/Microsoft/links.yml b/vizro-core/docs/.vale/styles/Microsoft/links.yml new file mode 100644 index 000000000..94a54f92b --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/links.yml @@ -0,0 +1,23 @@ +extends: substitution +message: "Avoid vague text in links like '%s' unless you can pair it with more descriptive text." +ignorecase: true +scope: raw +nonword: true +level: error + +swap: +# For the word 'here' in Markdown and HTML links + '\[here\]\(.*?\)': 'here' + '\s*here\s*': 'here' + +# For the word 'this' in Markdown and HTML links + '\[this\]\(.*?\)': 'this' + '\s*this\s*': 'this' + +# For the word 'page' in Markdown and HTML links + '\[page\]\(.*?\)': 'page' + '\s*page\s*': 'page' + +# For the phrase 'this page' in Markdown and HTML links + '\[this page\]\(.*?\)': 'this page' + '\s*this page\s*': 'this page' diff --git a/vizro-core/docs/.vale/styles/Microsoft/meta.json b/vizro-core/docs/.vale/styles/Microsoft/meta.json new file mode 100644 index 000000000..297719bbb --- /dev/null +++ b/vizro-core/docs/.vale/styles/Microsoft/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Microsoft/releases.atom", + "vale_version": ">=1.0.0" +}