diff --git a/.aspell.en.pws b/.aspell.en.pws new file mode 100644 index 0000000000..3de7138bf0 --- /dev/null +++ b/.aspell.en.pws @@ -0,0 +1,159 @@ +personal_ws-1.1 en 158 +ALLSMALLER +APIs +ActionChain +AppProvider +CDN +CHANGELOG +CSRF +CircleCI +Clientside +ComponentRegistry +Crossfiltering +DOM +DataFrame +DependencyException +Dev +Dropdown +ENV +GitHub +Homebrew +IDEs +InvalidIndexException +InvalidResourceError +JS +JSON +KeyError +LGTM +MacOS +MacPorts +Mapbox +MERCHANTABILITY +MutableMapping +NONINFRINGEMENT +Plotly +Plotly's +Plotlyers +PreventUpdate +PropTypes +PyPI +README +Redux +Renderer +ResourceException +Submodules +TODO +TreeContainer +UI +WebDriver +abc +analytics +api +arg +args +aspell +assignees +async +asyncDecorator +auth +backend +backends +bool +cbcx +cbwc +cd +cheatsheet +chris +cli +clientside +compat +config +configs +coord +css +customizable +cwd +dashR +dashr +dcc +defaultdict +dev +devtools +dicts +docgen +docstring +docstrings +dom +dropdown +dropdowns +eg +elif +endline +env +environ +etag +favicon +formatter +frontend +gunicorn +hocho +html +http +ie +iframe +init +iOS +javascript +js +json +kwargs +lang +lf +localhost +ly +md +middleware +montreal +msec +namespace +namespaces +npm +optionals +pathname +pathnames +pdb +percy +plotly +polyfills +proxied +py +pylint +pytest +pytest's +redux +renderer +repo +repos +repr +scalability +serializable +serverside +setProps +sexualized +src +subdirectory +sublicense +superset +supress +tada +tracebacks +ui +unittest +updateProps +url +urls +utf +venv +virtualenv +walmart +whatwg diff --git a/.circleci/config.yml b/.circleci/config.yml index ce118f8ebd..ca6b85e075 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,6 +40,8 @@ jobs: - run: name: ️️🏗️ pip dev requirements command: | + sudo apt update + sudo apt install aspell sudo pip install --upgrade virtualenv --progress-bar off python -m venv venv || virtualenv venv && . venv/bin/activate pip install -e . --no-cache-dir -r requires-install.txt -r requires-dev.txt -r requires-testing.txt --progress-bar off @@ -48,13 +50,14 @@ jobs: paths: - venv - run: - name: 🌸 Python & JS Lint + name: 🌸 Python & JS Lint, Check Markdown Spelling command: | . venv/bin/activate set -eo pipefail pip install -e . --progress-bar off && pip list | grep dash npm install --production && npm run initialize npm run lint + sh ./check-spelling.sh || exit 1 - run: name: 🐍 Python Unit Tests & ☕ JS Unit Tests command: | diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1a66a491bc..e6a0bed467 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,5 +12,5 @@ - [ ] I have added entry in the `CHANGELOG.md` - [ ] If this PR needs a follow-up in **dash docs**, **community thread**, I have mentioned the relevant URLS as follow - - [ ] this github [#PR number]() updates the dash docs - - [ ] here is the show and tell thread in plotly dash community + - [ ] this GitHub [#PR number]() updates the dash docs + - [ ] here is the show and tell thread in Plotly dash community diff --git a/CHANGELOG.md b/CHANGELOG.md index 0add67aaeb..04a909e98f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [1.13.4] - 2020-06-25 +## [Unreleased] +### Added +- [#1081](https://github.com/plotly/dash/pull/1081) Add spell checking for Markdown files to CircleCI via GNU Aspell. + +## [1.13.4] - 2020-06-25 ### Fixed - [#1310](https://github.com/plotly/dash/pull/1310) Fix a regression since 1.13.0 preventing more than one loading state from being shown at a time. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4370423efb..7dc7202ec7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,18 @@ Emojis make the commit messages :cherry_blossom:. If you have no idea about what We use `flake8`, `pylint`, and [`black`](https://black.readthedocs.io/en/stable/) for linting. please refer to the relevant steps in `.circleci/config.yml`. +### Spell Checking + +We use [GNU Aspell](http://aspell.net/) to check the spelling of the Markdown files. [GNU Aspell](https://en.wikipedia.org/wiki/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. + +[GNU Aspell](https://github.com/GNUAspell/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: + +``` +man aspell +``` + +We use a [shell script](https://en.wikipedia.org/wiki/Shell_script) to check the spelling of the Markdown files and print out a list of words not in our dictionary and fail the build if new words are found. + ## Tests Our tests use Google Chrome via Selenium. You will need to install [ChromeDriver](http://chromedriver.chromium.org/getting-started) matching the version of Chrome installed on your system. Here are some helpful tips for [Mac](https://www.kenst.com/2015/03/installing-chromedriver-on-mac-osx/) and [Windows](http://jonathansoma.com/lede/foundations-2018/classes/selenium/selenium-windows-install/). diff --git a/check-spelling.sh b/check-spelling.sh new file mode 100755 index 0000000000..15e5fa50a5 --- /dev/null +++ b/check-spelling.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +errors=0 +path="tests/spelling/" +mkdir -p $path +misspelled="$path"misspelled-words.txt +if [ -f $misspelled ] ; then + rm $misspelled +fi +for file in $(find . -name "*.md" -not -path "**/node_modules/*"); +do + echo "$file" >> "$path"misspelled-words-temp.txt + aspell list --lang=en --encoding=utf-8 --personal=./.aspell.en.pws < "$file" | sort -u >> "$path"misspelled-words-temp.txt + if [ "$(wc -l <"$path"misspelled-words-temp.txt)" -ge 2 ] + then + echo >> "$path"misspelled-words-temp.txt + cat "$path"misspelled-words-temp.txt + cat "$path"misspelled-words-temp.txt >> "$path"misspelled-words.txt + errors=1 + fi + :> "$path"misspelled-words-temp.txt +done +if [ -f "$path"misspelled-words-temp.txt ] ; then + rm "$path"misspelled-words-temp.txt +fi +if [ "$errors" -ge 1 ] +then + exit 1 +else + exit 0 +fi diff --git a/requires-dev.txt b/requires-dev.txt index e27402850d..52dc548893 100644 --- a/requires-dev.txt +++ b/requires-dev.txt @@ -10,4 +10,4 @@ astroid==2.2.5;python_version=="3.7" black==19.10b0;python_version>="3.0" virtualenv==20.0.10;python_version=="2.7" fire==0.2.1 -coloredlogs==14.0 \ No newline at end of file +coloredlogs==14.0