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

Create spellcheck.yml #92

Merged
merged 11 commits into from
Jul 20, 2021
128 changes: 128 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
argv
autobuild
backend
cfg
changelog
CLIs
codebase
codecov
codefactor
codeowner
CODEOWNERS
codeql
conda
config
copyleft
covasim
covsirphy
coveragerc
cpp
cron
csharp
csv
currentdir
deepcopy
deepsource
dirname
Django
docstring
docstrings
doi
epidemiologists
epispot
exe
explorables
figsize
Froese
gitbook
github
gitignore
gitlocalize
GLOBALS
GPLv
google
homepage
html
http
https
ICU
img
infecteds
institutefordiseasemodeling
ipynb
ipython
javascript
jpg
json
Jupyter
lgtm
linspace
lisphilar
localhost
matplotlib
metadata
mitmproxy
mkdir
mkdocs
mypy
nosetests
numpy
nums
params
pdoc
pepy
pipenv
Pipfile
plotly
plt
png
pragma
pycache
pyenv
pypa
pypi
pyplot
pytest
pyvenv
Quantalabs
readlines
README
repodir
resusceptibility
screenshots
SEIR
setuptools
sourced
Spyder
sqlite
src
stackplot
sudo
susceptibles
svg
sys
timerange
timespans
timestep
timesteps
toml
towardsdatascience
ubuntu
uncomment
url
urls
username
usr
vcs
venv
versionadded
vscode
Website
workflow
workflows
www
xml
yml
youtube
yscale
zenodo
25 changes: 25 additions & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ignore directories named `third_party`
(?:^|/)third_party/
# Ignore npm files
(?:^|/)package(?:-lock|)\.json$
# Ignore files named (yarn for Node.js) `yarn.lock`
(?:^|/)yarn\.lock$
# Ignore files or directories that case-insensitively have `LICENSE` somewhere in their path
(?:(?i)LICENSE)
# Ignore files ending in...
\.jpg$
\.png$
\.csv$
# Ignore Excel files (`.xsl` and `.xslx`)
\.xslx?$
# Ignore locales that aren't en / en_GB (roughly: keep en_US and drop everything else)
locales/(?!en)
locales/en_GB
# Ignore the action's configuration data
^\.github/actions/spelling/
# Ignore common configuration files
config
cache
.gitignore
# Project-specific files
bin/
17 changes: 17 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
abspath
bdist
borderaxespad
Cov
Covsir
cri
currentframe
elif
getfile
hos
len
ncol
Phy
sdist
SIHCR
SIHRD
SIRD
107 changes: 107 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# This file contains various spellcheck patterns for @check-spelling/check-spelling
# and is used in the spellcheck workflow. See ../../workflows/spellcheck.yml for more information.

# marker to ignore all code on line
^.*/\* # no-spell-check-line \*/.*$
# marker for ignoring a comment to the end of the line
// # no-spell-check.*$
# marker for ignoring all lines with disabled spellcheck
.*spellcheck: disable
quantum9Innovation marked this conversation as resolved.
Show resolved Hide resolved

# git index header
index [0-9a-z]{7,40}\.\.[0-9a-z]{7,40}

# data urls
(['"])data:.*?\g{-1}
quantum9Innovation marked this conversation as resolved.
Show resolved Hide resolved
data:[-a-zA-Z=;:/0-9+]*,\S*

# Any `http://` or `https://` URL
https?://.*.com
https?://.*.org
https?://.*.gov
https?://.*.html
https?://.*.net
https?://.*.png
https?://.*.jpg
https?://.*.php
https?://.*/
https?://*

# GitHub SHAs
\bapi.github\.com/repos/[^/]+/[^/]+/[^/]+/[0-9a-f]+\b
(?:\[[0-9a-f]+\]\(https:/|)/github\.com/[^/]+/[^/]+(?:/[^/]+/[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
\bgithub\.com/[^/]+/[^/]+[@#][0-9a-f]+\b
# githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
# gist github
/gist\.github\.com/[^/]+/[0-9a-f]+
# git.io
\bgit\.io/[0-9a-zA-Z]+
# GitHub JSON
"node_id": "[-a-zA-Z=;:/0-9+]*"
# Contributor
\[[^\]]+]\(?:https://github\.com/[^/]+\)

# bit.ly
\bbit\.ly/\w+

# gravatar
\bgravatar\.com/avatar/[0-9a-f]+

# medium
link\.medium\.com/[a-zA-Z0-9]+

# Slack
slack://[a-zA-Z0-9?&=]+
\bslack\.com/[-0-9a-zA-Z/_]*

# stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/questions/\d+/[a-z-]+

# URL escaped characters
\%[0-9A-F]{2}
# c99 hex digits (not the full format, just one I've seen)
0x[0-9a-fA-F](?:\.[0-9a-fA-F]*|)[pP]
# sha256
sha256:[0-9a-f]+
# sha-... -- uses a fancy capture
(['"]|")[0-9a-f]{40,}\g{-1}
# hex in url queries
=[0-9a-fA-F]+&
# PGP
\b(?:[0-9A-F]{4} ){9}[0-9A-F]{4}\b
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9a-fA-FgGrR_]{2,}(?:[uU]?[lL]{0,2}|u\d+)\b
# uuid:
[<({"'>][0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[<'"})>]

# Input to GitHub JSON
content: "[-a-zA-Z=;:/0-9+]*="

# python f-string https://www.python.org/dev/peps/pep-0498/
\bf'

# Regular expressions for (P|p)assword
\([A-Z]\|[a-z]\)[a-z]+

# JavaScript regular expressions
/.*/[gim]*\.test\(
\.replace\(/[^/]*/[gim]*\s*,

# the negative lookahead here is to allow catching 'templatesz' as a misspelling
# but to otherwise recognize a Windows path with \templates\foo.template or similar:
\\templates(?![a-z])
# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b

# Compiler flags
[\t >"`](?:-J|)-[DPWXY]
[\t "`]-[DPWXYLl]
# curl arguments
\b(?:\\n|)curl(?:\s+-[a-zA-Z]+)+
# set arguments
\bset\s+-[abefiuox]+\b
# tar arguments
\b(?:\\n|)tar(?:\s+-[a-zA-Z]+|\s[a-z]+)+
# macOS temp folders
/var/folders/\w\w/\w+/T/
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# 📚 https://git.io/JvXDl (spellcheck: disable)

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Worflow borrowed from covid19india/covid19india-react
# Workflow borrowed from covid19india/covid19india-react


on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Upload Nightly Python Package Release

on:
on:
workflow_dispatch:
inputs:
version:
description: 'Normalized Version Tag'
description: 'Normalized Version Tag'
required: true

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Upload Python Package Release

on:
on:
workflow_dispatch:
inputs:
version:
description: 'Normalized Version Tag'
description: 'Normalized Version Tag'
required: true

jobs:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Spell checking
on:
pull_request_target:
push:
issue_comment:
types: [created]

jobs:
spelling:
name: Spell checking
runs-on: ubuntu-latest
steps:
- name: checkout-merge
if: "contains(github.event_name, 'pull_request')"
uses: actions/checkout@v2
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge
- name: checkout
if: ${{ github.event_name == 'push' ||
(
contains(github.event.comment.body, '@check-spelling-bot apply')
) }}
uses: actions/checkout@v2
- uses: check-spelling/check-spelling@main
id: spelling
if: ${{ github.event_name != 'issue_comment' ||
(
contains(github.event.comment.body, '@check-spelling-bot apply')
) }}
with:
experimental_apply_changes_via_bot: 1

quantum9Innovation marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ before_install:
- python -m pip install --upgrade pip # Upgrade to latest version of pip

install:
- sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended cm-super # install LaTeX requirements for Travis CI
# install LaTeX requirements for Travis CI
- sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended cm-super # spellcheck: disable
- bash scripts/travis/build.sh

script:
Expand Down