Skip to content

Commit eb94f70

Browse files
committed
chore: add docs
1 parent b967ba4 commit eb94f70

4 files changed

Lines changed: 1097 additions & 0 deletions

File tree

docs/Makefile

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = _build
9+
10+
# User-friendly check for sphinx-build
11+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
13+
endif
14+
15+
# Internal variables.
16+
PAPEROPT_a4 = -D latex_paper_size=a4
17+
PAPEROPT_letter = -D latex_paper_size=letter
18+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19+
# the i18n builder cannot share the environment and doctrees with the others
20+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21+
22+
.PHONY: help
23+
help:
24+
@echo "Please use \`make <target>' where <target> is one of"
25+
@echo " html to make standalone HTML files"
26+
@echo " serve_docs to serve docs locally at http://127.0.0.1:8000/"
27+
@echo " dirhtml to make HTML files named index.html in directories"
28+
@echo " singlehtml to make a single large HTML file"
29+
@echo " pickle to make pickle files"
30+
@echo " json to make JSON files"
31+
@echo " htmlhelp to make HTML files and a HTML help project"
32+
@echo " qthelp to make HTML files and a qthelp project"
33+
@echo " applehelp to make an Apple Help Book"
34+
@echo " devhelp to make HTML files and a Devhelp project"
35+
@echo " epub to make an epub"
36+
@echo " epub3 to make an epub3"
37+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
38+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
39+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
40+
@echo " text to make text files"
41+
@echo " man to make manual pages"
42+
@echo " texinfo to make Texinfo files"
43+
@echo " info to make Texinfo files and run them through makeinfo"
44+
@echo " gettext to make PO message catalogs"
45+
@echo " changes to make an overview of all changed/added/deprecated items"
46+
@echo " xml to make Docutils-native XML files"
47+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
48+
@echo " linkcheck to check all external links for integrity"
49+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
50+
@echo " coverage to run coverage check of the documentation (if enabled)"
51+
@echo " dummy to check syntax errors of document sources"
52+
53+
.PHONY: clean
54+
clean:
55+
rm -rf $(BUILDDIR)/*
56+
57+
.PHONY: html
58+
html:
59+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
60+
@echo
61+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
62+
63+
serve_docs: ## serve the built docs locally to preview the site in the browser
64+
sphinx-autobuild . $(BUILDDIR)/html
65+
66+
.PHONY: dirhtml
67+
dirhtml:
68+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
69+
@echo
70+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
71+
72+
.PHONY: singlehtml
73+
singlehtml:
74+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
75+
@echo
76+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
77+
78+
.PHONY: pickle
79+
pickle:
80+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
81+
@echo
82+
@echo "Build finished; now you can process the pickle files."
83+
84+
.PHONY: json
85+
json:
86+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
87+
@echo
88+
@echo "Build finished; now you can process the JSON files."
89+
90+
.PHONY: htmlhelp
91+
htmlhelp:
92+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
93+
@echo
94+
@echo "Build finished; now you can run HTML Help Workshop with the" \
95+
".hhp project file in $(BUILDDIR)/htmlhelp."
96+
97+
.PHONY: qthelp
98+
qthelp:
99+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
100+
@echo
101+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
102+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
103+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openedx-ai-extensions.qhcp"
104+
@echo "To view the help file:"
105+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openedx-ai-extensions.qhc"
106+
107+
.PHONY: applehelp
108+
applehelp:
109+
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
110+
@echo
111+
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
112+
@echo "N.B. You won't be able to view it unless you put it in" \
113+
"~/Library/Documentation/Help or install it in your application" \
114+
"bundle."
115+
116+
.PHONY: devhelp
117+
devhelp:
118+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
119+
@echo
120+
@echo "Build finished."
121+
@echo "To view the help file:"
122+
@echo "# mkdir -p $$HOME/.local/share/devhelp/openedx-ai-extensions"
123+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openedx-ai-extensions"
124+
@echo "# devhelp"
125+
126+
.PHONY: epub
127+
epub:
128+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
129+
@echo
130+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
131+
132+
.PHONY: epub3
133+
epub3:
134+
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
135+
@echo
136+
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
137+
138+
.PHONY: latex
139+
latex:
140+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
141+
@echo
142+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
143+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
144+
"(use \`make latexpdf' here to do that automatically)."
145+
146+
.PHONY: latexpdf
147+
latexpdf:
148+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
149+
@echo "Running LaTeX files through pdflatex..."
150+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
151+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
152+
153+
.PHONY: latexpdfja
154+
latexpdfja:
155+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
156+
@echo "Running LaTeX files through platex and dvipdfmx..."
157+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
158+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
159+
160+
.PHONY: text
161+
text:
162+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
163+
@echo
164+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
165+
166+
.PHONY: man
167+
man:
168+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
169+
@echo
170+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
171+
172+
.PHONY: texinfo
173+
texinfo:
174+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
175+
@echo
176+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
177+
@echo "Run \`make' in that directory to run these through makeinfo" \
178+
"(use \`make info' here to do that automatically)."
179+
180+
.PHONY: info
181+
info:
182+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
183+
@echo "Running Texinfo files through makeinfo..."
184+
make -C $(BUILDDIR)/texinfo info
185+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
186+
187+
.PHONY: gettext
188+
gettext:
189+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
190+
@echo
191+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
192+
193+
.PHONY: changes
194+
changes:
195+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
196+
@echo
197+
@echo "The overview file is in $(BUILDDIR)/changes."
198+
199+
.PHONY: linkcheck
200+
linkcheck:
201+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
202+
@echo
203+
@echo "Link check complete; look for any errors in the above output " \
204+
"or in $(BUILDDIR)/linkcheck/output.txt."
205+
206+
.PHONY: doctest
207+
doctest:
208+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
209+
@echo "Testing of doctests in the sources finished, look at the " \
210+
"results in $(BUILDDIR)/doctest/output.txt."
211+
212+
.PHONY: coverage
213+
coverage:
214+
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
215+
@echo "Testing of coverage in the sources finished, look at the " \
216+
"results in $(BUILDDIR)/coverage/python.txt."
217+
218+
.PHONY: xml
219+
xml:
220+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
221+
@echo
222+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
223+
224+
.PHONY: pseudoxml
225+
pseudoxml:
226+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
227+
@echo
228+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
229+
230+
.PHONY: dummy
231+
dummy:
232+
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
233+
@echo
234+
@echo "Build finished. Dummy builder generates no files."

0 commit comments

Comments
 (0)