Skip to content

Commit 73955c1

Browse files
Apply spell check to tutorials (#64)
* apply spell check to tutorials * add a package * treat spelling warning as error * add pylintdict as word list of tutorial check * update spelling word list * add a word * change var_form to ansatz * simplify * rename all var_form to ansatz * add a word * add words * fix doc spelling Co-authored-by: Manoel Marques <[email protected]>
1 parent 93b322f commit 73955c1

File tree

5 files changed

+99
-0
lines changed

5 files changed

+99
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ test_ci:
6060

6161
spell:
6262
pylint -rn --disable=all --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=.pylintdict qiskit_optimization test tools
63+
make -C docs spell SPHINXOPTS=$(SPHINXOPTS)
6364

6465
copyright:
6566
python tools/check_copyright.py

docs/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ BUILDDIR = _build
2020
help:
2121
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2222

23+
spell:
24+
@$(SPHINXBUILD) -W -b spelling "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25+
2326
.PHONY: help Makefile
2427

2528
# Catch-all target: route all unknown targets to Sphinx using the new

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
'_static/5_ADMM.png',
120120
}
121121

122+
spelling_word_list_filename = ['spelling_wordlist.txt', '../.pylintdict']
123+
122124
# -----------------------------------------------------------------------------
123125
# Autosummary
124126
# -----------------------------------------------------------------------------

docs/spelling_wordlist.txt

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
ADMMOptimizationResult
2+
ADMMOptimizer
3+
ADMMParameters
4+
ADMMState
5+
Aer
6+
Applegate
7+
BaseAggregator
8+
Bixby
9+
CVaR
10+
Chvátal
11+
CobylaOptimizer
12+
CplexOptimizer
13+
ExactCover
14+
Farhi
15+
GoemansWilliamsonOptimizationResult
16+
GoemansWilliamsonOptimizer
17+
Goldstone
18+
GraphOptimizationApplication
19+
GraphPartition
20+
GroverOptimizationResult
21+
GroverOptimizer
22+
Gutmann
23+
InequalityToEquality
24+
IntegerToBinary
25+
IntermediateResult
26+
LinearConstraint
27+
LinearEqualityToPenalty
28+
LinearExpression
29+
macOS
30+
MeanAggregator
31+
MinimumEigenOptimizationResult
32+
MinimumEigenOptimizer
33+
MultiStartOptimizer
34+
Neven
35+
NetworkX
36+
NumberPartition
37+
Optimality
38+
OptimizationAlgorithm
39+
OptimizationApplication
40+
OptimizationResult
41+
OptimizationResultStatus
42+
QiskitOptimizationError
43+
QuadraticConstraint
44+
QuadraticExpression
45+
QuadraticObjective
46+
QuadraticProgram
47+
QuadraticProgramConverter
48+
QuadraticProgramElement
49+
QuadraticProgramToQubo
50+
RecursiveMinimumEigenOptimizationResult
51+
RecursiveMinimumEigenOptimizer
52+
Rz
53+
SetPacking
54+
SlsqpOptimizationResult
55+
SlsqpOptimizer
56+
SolutionSample
57+
StableSet
58+
Travelling
59+
Troyer
60+
VehicleRouting
61+
VertexCover
62+
WarmStartQAOAFactory
63+
WarmStartQAOAOptimizer
64+
Wecker
65+
Zemlin
66+
adaptively
67+
arXiv
68+
arxiv
69+
behaviour
70+
combinatorial
71+
deterministically
72+
doi
73+
dok
74+
entangler
75+
exponentiated
76+
fmin
77+
multiset
78+
optimality
79+
param
80+
probabilistically
81+
rtype
82+
slsqp
83+
smoothen
84+
subcollection
85+
subproblem
86+
summands
87+
traceback
88+
tradeoff
89+
tsplib
90+
undirected
91+
wavefunction
92+
zsh

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Sphinx>=1.8.3,!=3.1.0,<4
1111
sphinx-panels
1212
sphinx-gallery
1313
sphinx-autodoc-typehints
14+
sphinxcontrib-spelling
1415
jupyter-sphinx
1516
discover
1617
qiskit-aer

0 commit comments

Comments
 (0)