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

Enabling spellcheck: sphinxcontrib-spelling as an extension for Sphinx #263

Merged
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
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- name: "Install requirements"
run: |
pip install -r requirements.txt
sudo apt-get install -y hunspell-en-ca hyphen-en-ca
- name: "Run build test"
run: |
make test
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,15 @@ pseudoxml:
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

spelling:
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
@echo
@echo "Build finished. The spelling files are in $(BUILDDIR)/spelling."

dos2unix:
find . -name "*.txt" | grep -v _build | xargs -IF fromdos F

.PHONY: test
test:
$(MAKE) html ALLSPHINXOPTS="-W --keep-going -n ."
$(MAKE) spelling ALLSPHINXOPTS="-W --keep-going ."
10 changes: 10 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,18 @@
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx_version_ref",
"sphinxcontrib.spelling",
]

# spelling

spelling_lang="en_CA"
tokenizer_lang="en_CA"

spelling_word_list_filename = ['spelling_wordlist.txt']

spelling_show_suggestions=True

# Obtain intersphinx_mapping
inventory = "https://gist.githubusercontent.com/qubot/2dd2f7f96e51121061d4/raw/sphinxdoc-inventory.json"
response = urlopen(inventory)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sphinx
sphinx_rtd_theme
sphinx_version_ref
sphinx_version_ref
sphinxcontrib-spelling
Loading
Loading