Skip to content

Commit 1dacc15

Browse files
committed
Add spell checking to the docs
Uses sphinxcontrib-spelling, same tool as Django, to verify the spelling of all words in the docs. Words that are not normally in the dictionary (e.g. django) can be added to docs/spelling_wordlist.txt. All existing spelling or capitalization mistakes have been fixed.
1 parent 646bcab commit 1dacc15

8 files changed

+84
-35
lines changed

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ cache: pip
44
matrix:
55
fast_finish: true
66
include:
7+
- env: TOXENV=docs
8+
before_install:
9+
- sudo apt-get -y install libenchant1c2a
710
- env: TOXENV=style
811
- env: TOXENV=readme
912
- python: 3.5

docs/changes.rst

+27-27
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Change log
4747
----------------
4848

4949
* Added an ``.editorconfig`` file specifying indentation rules etc.
50-
* Updated the italian translation.
50+
* Updated the Italian translation.
5151
* Added support for Django 3.1a1. ``fetch()`` and ``jQuery.ajax`` requests are
5252
now detected by the absence of a ``Accept: text/html`` header instead of the
5353
jQuery-specific ``X-Requested-With`` header on Django 3.1 or better.
@@ -59,7 +59,7 @@ Change log
5959
add scripts rather then embedding them in the content HTML.
6060
* Switched from JSHint to ESLint. Added an ESLint job to the Travis CI matrix.
6161
* Debug toolbar state which is only needed in the JavaScript code now uses
62-
localStorage.
62+
``localStorage``.
6363
* Updated the code to avoid a few deprecation warnings and resource warnings.
6464
* Started loading JavaScript as ES6 modules.
6565
* Added support for ``cache.touch()`` when using django-debug-toolbar.
@@ -87,7 +87,7 @@ Change log
8787

8888
* Removed support for end of life Django 2.0 and 2.1.
8989
* Added support for Python 3.8.
90-
* Add locals() option for sql panel.
90+
* Add locals() option for SQL panel.
9191
* Added support for Django 3.0.
9292

9393

@@ -153,14 +153,14 @@ The following deprecated settings have been removed:
153153
* Convert system check errors to warnings to accommodate exotic
154154
configurations.
155155
* Fixed a crash when explaining raw querysets.
156-
* Fixed an obscure unicode error with binary data fields.
156+
* Fixed an obscure Unicode error with binary data fields.
157157
* Added MariaDB and Python 3.7 builds to the CI.
158158

159159
1.10.1 (2018-09-11)
160160
-------------------
161161

162162
* Fixed a problem where the duplicate query detection breaks for
163-
non-hashable query parameters.
163+
unhashable query parameters.
164164
* Added support for structured types when recording SQL.
165165
* Made Travis CI also run one test no PostgreSQL.
166166
* Added fallbacks for inline images in CSS.
@@ -185,7 +185,7 @@ The following deprecated settings have been removed:
185185
parameters).
186186
* Stopped hiding frames from Django's contrib apps in stacktraces by
187187
default.
188-
* Lots of small cleanups and bugfixes.
188+
* Lots of small cleanups and bug fixes.
189189

190190
1.9.1 (2017-11-15)
191191
------------------
@@ -198,11 +198,11 @@ The following deprecated settings have been removed:
198198
This version is compatible with Django 2.0 and requires Django 1.8 or
199199
later.
200200

201-
Bugfixes
202-
~~~~~~~~
201+
Bug fixes
202+
~~~~~~~~~
203203

204204
* The profiling panel now escapes reported data resulting in valid HTML.
205-
* Many minor cleanups and bugfixes.
205+
* Many minor cleanups and bug fixes.
206206

207207
1.8 (2017-05-05)
208208
----------------
@@ -231,8 +231,8 @@ Features
231231
skipped by default to avoid panel sizes going into hundreds of
232232
megabytes of HTML.
233233

234-
Bugfixes
235-
~~~~~~~~
234+
Bug fixes
235+
~~~~~~~~~
236236

237237
* All views are now decorated with
238238
``debug_toolbar.decorators.require_show_toolbar`` preventing unauthorized
@@ -245,8 +245,8 @@ Bugfixes
245245
1.7 (2017-03-05)
246246
----------------
247247

248-
Bugfixes
249-
~~~~~~~~
248+
Bug fixes
249+
~~~~~~~~~
250250

251251
* Recursive template extension is now understood.
252252
* Deprecation warnings were fixed.
@@ -261,7 +261,7 @@ Bugfixes
261261
1.6 (2016-10-05)
262262
----------------
263263

264-
The debug toolbar was adopted by jazzband.
264+
The debug toolbar was adopted by Jazzband.
265265

266266
Removed features
267267
~~~~~~~~~~~~~~~~
@@ -271,8 +271,8 @@ Removed features
271271
``DEBUG_TOOLBAR_PATCH_SETTINGS`` setting has also been removed as it is now
272272
unused. See the :doc:`installation documentation <installation>` for details.
273273

274-
Bugfixes
275-
~~~~~~~~
274+
Bug fixes
275+
~~~~~~~~~
276276

277277
* The ``DebugToolbarMiddleware`` now also supports Django 1.10's ``MIDDLEWARE``
278278
setting.
@@ -284,8 +284,8 @@ This version is compatible with Django 1.10 and requires Django 1.8 or later.
284284

285285
Support for Python 3.2 is dropped.
286286

287-
Bugfixes
288-
~~~~~~~~
287+
Bug fixes
288+
~~~~~~~~~
289289

290290
* Restore compatibility with sqlparse ≥ 0.2.0.
291291
* Add compatibility with Bootstrap 4, Pure CSS, MDL, etc.
@@ -305,8 +305,8 @@ New features
305305
to only record stats when the toolbar is going to be inserted into the
306306
response.
307307

308-
Bugfixes
309-
~~~~~~~~
308+
Bug fixes
309+
~~~~~~~~~
310310

311311
* Response time for requests of projects with numerous media files has
312312
been improved.
@@ -323,8 +323,8 @@ New features
323323
* The ``SHOW_TOOLBAR_CALLBACK`` accepts a callable.
324324
* The toolbar now provides a :ref:`javascript-api`.
325325

326-
Bugfixes
327-
~~~~~~~~
326+
Bug fixes
327+
~~~~~~~~~
328328

329329
* The toolbar handle cannot leave the visible area anymore when the toolbar is
330330
collapsed.
@@ -342,11 +342,11 @@ New features
342342

343343
* The ``JQUERY_URL`` setting defines where the toolbar loads jQuery from.
344344

345-
Bugfixes
346-
~~~~~~~~
345+
Bug fixes
346+
~~~~~~~~~
347347

348348
* The toolbar now always loads a private copy of jQuery in order to avoid
349-
using an incompatible version. It no longer attemps to integrate with AMD.
349+
using an incompatible version. It no longer attempts to integrate with AMD.
350350

351351
This private copy is available in ``djdt.jQuery``. Third-party panels are
352352
encouraged to use it because it should be as stable as the toolbar itself.
@@ -362,8 +362,8 @@ New features
362362
* The SQL panel colors queries depending on the stack level.
363363
* The Profiler panel allows configuring the maximum depth.
364364

365-
Bugfixes
366-
~~~~~~~~
365+
Bug fixes
366+
~~~~~~~~~
367367

368368
* Support languages where lowercase and uppercase strings may have different
369369
lengths.

docs/configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Panel options
197197

198198
If set to ``True`` then a template's context will be included with it in the
199199
template debug panel. Turning this off is useful when you have large
200-
template contexts, or you have template contexts with lazy datastructures
200+
template contexts, or you have template contexts with lazy data structures
201201
that you don't want to be evaluated.
202202

203203
* ``SKIP_TEMPLATE_PREFIXES``

docs/panels.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Static files
7676

7777
Path: ``debug_toolbar.panels.staticfiles.StaticFilesPanel``
7878

79-
Used static files and their locations (via the staticfiles finders).
79+
Used static files and their locations (via the ``staticfiles`` finders).
8080

8181
Cache
8282
~~~~~
@@ -224,7 +224,7 @@ URL: https://github.com/robinedwards/django-debug-toolbar-neo4j-panel
224224

225225
Path: ``neo4j_panel.Neo4jPanel``
226226

227-
Trace neo4j rest API calls in your django application, this also works for neo4django and neo4jrestclient, support for py2neo is on its way.
227+
Trace neo4j rest API calls in your Django application, this also works for neo4django and neo4jrestclient, support for py2neo is on its way.
228228

229229
Pympler
230230
~~~~~~~
@@ -242,7 +242,7 @@ URL: https://github.com/djsutho/django-debug-toolbar-request-history
242242

243243
Path: ``ddt_request_history.panels.request_history.RequestHistoryPanel``
244244

245-
Switch between requests to view their stats. Also adds support for viewing stats for ajax requests.
245+
Switch between requests to view their stats. Also adds support for viewing stats for AJAX requests.
246246

247247
Requests
248248
~~~~~~~~

docs/spelling_wordlist.txt

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
backend
2+
backends
3+
checkbox
4+
contrib
5+
django
6+
fallbacks
7+
flamegraph
8+
flatpages
9+
frontend
10+
inlining
11+
isort
12+
Jazzband
13+
jinja
14+
jQuery
15+
jrestclient
16+
js
17+
Makefile
18+
memcache
19+
memcached
20+
middleware
21+
middlewares
22+
multi
23+
neo
24+
profiler
25+
psycopg
26+
py
27+
pylibmc
28+
Pympler
29+
querysets
30+
refactoring
31+
spooler
32+
stacktrace
33+
stacktraces
34+
timeline
35+
unhashable
36+
uWSGI
37+
validator
38+
Werkzeug

docs/tips.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ The toolbar isn't displayed!
77
The Debug Toolbar will only display when ``DEBUG = True`` in your project's
88
settings (see :ref:`Show Toolbar Callback <SHOW_TOOLBAR_CALLBACK>`) and your
99
IP address must also match an entry in your project's ``INTERNAL_IPS`` setting
10-
(see :ref:`internal-ips`). It will also only display if the mimetype of the
10+
(see :ref:`internal-ips`). It will also only display if the MIME type of the
1111
response is either ``text/html`` or ``application/xhtml+xml`` and contains a
1212
closing ``</body>`` tag.
1313

1414
Be aware of middleware ordering and other middleware that may intercept
15-
requests and return responses. Putting the debug toolbar middleware *after*
16-
the Flatpage middleware, for example, means the toolbar will not show up on
17-
flatpages.
15+
requests and return responses. Putting the debug toolbar middleware *after* the
16+
``FlatpageFallbackMiddleware`` middleware, for example, means the toolbar will
17+
not show up on flatpages.
1818

1919
Browsers have become more aggressive with caching static assets, such as
2020
JavaScript and CSS files. Check your browser's development console, and if

requirements_dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ black
1717
# Documentation
1818

1919
Sphinx
20+
sphinxcontrib-spelling
2021

2122
# Other tools
2223

tox.ini

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[tox]
22
envlist =
3+
docs
34
style
45
readme
56
py{35,36,37,38}-dj22-sqlite
@@ -33,6 +34,12 @@ whitelist_externals = make
3334
pip_pre = True
3435
commands = make coverage TEST_ARGS='{posargs:tests}'
3536

37+
[testenv:docs]
38+
commands = make -C {toxinidir}/docs spelling
39+
deps =
40+
Sphinx
41+
sphinxcontrib-spelling
42+
3643
[testenv:style]
3744
basepython = python3
3845
commands = make style_check

0 commit comments

Comments
 (0)