8000 Adding Docs pipeline · tableau/document-api-python@fdb0ebd · GitHub
[go: up one dir, main page]

Skip to content

Commit fdb0ebd

Browse files
committed
Adding Docs pipeline
1 parent 601b05c commit fdb0ebd

25 files changed

+1738
-144
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ coverage.xml
5252
# Django stuff:
5353
*.log
5454

55-
# Sphinx documentation
56-
docs/_build/
55+
# Documentation
56+
docs/_site/
57+
docs/.jekyll-metadata
5758

5859
# PyBuilder
5960
target/

.travis.yml

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,49 @@
11
language: python
2-
python:
3-
- "2.7"
4-
- "3.3"
5-
- "3.4"
6-
- "3.5"
7-
- "pypy"
8-
# command to install dependencies
2+
3+
env:
4+
global:
5+
secure: !!binary |
6+
elBwQ2pFZ0wyR3FCQ0xwT2F5LzdCL2JCTHBNSk02ZGJzcDk3UHBGUkNFMmZBWVovTlpFSHB6YVJP
7+
Ykg2NGRMcGlPUDZpQyt3aER4ekpxRTA4aFlXRXc1N0MvcGNjaWZhWldJMGxoM2NsT3VMWDV1Sm90
8+
QVpmZi9vWjREM2N0NzhhNXZxQ1lTTVU2ZXVmSTZDbXM5d3g2L3Rha0c3MGxBQzJvcVM0R0lFUXV4
9+
anNTZFlBcnlsd2xNOHJybkxNUHVlL3NBc2dPcUZnTW1HNzNkUWt2SDBKWmw5VUxuem54dUp2bHRN
10+
R3Q0b1RVa2gxN1dGMWlyUFlDNldqWWRpQXNQeWF1K0NCL3gyY25EdGJFOEVpczl1RHZWZWxFZFc3
11+
K0dkWVF4b1NjME4zWEMvRi9IR0w5L2xKVDF4RVR6c3hDSk4vUERWMW9QVUJwUjJ0RE4yM3RZdWNt
12+
SXhnbzExTWJRUjdoTU5YeVNSNGlseUJKWURxODNpbGNjZWhMdFBTNGhSL3JTcUduU0svV2hPeW1M
13+
d1BRcitZK1luWG8zRTVlUHhzYmJIcmxyejZjbjF6bnlUeXBJL0Rmc2cwWXZtTkV6ekZlalVFbnJI
14+
aTR5eDBuN1dZUElwMGd4N3d4ZUpFUmdWNm5XQW9Pb0w0UVNIU1lLWG54Rjk0NkZ5Y3J0QmlVc3hS
15+
NFlNRHlMY1lKRGUxTWZTblVWUFhtSEYzUmJlVmxIQzFKWHZ0RittUFFGSXdlSjZHaWRMTE1rSlhC
16+
VkVjNFBMbnk1VkNOMHRPWUhpdlU4MDYwSGg4K0N0Rk9zWnh1VUM3OWRhNDRvQ2huSnBiM0VtUHUw
17+
OWVxRjRuVGk0R3NGdUNZVFFubi9aMHBCdVZCRUpVNWtoTTJzZGNyWEJiWlFKeTRQVWppYkNSc1U9
18+
919
install:
10-
- "pip install -e ."
11-
- "pip install pep8"
12-
# command to run tests
20+
- pip install -e .
21+
- pip install pycodestyle
22+
- pip install mkdocs
23+
- pip install pymdown-extensions
24+
- chmod +x ./deploy-docs.sh
25+
26+
matrix:
27+
include:
28+
- os: linux
29+
python: 2.7
30+
- os: linux
31+
python: 3.3
32+
- os: linux
33+
python: 3.4
34+
- os: linux
35+
env: BUILD_DOCS="true"
36+
python: 3.5
37+
- os: linux
38+
python: pypy
39+
1340
script:
14-
# Tests
15-
- python setup.py test
16-
# pep8
17-
- pep8 .
18-
# Examples
19-
- (cd "samples/replicate-workbook" && python replicate_workbook.py)
20-
- (cd "samples/list-tds-info" && python list_tds_info.py)
21-
- (cd "samples/show-fields" && python show_fields.py)
41+
- python setup.py test
42+
- pycodestyle .
43+
- (cd "samples/replicate-workbook" && python replicate_workbook.py)
44+
- (cd "samples/list-tds-info" && python list_tds_info.py)
45+
- (cd "samples/show-fields" && python show_fields.py)
46+
- mkdocs build -s --clean
2247

48+
after_success:
49+
- bash deploy-docs.sh

contributing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Contributing
1+
---
2+
title: Contributing
3+
layout: docs
4+
---
25

36
We welcome contributions to this project!
47

deploy-docs.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -o errexit -o nounset
4+
5+
if [ "$TRAVIS_BRANCH" != "master" -o "$BUILD_DOCS" != "true" ]
6+
then
7+
echo "Not deploying docs"
8+
exit 0
9+
fi
10+
11+
rev=$(git rev-parse --short HEAD)
12+
13+
cd site
14+
15+
git init
16+
git config user.name "T8y8"
17+
git config user.email "kingt8y8@gmail.com"
18+
19+
20+
git remote add upstream "https://$GH_TOKEN@github.com/t8y8/document-api-python.git"
21+
git fetch upstream
22+
git reset upstream/gh-pages
23+
24+
touch .
25+
26+
git add -A .
27+
git commit -m "auto-build rebuild pages at ${rev}"
28+
git push -q upstream HEAD:gh-pages

docs/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages', group: :jekyll_plugins
3+

docs/Gemfile.lock

< EED3 span aria-hidden="true" class="f6 text-bold fgColor-success">+129Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
activesupport (4.2.6)
5+
i18n (~> 0.7)
6+
json (~> 1.7, >= 1.7.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
addressable (2.4.0)
11+
coffee-script (2.4.1)
12+
coffee-script-source
13+
execjs
14+
coffee-script-source (1.10.0)
15+
colorator (0.1)
16+
ethon (0.9.0)
17+
ffi (>= 1.3.0)
18+
execjs (2.7.0)
19+
faraday (0.9.2)
20+
multipart-post (>= 1.2, < 3)
21+
ffi (1.9.10)
22+
ffi (1.9.10-x86-mingw32)
23+
gemoji (2.1.0)
24+
github-pages (80)
25+
github-pages-health-check (= 1.1.0)
26+
jekyll (= 3.1.6)
27+
jekyll-coffeescript (= 1.0.1)
28+
jekyll-feed (= 0.5.1)
29+
jekyll-gist (= 1.4.0)
30+
jekyll-github-metadata (= 1.11.1)
31+
jekyll-mentions (= 1.1.2)
32+
jekyll-paginate (= 1.1.0)
33+
jekyll-redirect-from (= 0.10.0)
34+
jekyll-sass-converter (= 1.3.0)
35+
jekyll-seo-tag (= 1.4.0)
36+
jekyll-sitemap (= 0.10.0)
37+
jemoji (= 0.6.2)
38+
kramdown (= 1.10.0)
39+
liquid (= 3.0.6)
40+
listen (= 3.0.6)
41+
mercenary (~> 0.3)
42+
rouge (= 1.10.1)
43+
terminal-table (~> 1.4)
44+
github-pages-health-check (1.1.0)
45+
addressable (~> 2.3)
46+
net-dns (~> 0.8)
47+
octokit (~> 4.0)
48+
public_suffix (~> 1.4)
49+
typhoeus (~> 0.7)
50+
html-pipeline (2.4.1)
51+
activesupport (>= 2, < 5)
52+
nokogiri (>= 1.4)
53+
i18n (0.7.0)
54+
jekyll (3.1.6)
55+
colorator (~> 0.1)
56+
jekyll-sass-converter (~> 1.0)
57+
jekyll-watch (~> 1.1)
58+
kramdown (~> 1.3)
59+
liquid (~> 3.0)
60+
mercenary (~> 0.3.3)
61+
rouge (~> 1.7)
62+
safe_yaml (~> 1.0)
63+
jekyll-coffeescript (1.0.1)
64+
coffee-script (~> 2.2)
65+
jekyll-feed (0.5.1)
66+
jekyll-gist (1.4.0)
67+
octokit (~> 4.2)
68+
jekyll-github-metadata (1.11.1)
69+
octokit (~> 4.0)
70+
jekyll-mentions (1.1.2)
71+
html-pipeline (~> 2.3)
72+
jekyll (~> 3.0)
73+
jekyll-paginate (1.1.0)
74+
jekyll-redirect-from (0.10.0)
75+
jekyll (>= 2.0)
76+
jekyll-sass-converter (1.3.0)
77+
sass (~> 3.2)
78+
jekyll-seo-tag (1.4.0)
79+
jekyll (~> 3.0)
80+
jekyll-sitemap (0.10.0)
81+
jekyll-watch (1.4.0)
82+
listen (~> 3.0, < 3.1)
83+
jemoji (0.6.2)
84+
gemoji (~> 2.0)
85+
html-pipeline (~> 2.2)
86+
jekyll (>= 3.0)
87+
json (1.8.3)
88+
kramdown (1.10.0)
89+
liquid (3.0.6)
90+
listen (3.0.6)
91+
rb-fsevent (>= 0.9.3)
92+
rb-inotify (>= 0.9.7)
93+
mercenary (0.3.6)
94+
mini_portile2 (2.0.0)
95+
minitest (5.9.0)
96+
multipart-post (2.0.0)
97+
net-dns (0.8.0)
98+
nokogiri (1.6.7.2)
99+
mini_portile2 (~> 2.0.0.rc2)
100+
nokogiri (1.6.7.2-x86-mingw32)
101+
mini_portile2 (~> 2.0.0.rc2)
102+
octokit (4.3.0)
103+
sawyer (~> 0.7.0, >= 0.5.3)
104+
public_suffix (1.5.3)
105+
rb-fsevent (0.9.7)
106+
rb-inotify (0.9.7)
107+
ffi (>= 0.5.0)
108+
rouge (1.10.1)
109+
safe_yaml (1.0.4)
110+
sass (3.4.22)
111+
sawyer (0.7.0)
112+
addressable (>= 2.3.5, < 2.5)
113+
faraday (~> 0.8, < 0.10)
114+
terminal-table (1.5.2)
115+
thread_safe (0.3.5)
116+
typhoeus (0.8.0)
117+
ethon (>= 0.8.0)
118+
tzinfo (1.2.2)
119+
thread_safe (~> 0.1)
120+
121+
PLATFORMS
122+
ruby
123+
x86-mingw32
124+
125+
DEPENDENCIES
126+
github-pages
127+
128+
BUNDLED WITH
129+
1.12.5

docs/_config.yml

Lines changed: 1 10000 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Site settings
2+
title: Tableau Document API
3+
email: jdominguez@tableau.com
4+
description: Programmatically update your Tableau workbooks and data sources.
5+
baseurl: "/document-api-python"
6+
permalinks: pretty
7+
defaults:
8+
-
9+
scope:
10+
path: "" # Apply to all files
11+
values:
12+
layout: "default"
13+
14+
# Build settings
15+
markdown: kramdown
16+
highlighter: rouge
17+

docs/_includes/docs_menu.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="well docs-menu col-xs-12 col-sm-4 col-md-3">
2+
<ul class="nav nav-list">
3+
<li>
4+
<a href="{{ site.baseurl }}/docs">Get Started</a>
5+
</li>
6+
<li>
7+
<a href="{{ site.baseurl }}/docs/api-ref">API Reference</a>
8+
</li>
9+
<li>
10+
<a href="{{ site.baseurl }}/docs/dev-guide">Developer Guide</a>
11+
</li>
12+
<li>
13+
<a href="{{ site.baseurl }}/docs/contributing">Contributing</a>
14+
</li>
15+
</ul>
16+
</div>

docs/_includes/footer.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- Footer -->
2+
<footer>
3+
<div class="row">
4+
<hr class="footer-hr">
5+
<p>This site is open source. Suggestions and pull requests are welcome on our <a href="https://github.com/tableau/document-api-python">GitHub page</a>.</p>
6+
<p>(c) Copyright 2016 Tableau</p>
7+
</div>
8+
</footer>

docs/_includes/head.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<meta charset="utf-8">
2+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
5+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
6+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
7+
8+
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/logo.png">
9+
10+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
11+
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
12+
<link rel="stylesheet" href="{{ site.baseurl }}/css/github-highlight.css">
13+
14+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
15+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

docs/_includes/header.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<header class="site-header">
2+
<div class="wrapper">
3+
<nav class="navbar navbar-default navbar-fixed-top">
4+
<div class="container">
5+
<div class="navbar-header">
6+
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
7+
<span class="sr-only">Toggle navigation</span>
8+
<span class="icon-bar"></span>
9+
<span class="icon-bar"></span>
10+
<span class="icon-bar"></span>
11+
</button>
12+
<a class="navbar-brand navbar-brand-logo" href="{{ site.baseurl }}/#">Tableau Document API Python</a>
13+
</div>
14+
<div id="navbar" class="navbar-collapse collapse">
15+
<ul class="nav navbar-nav">
16+
<li><a href="{{ site.baseurl }}/docs/">Docs</a></li>
17+
<li><a href="{{ site.baseurl }}/docs/api-ref">API Reference</a></li>
18+
<li><a target="_blank" href="https://community.tableau.com/community/developers/content">Forum</a></li>
19+
<!-- <li><a href="{{ site.baseurl }}/news/">What's New?</a></li> -->
20+
</ul>
21+
<ul class="nav navbar-nav navbar-right">
22+
<li class="tableauIcon"><a target="_blank" href="http://tableau.com"><img src="{{ site.baseurl }}/assets/logo.png" alt="Tableau Developers" class="logo" /></a></li>
23+
<li><a target="_blank" href="https://github.com/tableau/document-api-python"><span class="icon icon--github" title="Document API on GitHub" alt="Document API on GitHub">{% include icon-github.svg %}</span></a></li>
24+
</ul>
25+
</div>
26+
</div>
27+
</nav>
28+
</div>
29+
</header>

docs/_includes/icon-github.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/_layouts/default.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
{% include head.html %}
6+
</head>
7+
8+
<body>
9+
<div class="container">
10+
{% include header.html %}
11+
<ul class="blogul">
12+
{% for post in site.posts %}
13+
<div class="row">
14+
<h1>{{ post.title }}</h1>
15+
<hr>
16+
<p><span class="glyphicon glyphicon-time"></span> Posted on {{ post.date | date: "%-d %B %Y" }}</p>
17+
<hr>
18+
<p class="lead">
19+
{{ post.abstract }}
20+
</p>
21+
{% if post.photoname %}
22+
<img class="img-responsive" src="{{ site.baseurl }}/assets/{{ post.photoname}}" alt=""> {% endif %}
23+
<hr>
24+
<div class="blog-content">
25+
{{ post.content }}
26+
</div>
27+
</div>
28+
{% endfor %}
29+
</ul>
30+
{% include footer.html %}
31+
</div>
32+
</body>
33+
34+
</html>

0 commit comments

Comments
 (0)
0