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: add spellchecker #20

Merged
merged 2 commits into from
Apr 29, 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
22 changes: 22 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: Apache-2.0

name: Spellcheck

on:
pull_request:
branches: [main]
paths:
- '**.md'

permissions:
contents: read

jobs:
spellcheck:
name: Spellcheck (en_US)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Spellcheck
uses: rojopolis/[email protected]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,6 @@ cython_debug/
# IDEs
.vscode/
.idea/

# Spelling
dictionary.dic
108 changes: 108 additions & 0 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# make spellcheck-sort
# Please keep this file sorted:
Abhishek
Akash
AMDGPU
arge
arXiv
backend
backends
Bhandwaldar
CLI
cli
Colab
compositional
Conda
Containerfile
cpp
cuBLAS
CUDA
curation
dataset
dev
ditaa
dr
Dropdown
env
Eval
Finetuning
GFX
GGUF
GiB
Gmail
gpu
hipBLAS
ilab
impactful
Inferencing
instructlab
ISA
JIT
Jupyter
KAGGLE
Kaggle
Kaggle's
Kai
Kubernetes
lignment
LLM
llms
LLVM
lora
Merlinite
Miniforge
Mixtral
MLX
mlx
NVidia
Nvidia
orchestrator
ots
Pareja
PEFT
PlantUML
Podman
pre
preprint
pyenv
PyPI
PyTorch
qlora
quantized
Quantizing
Radeon
RDNA
README
repo
ROCm
RTX
RX
Salawu
SDG
sexualized
SHA
Shivchander
Srivastava
subdirectory
Sudalairaj
Taj
tatsu
TBD
Tesla
th
th
tl
tox
Unforking
unquantized
upstreams
USM
venv
wikisql
WSL
xcode
XNACK
XT
XTX
Xu
YAML
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|!REVIEWERS.md|!build/**|!.tox/**"
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 @@ -2,6 +2,14 @@
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: spellcheck
spellcheck: .spellcheck.yml
pyspelling --config $<

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

#
# If you want to see the full commands, run:
# NOISY_BUILD=y make
Expand Down