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

Add spell-checking that is run by CI #8

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
45 changes: 45 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: Apache-2.0

name: Spellcheck

on:
push:
branches:
- "main"
paths:
- '**.md'
- '.github/workflows/spellcheck.yml' # This workflow
pull_request:
branches:
- "main"
paths:
- '**.md'
- '.github/workflows/spellcheck.yml' # This workflow

env:
LC_ALL: en_US.UTF-8

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
spellcheck:
name: Spellcheck (en_US)
runs-on: ubuntu-latest
steps:
- name: "Harden Runner"
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: "Checkout"
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0

- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@dbd2f1da869c05ad874fffeb6fe1ed50cd1a6e98 # v0.36.0
259 changes: 259 additions & 0 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@

# make spellcheck-sort
# Please keep this file sorted:
# SPDX-License-Identifier: Apache-2.0
Aakanksha
aakankshaduggal
abhi
Abramson
Acknowledgements
Adminstrators
akashgit
al
aldopareja
alimaredia
Alina
alinaryan
Anh
anik
Anza
Approver
Approvers
AQuA
Arapahoe
ARB
arge
Asghar
Ashgar
backend
Bernardino
bjhargrave
Boelkins
bootable
bootc
Byars
Bzostek
caradelia
CDLA
cdoern
CHANGELOG
Chatbot
Choi
ckadner
CLI
CNCF
coc
CoCC's
codebase
codebases
compositional
Conala
Corbett
curation
cybette
danmcp
darrellreimer
datacenter
Dataset
dataset
datasets
dave
DCO
De
deployable
DeSaix
dev
DM
Doern
Duggal
Eder
Eggebrecht
EPEL
et
Fraknoi
Freeform
freeform
Frontend
frontend
Gair
gcc
Greenlaw
GSM
Haver
Helpsteer
HH
hickeyma
Hidaka
Hinrichs
Huben
ibm
ics
ilab
Illowsky
inglis
InstructLab
integrations
Jaideep
jaideepr
JamesKunstle
Janssen
jeremyeder
JJ
jjasghar
joesepi
Jolla
Jonick
judgement
juliadenham
Keene
kelbrown
khaledsulayman
Kickstart
kickstart
Kordas
Korol
Kruse
Kubernetes
Kunstle
Lenovo
LGTM
LGTMs
lhawthorn
lignment
LLM
LLM's
Lovett
luke
Lund
Lyryx
Mahbobi
Maintainership
maintainership
mairin
Máirín
Makefiles
Maredia
markstur
Marymount
Masaki
McElaney
md
Merlinite
mingxzhao
Miniforge
Mixtral
mmcelaney
MMLU
Moebs
mrutkows
mscherer
Multivariable
Musique
nathan
nerdalert
Neth
NOIRLab
noone
Norwood
NumGLUE
nvidia
OASST
obuzek
OCI
ODC
oindrillac
Oksana
Oleg
openbookQA
Oswego
ots
overfitting
Pfannestiel
PII
Podman
Prahl
pre
Precalculus
PRM
pyenv
PyPI
pypi
qa
quantized
Quinnipiac
Rao
README
Rebecca
Redbooks
redbooks
Repo
repo
resynthesizes
RHEL
RHLF
RHUI
Roadmap
Roush
runtime
russellb
Saftey
Sandhills
Sanny
Schlicker
Schneegurt
Seminario
Sepi
SETI
sexualized
shivchander
signoff
signoffs
Silkin
socio
soltysh
SPDX
Spelman
Spielman
spzala
Stanberry
Standup
subdirectory
Sudalairaj
supermajority
Tatlock
TBD
templated
Theopold
Thi
Tiemann
TODO
Toolbx
transactional
Triager
triagers
Triaging
UI
Urone
USC
userspace
Usings
Ventura
venv
Vickery
vishnoianil
VLLM
Volker
Vretta
Wakefield
Waskiewicz
weinberg
Wikimedia
wikimultihop
wordmarks
workstreams
xukai
YAML
yhwang
Zach
Zedalis
Zimmitti
28 changes: 28 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: Apache-2.0

matrix:
- name: markdown
aspell:
lang: en
d: en_US
camel-case: true
mode: markdown
sources:
- "**/*.md|!.tox/**|!training/**"
dictionary:
wordlists:
- .spellcheck-en-custom.txt
pipeline:
- pyspelling.filters.context:
context_visible_first: true
escapes: '\\[\\`~]'
delimiters:
# Ignore multiline content between fences (fences can have 3 or more back ticks)
# ```language
# content
# ```
- open: '(?s)^(?P<open> *`{3,}).*?$'
close: '^(?P=open)$'
# Ignore text between inline back ticks
- open: '(?P<open>`+)'
close: '(?P=open)'
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ update-training-dir: ## Update the contents of the training directory
$(CMD_PREFIX) rm -rf ai-lab-recipes
$(CMD_PREFIX) git add training

.PHONY: spellcheck
spellcheck:
$(CMD_PREFIX) python -m pyspelling --config .spellcheck.yml --spellchecker aspell

.PHONY: spellcheck-sort
spellcheck-sort: .spellcheck-en-custom.txt
$(CMD_PREFIX) sort -d -f -o $< $<

# Catch-all target to pass through any other target to the training directory
%:
$(CMD_PREFIX) make -C training $@
Loading