Skip to content

Commit

Permalink
DOC: Removing remaining spellcheck related stuff (deps, docs, code, w…
Browse files Browse the repository at this point in the history
…hatsnew) (#24299)
  • Loading branch information
datapythonista authored and jorisvandenbossche committed Dec 16, 2018
1 parent df3b045 commit 41681c8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 37 deletions.
18 changes: 3 additions & 15 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ def _sphinx_build(self, kind):
--------
>>> DocBuilder(num_jobs=4)._sphinx_build('html')
"""
if kind not in ('html', 'latex', 'spelling'):
raise ValueError('kind must be html, latex or '
'spelling, not {}'.format(kind))
if kind not in ('html', 'latex'):
raise ValueError('kind must be html or latex, '
'not {}'.format(kind))

self._run_os('sphinx-build',
'-j{}'.format(self.num_jobs),
Expand Down Expand Up @@ -313,18 +313,6 @@ def zip_html(self):
'-q',
*fnames)

def spellcheck(self):
"""Spell check the documentation."""
self._sphinx_build('spelling')
output_location = os.path.join('build', 'spelling', 'output.txt')
with open(output_location) as output:
lines = output.readlines()
if lines:
raise SyntaxError(
'Found misspelled words.'
' Check pandas/doc/build/spelling/output.txt'
' for more details.')


def main():
cmds = [method for method in dir(DocBuilder) if not method.startswith('_')]
Expand Down
19 changes: 0 additions & 19 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,25 +458,6 @@ the documentation are also built by Travis-CI. These docs are then hosted `here
<http://pandas-docs.github.io/pandas-docs-travis>`__, see also
the :ref:`Continuous Integration <contributing.ci>` section.

Spell checking documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When contributing to documentation to **pandas** it's good to check if your work
contains any spelling errors. Sphinx provides an easy way to spell check documentation
and docstrings.

Running the spell check is easy. Just navigate to your local ``pandas/doc/`` directory and run::

python make.py spellcheck

The spellcheck will take a few minutes to run (between 1 to 6 minutes). Sphinx will alert you
with warnings and misspelt words - these misspelt words will be added to a file called
``output.txt`` and you can find it on your local directory ``pandas/doc/build/spelling/``.

The Sphinx spelling extension uses an EN-US dictionary to correct words, what means that in
some cases you might need to add a word to this dictionary. You can do so by adding the word to
the bag-of-words file named ``spelling_wordlist.txt`` located in the folder ``pandas/doc/``.

.. _contributing.code:

Contributing to the code base
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.24.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ Performance Improvements
Documentation Changes
~~~~~~~~~~~~~~~~~~~~~

- Added sphinx spelling extension, updated documentation on how to use the spell check (:issue:`21079`)
-
-
-

Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies:
- moto
- pytest>=4.0
- sphinx
- sphinxcontrib-spelling
- numpydoc

# optional
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ isort
moto
pytest>=4.0
sphinx
sphinxcontrib-spelling
numpydoc
beautifulsoup4>=4.2.1
blosc
Expand Down

0 comments on commit 41681c8

Please sign in to comment.