-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from dhellmann/parallel-build
support parallel builds
- Loading branch information
Showing
21 changed files
with
164 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.. .. spelling:: | ||
.. spelling:: | ||
|
||
.. wikis | ||
wikis | ||
|
||
======================= | ||
Configuration Options | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
Release History | ||
================= | ||
|
||
.. spelling:: | ||
|
||
unmaintained | ||
|
||
.. release-notes:: | ||
|
||
5.1.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
.. .. spelling:: | ||
.. spelling:: | ||
|
||
wikis | ||
sphinxcontrib | ||
|
||
============== | ||
Installation | ||
============== | ||
|
||
Installing sphinxcontrib.spelling | ||
================================= | ||
1. Install the extension with pip: ``pip install sphinxcontrib-spelling`` | ||
|
||
Install the extension with pip: ``pip install sphinxcontrib-spelling`` | ||
2. Add ``'sphinxcontrib.spelling'`` to the ``extensions`` list in | ||
``conf.py``. | ||
|
||
Configuration | ||
============= | ||
.. code-block:: python | ||
1. Add ``'sphinxcontrib.spelling'`` to the ``extensions`` list in ``conf.py``. | ||
extensions = [ 'sphinxcontrib.spelling' ] | ||
:: | ||
3. Then pass ``"spelling"`` as the builder argument to ``sphinx-build``. | ||
|
||
extensions = [ 'sphinxcontrib.spelling' ] | ||
.. code-block:: shell-session | ||
.. _install-options: | ||
$ sphinx-build -b spelling docs/source docs/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Finucane | |
Gaynor | ||
Gonsiorowski | ||
Hong | ||
Hong | ||
Huon | ||
Kampik | ||
Kolosov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
builtins | ||
hoc | ||
linter | ||
linters | ||
pypi | ||
reStructuredText | ||
sphinxcontrib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
features: | ||
- | | ||
The builder is now registered using an entry point, so that if the | ||
``spelling`` directive is not used in a project | ||
``sphinxcontrib.spelling`` does not need to be included explicitly | ||
in the ``extensions`` list in ``conf.py`` in order to use it with | ||
the project on the command line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
features: | ||
- | | ||
PyEnchant is an optional dependency. If it is not installer, the | ||
spell checker will not work, but the extension can still be | ||
initialized. This allows projects that use spell checking to | ||
publish their documentation to ``readthedocs.org``, where it is | ||
not possible to install PyEnchant. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
features: | ||
- | | ||
Restore support for parallel builds. Words that do not appear in | ||
any configured dictionary are written to a file named based on the | ||
input file, with the ``.rst`` extension replaced with | ||
``.spelling``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
PyEnchant>=3.1.1 | ||
Sphinx>=3.0.0 | ||
importlib_metadata>=1.7.0;python_version<'3.8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# encoding: utf-8 | ||
# | ||
# Copyright (c) 2020 Doug Hellmann. All rights reserved. | ||
# | ||
"""Asset collector for additional spelling terms.""" | ||
|
||
import collections | ||
import contextlib | ||
|
||
from sphinx.environment.collectors import EnvironmentCollector | ||
from sphinx.util import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class SpellingCollector(EnvironmentCollector): | ||
|
||
def clear_doc(self, app, env, docname) -> None: | ||
with contextlib.suppress(AttributeError, KeyError): | ||
del env.spelling_document_words[docname] | ||
|
||
def merge_other(self, app, env, docnames, other): | ||
try: | ||
other_words = other.spelling_document_words | ||
except AttributeError: | ||
other_words = {} | ||
|
||
if not hasattr(env, 'spelling_document_words'): | ||
env.spelling_document_words = collections.defaultdict(list) | ||
env.spelling_document_words.update(other_words) | ||
|
||
def process_doc(self, app, doctree): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.