-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add new API-reference page, automated generation of .rst
files, enable sphinx-gallery
. Fix #1808
#1809
Add new API-reference page, automated generation of .rst
files, enable sphinx-gallery
. Fix #1808
#1809
Changes from 53 commits
c46cddf
b7e882c
0092c16
3ff14b8
1d9c13f
fe6b60e
0b9a135
af1551b
8fa1691
74dcb42
4695125
4e5d176
15e418d
6c29149
9dfcb68
6e9d372
9d7c3a8
695b452
c9dcfac
15c2ef7
034137b
2b07283
3e7519d
003d038
7b15419
97c8ba3
6a29c91
58a46ae
3b3fbb8
63d296c
7b4e100
52c39e9
357a468
b100d86
dec5338
57c5dd3
be0917e
541378e
b16c392
7313d2a
a08fac9
c610958
f1f37d8
7313808
18b8b15
f058879
05e9979
2a98a19
4763459
7369597
7a781b2
0c63dbb
beccb35
aff50e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _examples-index: | ||
|
||
Gallery of Examples | ||
=================== | ||
|
||
|
||
.. _general_examples: | ||
|
||
General examples | ||
---------------- | ||
|
||
General-purpose and introductory examples from the gensim |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
EXAMPLE EXAMPLE | ||
=============== | ||
|
||
TO BE REPLACED WITH A REAL EXAMPLE | ||
""" | ||
|
||
########################################################################### | ||
# Here's our imports: | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
########################################################################### | ||
# Here's the first graph: | ||
|
||
x = np.linspace(-1, 2, 100) | ||
y = np.exp(x) | ||
|
||
plt.figure() | ||
plt.plot(x, y) | ||
plt.xlabel('$x$') | ||
plt.ylabel('$\exp(x)$') | ||
|
||
plt.show() | ||
|
||
########################################################################### | ||
# And here's the second one: | ||
|
||
plt.figure() | ||
plt.plot(x, -np.exp(-x)) | ||
plt.xlabel('$x$') | ||
plt.ylabel('$-\exp(-x)$') | ||
|
||
plt.show() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,13 +32,14 @@ help: | |
|
||
clean: | ||
-rm -rf $(BUILDDIR)/* | ||
-rm -rf generated/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How related There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In no way!
|
||
-rm -rf modules/generated/ | ||
-rm -rf auto_examples/* | ||
|
||
html: | ||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
rm -r $(BUILDDIR)/html/_sources | ||
cp -r $(BUILDDIR)/html/* ../ | ||
@echo | ||
@echo "Build finished. The HTML pages are in ../" | ||
@echo "Build finished. The HTML pages are in /docs/src/_build/html" | ||
|
||
upload: | ||
scp -r _build/html/* rr:public_html/gensim/ | ||
|
@@ -62,13 +63,13 @@ htmlhelp: | |
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | ||
@echo | ||
@echo "Build finished; now you can run HTML Help Workshop with the" \ | ||
".hhp project file in $(BUILDDIR)/htmlhelp." | ||
".hhp project file in $(BUILDDIR)/htmlhelp." | ||
|
||
qthelp: | ||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp | ||
@echo | ||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \ | ||
".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||
".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/gensim.qhcp" | ||
@echo "To view the help file:" | ||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/gensim.qhc" | ||
|
@@ -78,7 +79,7 @@ latex: | |
@echo | ||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." | ||
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ | ||
"run these through (pdf)latex." | ||
"run these through (pdf)latex." | ||
cd $(BUILDDIR)/latex && make all-pdf | ||
cp $(BUILDDIR)/latex/gensim.pdf ../gensim_manual.pdf | ||
|
||
|
@@ -91,9 +92,9 @@ linkcheck: | |
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | ||
@echo | ||
@echo "Link check complete; look for any errors in the above output " \ | ||
"or in $(BUILDDIR)/linkcheck/output.txt." | ||
"or in $(BUILDDIR)/linkcheck/output.txt." | ||
|
||
doctest: | ||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest | ||
@echo "Testing of doctests in the sources finished, look at the " \ | ||
"results in $(BUILDDIR)/doctest/output.txt." | ||
"results in $(BUILDDIR)/doctest/output.txt." |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
:mod:`{{module}}`.{{objname}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a link in answer, how to "form" this templates? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
{{ underline }}============== | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
:members: | ||
:special-members: | ||
:exclude-members: __init__ | ||
|
||
.. raw:: html | ||
|
||
<div class="clearer"></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
:mod:`{{module}}`.{{objname}} | ||
{{ underline }}==================== | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autofunction:: {{ objname }} | ||
|
||
.. raw:: html | ||
|
||
<div class="clearer"></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:mod:`{{module}}`.{{objname}} | ||
{{ underline }}============== | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. automodule:: {{module}}.{{objname}} | ||
:members: | ||
|
||
.. raw:: html | ||
|
||
<div class="clearer"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suspicious too (for site)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, it's intended.