Permalink
Browse files

Improve docs (#43)

Minor: Adding documentation.
  • Loading branch information...
mortenvp committed Jun 29, 2018
1 parent 6061706 commit 0c31b38d5822bf2b234ee237fd124fc5e7bd051c
Showing with 42 additions and 21 deletions.
  1. +1 −1 NEWS.rst
  2. +5 −0 README.rst
  3. +2 −1 buildbot.py
  4. +13 −16 giit.json
  5. +21 −3 wscript
View
@@ -6,7 +6,7 @@ every change, see the Git log.
Latest
------
* tbd
* Minor: Adding documentation.
6.2.0
-----
View
@@ -64,6 +64,11 @@ simpler. See this example of how ``function_to_test`` is tested:
.. contents:: Table of Contents:
:local:
API documentation
-----------------
* http://steinwurf.github.io/stub/
Usage
-----
The ``stub::function`` object act like a "sink" for function calls
View
@@ -57,7 +57,8 @@ def build(properties):
def docs(properties):
command = [sys.executable, 'waf', 'docs', '-v']
command = [sys.executable, 'waf', 'docs',
'--publish', '--publish_clean', '-v']
run_command(command)
View
@@ -7,14 +7,17 @@
"requirements": "${source_path}/docs/requirements.txt",
"cwd": "${source_path}/docs",
"tag_semver_filter": ">6.2.0",
"branches": [
"origin/master"
],
"scope": [
"tag",
"source_branch",
"branch",
"workingtree"
],
"variables": {
"source_branch:master:output_path": "${build_path}/docs/latest",
"source_branch:output_path": "${build_path}/sphinx/${name}",
"branch:origin/master:output_path": "${build_path}/docs/latest",
"branch:output_path": "${build_path}/sphinx/${name}",
"tag:output_path": "${build_path}/docs/${name}",
"workingtree:output_path": "${build_path}/workingtree/sphinx"
}
@@ -25,29 +28,23 @@
"python generate.py --docspath=${build_path}/docs --outpath=${output_path}"
],
"requirements": "${source_path}/landing_page/requirements.txt",
"branches": [
"origin/master"
],
"cwd": "${source_path}/landing_page",
"variables": {
"source_branch:master:output_path": "${build_path}/docs",
"source_branch:output_path": "${build_path}/landing_page/${name}",
"branch:origin/master:output_path": "${build_path}",
"branch:output_path": "${build_path}/landing_page/${name}",
"workingtree:output_path": "${build_path}/workingtree/landing_page"
}
},
"publish": {
"type": "sftp",
"hostname": "buildbot.steinwurf.dk",
"username": "buildbot",
"remote_path": "/tmp/www/docs/stub",
"local_path": "${build_path}",
"exclude_patterns": [
"${build_path}/workingtree/*"
]
},
"gh_pages": {
"type": "push",
"target_branch": "gh-pages",
"nojekyll": true,
"to_path": ".",
"from_path": "${build_path}/docs",
"publish_url": "http://steinwurf.github.io/stub/",
"from_path": "${build_path}",
"git_url": "git@github.com:steinwurf/stub.git",
"exclude_patterns": [
"${build_path}/workingtree/*"
View
24 wscript
@@ -18,6 +18,16 @@ class DocsContext(BuildContext):
fun = 'docs'
def options(opt):
opt.add_option(
'--publish', default=False, action='store_true',
help='Publish the documentation.')
opt.add_option(
'--publish_clean', default=False, action='store_true',
help='Remove any existing docs before pushing.')
def resolve(ctx):
# Testing dependencies
@@ -55,16 +65,24 @@ def docs(ctx):
venv.env['PATH'] = os.path.pathsep.join(
[venv.env['PATH'], os.environ['PATH']])
venv.pip_install(packages=['giit'])
giit = 'git+https://github.com/steinwurf/giit.git@remove-checkout'
venv.pip_install(packages=['giit==3.0.0'])
if ctx.options.publish_clean:
venv.run('giit clean .',
cwd=ctx.path.abspath())
venv.run('giit sphinx .',
cwd=ctx.path.abspath())
venv.run('giit landing_page .',
cwd=ctx.path.abspath())
venv.run('giit gh_pages .',
cwd=ctx.path.abspath())
if ctx.options.publish:
venv.run('giit gh_pages .',
cwd=ctx.path.abspath())
def _create_virtualenv(bld):

0 comments on commit 0c31b38

Please sign in to comment.