Skip to content

Commit 22c8251

Browse files
committed
Update documentation.
1 parent 2987d32 commit 22c8251

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6602
-203
lines changed

.ci/upload_docs.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
set -e # Exit with nonzero exit code if anything fails
3+
4+
SOURCE_BRANCH="master"
5+
TARGET_BRANCH="gh-pages"
6+
7+
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
8+
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || \
9+
[ "$TRAVIS_BRANCH" != master -a \
10+
"$TRAVIS_BRANCH" != develop -a \
11+
"$TRAVIS_BRANCH" != doc -a \
12+
"$TRAVIS_BRANCH" != ci ]; then
13+
echo "No docs to upload."
14+
exit 0
15+
fi
16+
17+
if [ -z "$GH_TOKEN" ]; then
18+
echo "Error: GH_TOKEN is undefined"
19+
exit 1
20+
fi
21+
22+
# Save some useful information
23+
REPO=`git config remote.origin.url`
24+
SHA=`git rev-parse --verify HEAD`
25+
26+
# doc happens to contain the "html" tree that we want to push
27+
# into the gh-pages branch. So we step into that directory, create a new repo,
28+
# set the remote appropriately, then commit and push.
29+
cd doc
30+
git init
31+
git config user.name "Travis CI"
32+
git config user.email "travis-ci"
33+
34+
# Make sure 'GH_TOKEN' is set (as 'secure' variable) in .travis.yml
35+
git remote add upstream "https://$GH_TOKEN@github.com/boostorg/gil.git"
36+
git fetch upstream
37+
git reset upstream/gh-pages
38+
39+
# Prepare version.
40+
if [ "$TRAVIS_BRANCH" = develop -o "$TRAVIS_BRANCH" = doc ]; then
41+
mkdir -p develop/doc/
42+
cp ../index.html develop/
43+
cp ../doc/index.html develop/doc/
44+
cp -a html develop/doc/
45+
git add -A develop
46+
else
47+
cp ../index.html .
48+
cp ../doc/index.html doc/
49+
git add -A .
50+
fi
51+
# Commit the new version.
52+
git commit -m "Deploy to GitHub Pages: ${SHA}"
53+
54+
# Now that we're all set up, we can push.
55+
git push -q upstream HEAD:gh-pages

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ indent_size = 2
2020
indent_style = space
2121
trim_trailing_whitespace = true
2222
insert_final_newline = true
23+
24+
[*.rst]
25+
indent_size = 4
26+
indent_style = space
27+
max_line_length = 80
28+
trim_trailing_whitespace = true
29+
insert_final_newline = true

.travis.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ branches:
1313
only:
1414
- master
1515
- develop
16+
- doc
1617
- ci
1718

1819
env:
20+
global:
21+
- secure: "UHit2f6Hq2pkHvx8rfrQvFacYiQKVO3vrCbNuDi/VSAIzQjRnqCqE06y4vpXLMsXf62TvBeCBStIuI8g+HP8B+f39oGb/9Om+yIgN/yes47R4sLFKFbRiOS6sfCIefJp7Kx7GSFf81xWxStpIU4QaSsk8Dlt5xyurTWXFSde+lQ="
22+
1923
matrix:
2024
- BOGUS_JOB=true
2125

@@ -103,6 +107,13 @@ matrix:
103107
- os: osx
104108
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11 VARIANT=release
105109

110+
- env: DOC=1
111+
addons:
112+
apt:
113+
packages:
114+
- python-sphinx
115+
- doxygen
116+
106117
install:
107118
- cd ..
108119
- git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
@@ -111,17 +122,35 @@ install:
111122
- git submodule update --init libs/config
112123
- git submodule update --init tools/boostdep
113124
- cp -r $TRAVIS_BUILD_DIR/* libs/gil
125+
- cp -r $TRAVIS_BUILD_DIR/.ci libs/gil
114126
- python tools/boostdep/depinst/depinst.py gil
115127
- ./bootstrap.sh
116128
- ./b2 headers
117129

118130
script:
119131
- |-
120-
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
121-
- ./b2 libs/gil/test toolset=$TOOLSET variant=$VARIANT
122-
- ./b2 libs/gil/toolbox/test toolset=$TOOLSET variant=$VARIANT
123-
- ./b2 libs/gil/numeric/test toolset=$TOOLSET variant=$VARIANT
124-
- ./b2 libs/gil/io/test//simple toolset=$TOOLSET variant=$VARIANT
132+
if [ "$DOC" ]; then
133+
echo "using doxygen ;" > ~/user-config.jam
134+
./b2 libs/gil/doc
135+
else
136+
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
137+
./b2 libs/gil/test toolset=$TOOLSET variant=$VARIANT
138+
./b2 libs/gil/toolbox/test toolset=$TOOLSET variant=$VARIANT
139+
./b2 libs/gil/numeric/test toolset=$TOOLSET variant=$VARIANT
140+
./b2 libs/gil/io/test//simple toolset=$TOOLSET variant=$VARIANT
141+
fi
142+
143+
after_success:
144+
# Upload docs only when building upstream.
145+
- |
146+
if [ "$DOC" -a \
147+
"$TRAVIS_REPO_SLUG" = "boostorg/gil" -a \
148+
"$TRAVIS_PULL_REQUEST" = "false" ]; then
149+
export GH_TOKEN
150+
cd libs/gil
151+
.ci/upload_docs.sh
152+
fi
153+
125154
126155
notifications:
127156
email:

doc/Jamfile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright (c) 2018 Stefan Seefeld
2+
#
3+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
4+
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5+
6+
import doxygen ;
7+
import os ;
8+
import path ;
9+
10+
.doxygen = [ doxygen.name ] ;
11+
.doxygen ?= doxygen ;
12+
13+
#doxygen/gil_standalone/gil_boost.doxygen
14+
make reference : doxyfile
15+
: @make_doxygen
16+
: <location>html
17+
<dependency>$(headers)
18+
;
19+
20+
rule make_doxygen ( targets * : sources * : properties * )
21+
{
22+
LIB_DIR on $(targets) =
23+
[ path.native [ path.parent [ path.root
24+
[ on $(sources[1]) return $(SEARCH) ] [ path.pwd ] ] ] ] ;
25+
}
26+
27+
if [ os.name ] = NT
28+
{
29+
actions make_doxygen
30+
{
31+
SET LIB_DIR=$(LIB_DIR)
32+
chdir "$(>:D)" && "$(.doxygen)" $(>:D=)
33+
}
34+
}
35+
else
36+
{
37+
actions make_doxygen
38+
{
39+
export LIB_DIR=$(LIB_DIR)
40+
cd $(>:D) && "$(.doxygen)" $(>:D=)
41+
}
42+
}
43+
44+
make html
45+
: index.rst
46+
: @sphinx-build
47+
: <location>.
48+
<dependency>reference
49+
;
50+
51+
if [ os.name ] = NT
52+
{
53+
actions sphinx-build { chdir "$(>:D)" && make clean && make html}
54+
}
55+
else
56+
{
57+
actions sphinx-build { make -C "$(>:D)" clean html}
58+
}
59+
60+
###############################################################################
61+
alias boostdoc ;
62+
explicit boostdoc ;
63+
alias boostrelease : html ;
64+
explicit boostrelease ;

doc/Makefile

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
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+
HTMLDIR = html
10+
11+
# Internal variables.
12+
PAPEROPT_a4 = -D latex_paper_size=a4
13+
PAPEROPT_letter = -D latex_paper_size=letter
14+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
15+
16+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
17+
18+
all: html
19+
20+
help:
21+
@echo "Please use \`make <target>' where <target> is one of"
22+
@echo " html to make standalone HTML files"
23+
@echo " dirhtml to make HTML files named index.html in directories"
24+
@echo " singlehtml to make a single large HTML file"
25+
@echo " pickle to make pickle files"
26+
@echo " json to make JSON files"
27+
@echo " htmlhelp to make HTML files and a HTML help project"
28+
@echo " qthelp to make HTML files and a qthelp project"
29+
@echo " devhelp to make HTML files and a Devhelp project"
30+
@echo " epub to make an epub"
31+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
32+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
33+
@echo " text to make text files"
34+
@echo " man to make manual pages"
35+
@echo " changes to make an overview of all changed/added/deprecated items"
36+
@echo " linkcheck to check all external links for integrity"
37+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
38+
39+
clean:
40+
-rm -rf $(BUILDDIR)/*
41+
42+
html:
43+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLDIR)
44+
@echo
45+
@echo "Build finished. The HTML pages are in $(HTMLDIR)."
46+
47+
dirhtml:
48+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
49+
@echo
50+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
51+
52+
singlehtml:
53+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
54+
@echo
55+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
56+
57+
pickle:
58+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
59+
@echo
60+
@echo "Build finished; now you can process the pickle files."
61+
62+
json:
63+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
64+
@echo
65+
@echo "Build finished; now you can process the JSON files."
66+
67+
htmlhelp:
68+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
69+
@echo
70+
@echo "Build finished; now you can run HTML Help Workshop with the" \
71+
".hhp project file in $(BUILDDIR)/htmlhelp."
72+
73+
qthelp:
74+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
75+
@echo
76+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
77+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
78+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/BoostNumPy.qhcp"
79+
@echo "To view the help file:"
80+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/BoostNumPy.qhc"
81+
82+
devhelp:
83+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
84+
@echo
85+
@echo "Build finished."
86+
@echo "To view the help file:"
87+
@echo "# mkdir -p $$HOME/.local/share/devhelp/BoostNumPy"
88+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/BoostNumPy"
89+
@echo "# devhelp"
90+
91+
epub:
92+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
93+
@echo
94+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
95+
96+
latex:
97+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
98+
@echo
99+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
100+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
101+
"(use \`make latexpdf' here to do that automatically)."
102+
103+
latexpdf:
104+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
105+
@echo "Running LaTeX files through pdflatex..."
106+
make -C $(BUILDDIR)/latex all-pdf
107+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
108+
109+
text:
110+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
111+
@echo
112+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
113+
114+
man:
115+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
116+
@echo
117+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
118+
119+
changes:
120+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
121+
@echo
122+
@echo "The overview file is in $(BUILDDIR)/changes."
123+
124+
linkcheck:
125+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
126+
@echo
127+
@echo "Link check complete; look for any errors in the above output " \
128+
"or in $(BUILDDIR)/linkcheck/output.txt."
129+
130+
doctest:
131+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
132+
@echo "Testing of doctests in the sources finished, look at the " \
133+
"results in $(BUILDDIR)/doctest/output.txt."

doc/_static/boost-gil.png

16.7 KB
Loading

0 commit comments

Comments
 (0)