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: Enable Spellcheck in dockbuild #21402

Closed
wants to merge 14 commits into from
Closed
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
4 changes: 4 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ if [ "$DOC" ]; then
echo ./make.py
./make.py

echo "Running spell check on documentation"
./make.py spellcheck

echo ########################
echo # Create and send docs #
echo ########################
Expand Down Expand Up @@ -69,6 +72,7 @@ if [ "$DOC" ]; then
pandas/core/reshape/reshape.py \
pandas/core/reshape/tile.py


fi

exit 0
6 changes: 6 additions & 0 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ def zip_html(self):

def spellcheck(self):
"""Spell check the documentation."""
try:
from scripts.announce import update_name_wordlist
update_name_wordlist()
except ImportError:
print("Unable to update name wordlist, run "
"scripts/announce.py to update the list.")
self._sphinx_build('spelling')
output_location = os.path.join('build', 'spelling', 'output.txt')
with open(output_location) as output:
Expand Down
10 changes: 6 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,17 @@
try:
import sphinxcontrib.spelling # noqa
except ImportError as err:
logger.warn(('sphinxcontrib.spelling failed to import with error "{}". '
'`spellcheck` command is not available.'.format(err)))
logger.warning(('sphinxcontrib.spelling failed to import with error "{}". '
'`spellcheck` command is not available.'.format(err)))
else:
extensions.append('sphinxcontrib.spelling')
spelling_ignore_pypi_package_names = True
spelling_word_list_filename = [
'spelling_wordlist.txt',
'names_wordlist.txt']

exclude_patterns = ['**.ipynb_checkpoints']

spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt']
spelling_ignore_pypi_package_names = True

with open("index.rst") as f:
index_rst_lines = f.readlines()
Expand Down
Loading