Skip to content

Commit c3fbd91

Browse files
committed
Add spell checking to CircleCI via aspell.
Install aspell on CircleCI. Add a custom dictionary file. Spell check the Markdown files in the repository root. Add section on spell checking to the contributing guide. Update the CHANGELOG.
1 parent 735480b commit c3fbd91

File tree

5 files changed

+158
-2
lines changed

5 files changed

+158
-2
lines changed

.aspell.en.pws

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
personal_ws-1.1 en 134
2+
APIs
3+
ActionChain
4+
AppProvider
5+
CDN
6+
CHANGELOG
7+
CSRF
8+
CircleCI
9+
Clientside
10+
ComponentRegistry
11+
Crossfiltering
12+
DOM
13+
DataFrame
14+
DependencyException
15+
Dev
16+
Dropdown
17+
Homebrew
18+
IDEs
19+
InvalidIndexException
20+
InvalidResourceError
21+
JS
22+
JSON
23+
KeyError
24+
LGTM
25+
MacOS
26+
MacPorts
27+
Mapbox
28+
MutableMapping
29+
Plotly
30+
Plotly's
31+
Plotlyers
32+
PreventUpdate
33+
PropTypes
34+
PyPI
35+
README
36+
Redux
37+
Renderer
38+
ResourceException
39+
Submodules
40+
TreeContainer
41+
UI
42+
WebDriver
43+
abc
44+
analytics
45+
api
46+
arg
47+
args
48+
aspell
49+
async
50+
asyncDecorator
51+
auth
52+
backend
53+
backends
54+
cd
55+
cheatsheet
56+
chris
57+
cli
58+
clientside
59+
compat
60+
config
61+
configs
62+
coord
63+
css
64+
customizable
65+
cwd
66+
dashR
67+
dashr
68+
dcc
69+
defaultdict
70+
dev
71+
devtools
72+
docgen
73+
docstring
74+
docstrings
75+
dom
76+
dropdown
77+
dropdowns
78+
elif
79+
endline
80+
environ
81+
etag
82+
favicon
83+
formatter
84+
frontend
85+
gunicorn
86+
hocho
87+
html
88+
http
89+
ie
90+
init
91+
javascript
92+
js
93+
json
94+
kwargs
95+
lang
96+
localhost
97+
ly
98+
md
99+
middleware
100+
montreal
101+
msec
102+
namespace
103+
namespaces
104+
npm
105+
pathname
106+
pathnames
107+
percy
108+
plotly
109+
polyfills
110+
py
111+
pylint
112+
pytest
113+
redux
114+
renderer
115+
repo
116+
repos
117+
repr
118+
scalability
119+
serializable
120+
setProps
121+
sexualized
122+
src
123+
supress
124+
tada
125+
tracebacks
126+
ui
127+
unittest
128+
updateProps
129+
url
130+
urls
131+
utf
132+
venv
133+
virtualenv
134+
walmart
135+
whatwg

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
- run:
3939
name: ️️🏗️ pip dev requirements
4040
command: |
41+
sudo apt update
42+
sudo apt install aspell
4143
sudo pip install --upgrade virtualenv --progress-bar off
4244
python -m venv venv || virtualenv venv && . venv/bin/activate
4345
pip install -e . --no-cache-dir -r requires-install.txt -r requires-dev.txt -r requires-testing.txt --progress-bar off
@@ -46,7 +48,7 @@ jobs:
4648
paths:
4749
- venv
4850
- run:
49-
name: 🌸 Python & JS Lint
51+
name: 🌸 Python & JS Lint, Check Spelling
5052
command: |
5153
. venv/bin/activate
5254
set -eo pipefail
@@ -56,6 +58,8 @@ jobs:
5658
pylint tests/unit tests/integration/devtools tests/integration/renderer tests/integration/dash_assets -d all -e C0410,C0411,C0412,C0413,W0109
5759
cd dash-renderer && npm ci
5860
npm run lint:test && npm run format:test
61+
cd ..
62+
cat *.md | aspell --mode=markdown --lang=en --encoding=utf-8 --personal=./.aspell.en.pws list | sort -u && exit 0
5963
- run:
6064
name: 🐍 Python Unit Tests
6165
command: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55
## Unreleased
66

77
### Added
8+
- [#1081](https://github.com/plotly/dash/pull/1081) Add spell checking for Markdown files to CircleCI via GNU Aspell.
89
- [#1073](https://github.com/plotly/dash/pull/1073) Two new functions to simplify usage handling URLs and pathnames: `app.get_relative_path` & `app.trim_relative_path`.
910
These functions are particularly useful for apps deployed on Dash Enterprise where the apps served under a URL prefix (the app name) which is unlike apps served on localhost:8050.
1011
- `app.get_relative_path` returns a path with the config setting `requests_pathname_prefix` prefixed. Use `app.get_relative_path` anywhere you would provide a relative pathname, like `dcc.Link(href=app.relative_path('/page-2'))` or even as an alternative to `app.get_asset_url` with e.g. `html.Img(src=app.get_relative_path('/assets/logo.png'))`.

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,22 @@ We use both `flake8` and `pylint` for basic linting check, please refer to the r
100100

101101
Note that we also start using [`black`](https://black.readthedocs.io/en/stable/) as formatter during the test code migration.
102102

103+
### Spell Checking
104+
105+
We use [GNU Aspell](http://aspell.net/) to check the spelling of the Markdown files in the repository root. GNU Aspell is a free and open source spell checker designed to eventually replace Ispell. It compiles for Unix-like operating systems and Windows. Refer to the relevant step in `.circleci/config.yml` to see the Aspell implementation.
106+
107+
Aspell can also be installed on MacOS via [Homebrew](https://formulae.brew.sh/formula/aspell) and with [MacPorts](https://www.macports.org/ports.php?by=library&substr=aspell) and includes a man page:
108+
109+
```
110+
man aspell
111+
```
112+
113+
We check spelling and print out a list of words not in our dictionary and we don't fail the build if new words are found:
114+
115+
```
116+
cat *.md | aspell --mode=markdown --lang=en --encoding=utf-8 --personal=./.aspell.en.pws list | sort -u && exit 0
117+
```
118+
103119
## Tests
104120

105121
We started migrating to [pytest](https://docs.pytest.org/en/latest/) from `unittest` as our test automation framework. You will see more testing enhancements in the near future.

requires-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ pylint==2.3.1;python_version=="3.7"
88
astroid==2.2.5;python_version=="3.7"
99
virtualenv;python_version=="2.7"
1010
fire
11-
coloredlogs
11+
coloredlogs

0 commit comments

Comments
 (0)