Skip to content

Commit a2fe8b9

Browse files
committed
Fix lint and add spellcheck documentation
1 parent 4117a9c commit a2fe8b9

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

doc/source/contributing.rst

+19
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,25 @@ the documentation are also built by Travis-CI. These docs are then hosted `here
436436
<http://pandas-docs.github.io/pandas-docs-travis>`__, see also
437437
the :ref:`Continuous Integration <contributing.ci>` section.
438438

439+
Spell checking documentation
440+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
441+
442+
When contributing to documentation to **pandas** it's good to check if your work
443+
contains any spelling errors. Sphinx provides an easy way to spell check documentation
444+
and docstrings.
445+
446+
Running the spell check is easy. Just navigate to your local ``pandas/doc/`` directory and run::
447+
448+
python make.py spellcheck
449+
450+
The spellcheck will take a few minutes to run (between 1 to 6 minutes). Sphinx will alert you
451+
with warnings and misspelt words - these misspelt words will be added to a file called
452+
``output.txt`` and you can find it on your local directory ``pandas/doc/build/spelling/``.
453+
454+
The Sphinx spelling extension uses an EN-US dictionary to correct words, what means that in
455+
some cases you might need to add a word to this dictionary. You can do so by adding the word to
456+
the bag-of-words file named ``spelling_wordlist.txt`` located in the folder ``pandas/doc/``.
457+
439458
.. _contributing.code:
440459

441460
Contributing to the code base

doc/source/spelling_wordlist.txt

+2
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,8 @@ lzo
23782378
usepackage
23792379
booktabs
23802380
coereced
2381+
spellcheck
2382+
misspelt
23812383
rcl
23822384
multicolumns
23832385
gfc

pandas/core/reshape/melt.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def wide_to_long(df, stubnames, i, j, sep="", suffix=r'\d+'):
166166
Wide panel to long format. Less flexible but more user-friendly than melt.
167167
168168
With stubnames ['A', 'B'], this function expects to find one or more
169-
group of columns with format A-suffix1, A-suffix2,..., B-suffix1, B-suffix2,...
169+
group of columns with format
170+
A-suffix1, A-suffix2,..., B-suffix1, B-suffix2,...
170171
You specify what you want to call this suffix in the resulting long format
171172
with `j` (for example `j='year'`)
172173

pandas/core/tools/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
181181
.. versionadded:: 0.20.0
182182
cache : boolean, default False
183183
If True, use a cache of unique, converted dates to apply the datetime
184-
conversion. May produce significant speed-up when parsing duplicate date
185-
strings, especially ones with timezone offsets.
184+
conversion. May produce significant speed-up when parsing duplicate
185+
date strings, especially ones with timezone offsets.
186186
187187
.. versionadded:: 0.23.0
188188

pandas/io/formats/style.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,8 @@ def _bar_center_mid(s, color, width, base):
10511051
def bar(self, subset=None, axis=0, color='#d65f5f', width=100,
10521052
align='left'):
10531053
"""
1054-
Color the background ``color`` proportional to the values in each column.
1054+
Color the background ``color`` proportional to the values in each
1055+
column.
10551056
Excludes non-numeric data by default.
10561057
10571058
Parameters

0 commit comments

Comments
 (0)