Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit ec4d6a3

Browse files
authored
update examples and docs config to be compatible with current Python (#171)
* Update examples code and docs configuration to be compatible with current Python * Revert "Update examples code and docs configuration to be compatible with current Python" This reverts commit 11786db. * update examples and docs config to be compatible with current Python * total docs build process refactoring
1 parent 473fdd0 commit ec4d6a3

34 files changed

+183
-2658
lines changed

README.rst

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:target: https://ci.appveyor.com/project/fabianp/lightning/branch/master
88

99
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.200504.svg
10-
:target: https://doi.org/10.5281/zenodo.200504
10+
:target: https://doi.org/10.5281/zenodo.200504
1111

1212
lightning
1313
==========
@@ -72,16 +72,21 @@ scikit-learn >= 0.19. Building from source also requires Cython and a working C/
7272
Installation
7373
------------
7474

75-
Precompiled binaries for the stable version of lightning are available for the main platforms and can be installed using pip::
75+
Precompiled binaries for the stable version of lightning are available for the main platforms and can be installed using pip:
76+
77+
.. code-block:: sh
7678
7779
pip install sklearn-contrib-lightning
7880
79-
or conda::
81+
or conda:
82+
83+
.. code-block:: sh
8084
8185
conda install -c conda-forge sklearn-contrib-lightning
8286
87+
The development version of lightning can be installed from its git repository. In this case it is assumed that you have the git version control system, a working C++ compiler, Cython and the numpy development libraries. In order to install the development version, type:
8388

84-
The development version of lightning can be installed from its git repository. In this case it is assumed that you have the git version control system, a working C++ compiler, Cython and the numpy development libraries. In order to install the development version, type::
89+
.. code-block:: sh
8590
8691
git clone https://github.com/scikit-learn-contrib/lightning.git
8792
cd lightning
@@ -98,13 +103,11 @@ On GitHub
98103

99104
https://github.com/scikit-learn-contrib/lightning
100105

101-
102106
Citing
103107
------
104108

105109
If you use this software, please cite it. Here is a BibTex snippet that you can use:
106110

107-
108111
.. code-block::
109112
110113
@misc{lightning_2016,
@@ -117,8 +120,7 @@ If you use this software, please cite it. Here is a BibTex snippet that you can
117120
url = {https://doi.org/10.5281/zenodo.200504}
118121
}
119122
120-
121-
Other citing formats are available in `its Zenodo entry <https://doi.org/10.5281/zenodo.200504>`_ .
123+
Other citing formats are available in `its Zenodo entry <https://doi.org/10.5281/zenodo.200504>`_.
122124

123125
Authors
124126
-------

doc/Makefile

+13-155
Original file line numberDiff line numberDiff line change
@@ -1,162 +1,20 @@
1-
# Makefile for Sphinx documentation
1+
# Minimal makefile for Sphinx documentation
22
#
33

4-
# You can set these variables from the command line.
5-
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build
7-
PAPER =
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
89
BUILDDIR = _build
910

10-
# Internal variables.
11-
PAPEROPT_a4 = -D latex_paper_size=a4
12-
PAPEROPT_letter = -D latex_paper_size=letter
13-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14-
# the i18n builder cannot share the environment and doctrees with the others
15-
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16-
17-
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
18-
19-
all: html-noplot
20-
11+
# Put it first so that "make" without argument is like "make help".
2112
help:
22-
@echo "Please use \`make <target>' where <target> is one of"
23-
@echo " html to make standalone HTML files"
24-
@echo " dirhtml to make HTML files named index.html in directories"
25-
@echo " singlehtml to make a single large HTML file"
26-
@echo " pickle to make pickle files"
27-
@echo " json to make JSON files"
28-
@echo " htmlhelp to make HTML files and a HTML help project"
29-
@echo " qthelp to make HTML files and a qthelp project"
30-
@echo " devhelp to make HTML files and a Devhelp project"
31-
@echo " epub to make an epub"
32-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
33-
@echo " latexpdf to make LaTeX files and run them through pdflatex"
34-
@echo " text to make text files"
35-
@echo " man to make manual pages"
36-
@echo " texinfo to make Texinfo files"
37-
@echo " info to make Texinfo files and run them through makeinfo"
38-
@echo " gettext to make PO message catalogs"
39-
@echo " changes to make an overview of all changed/added/deprecated items"
40-
@echo " linkcheck to check all external links for integrity"
41-
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
42-
43-
clean:
44-
-rm -rf $(BUILDDIR)/*
45-
-rm -rf auto_examples
46-
-rm -rf generated
47-
48-
html:
49-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
50-
@echo
51-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
52-
53-
html-noplot:
54-
$(SPHINXBUILD) -D plot_gallery=False -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
55-
@echo
56-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
57-
58-
dirhtml:
59-
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
60-
@echo
61-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
62-
63-
singlehtml:
64-
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
65-
@echo
66-
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
67-
68-
pickle:
69-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
70-
@echo
71-
@echo "Build finished; now you can process the pickle files."
72-
73-
json:
74-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
75-
@echo
76-
@echo "Build finished; now you can process the JSON files."
77-
78-
htmlhelp:
79-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
80-
@echo
81-
@echo "Build finished; now you can run HTML Help Workshop with the" \
82-
".hhp project file in $(BUILDDIR)/htmlhelp."
83-
84-
qthelp:
85-
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
86-
@echo
87-
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
88-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
89-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/lightning.qhcp"
90-
@echo "To view the help file:"
91-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/lightning.qhc"
92-
93-
devhelp:
94-
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
95-
@echo
96-
@echo "Build finished."
97-
@echo "To view the help file:"
98-
@echo "# mkdir -p $$HOME/.local/share/devhelp/lightning"
99-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/lightning"
100-
@echo "# devhelp"
101-
102-
epub:
103-
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
104-
@echo
105-
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
106-
107-
latex:
108-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
109-
@echo
110-
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
111-
@echo "Run \`make' in that directory to run these through (pdf)latex" \
112-
"(use \`make latexpdf' here to do that automatically)."
113-
114-
latexpdf:
115-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
116-
@echo "Running LaTeX files through pdflatex..."
117-
$(MAKE) -C $(BUILDDIR)/latex all-pdf
118-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
119-
120-
text:
121-
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
122-
@echo
123-
@echo "Build finished. The text files are in $(BUILDDIR)/text."
124-
125-
man:
126-
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
127-
@echo
128-
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
129-
130-
texinfo:
131-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
132-
@echo
133-
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
134-
@echo "Run \`make' in that directory to run these through makeinfo" \
135-
"(use \`make info' here to do that automatically)."
136-
137-
info:
138-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
139-
@echo "Running Texinfo files through makeinfo..."
140-
make -C $(BUILDDIR)/texinfo info
141-
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
142-
143-
gettext:
144-
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
145-
@echo
146-
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
147-
148-
changes:
149-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
150-
@echo
151-
@echo "The overview file is in $(BUILDDIR)/changes."
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
15214

153-
linkcheck:
154-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
155-
@echo
156-
@echo "Link check complete; look for any errors in the above output " \
157-
"or in $(BUILDDIR)/linkcheck/output.txt."
15+
.PHONY: help Makefile
15816

159-
doctest:
160-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
161-
@echo "Testing of doctests in the sources finished, look at the " \
162-
"results in $(BUILDDIR)/doctest/output.txt."
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/_static/lightning.css

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
.navbar-text{
2-
display: none
1+
.navbar-text {
2+
display: none !important;
33
}
44

5-
body .content-container{
6-
margin-top: 10px;
7-
width: 940px;
5+
div.body.content {
6+
margin-top: 15px !important;
87
}

doc/_templates/class.rst

-12
This file was deleted.

doc/_templates/class_with_call.rst

-13
This file was deleted.

doc/_templates/function.rst

-8
This file was deleted.

doc/_templates/layout.html

-24
This file was deleted.

0 commit comments

Comments
 (0)