Skip to content

Commit 5006b52

Browse files
committed
Merge branch 'master' into 101-int
2 parents ef6a82e + 85a83f8 commit 5006b52

File tree

13 files changed

+86
-9
lines changed

13 files changed

+86
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
*.egg-info/
2+
build/
3+
dist/
14
docs/_build
25
*.egg-info
36
*.py[cod]

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: python
2+
cache: pip
3+
python:
4+
- "2.7"
5+
- "3.4"
6+
- "3.5"
7+
- "3.6"
8+
- "pypy"
9+
- "pypy3"
10+
env:
11+
- SPHINX=">=1.3,<1.4"
12+
- SPHINX=">=1.4,<1.5"
13+
- SPHINX=">=1.5,<1.6"
14+
- SPHINX=">=1.6,<1.7"
15+
install:
16+
# For some reason Travis' build envs have wildly different pip/setuptools
17+
# versions between minor Python versions, and this can cause many hilarious
18+
# corner packaging cases. So...
19+
- pip install -U pip
20+
# Setuptools 34+ seems to get less stable
21+
- pip install 'setuptools>33,<34'
22+
# Install dev requirements
23+
- pip install -r dev-requirements.txt
24+
# Limit Sphinx version re: test matrix
25+
- pip install "sphinx$SPHINX"
26+
# Sanity/debug-friendliness: list what got installed
27+
- pip list --format=columns
28+
# Dev tooling sanity test: can invoke list tasks?
29+
- inv --list
30+
script:
31+
# We have no real tests at present so we just make sure installation works,
32+
# first off.
33+
- pip install .
34+
# Does our own dogfooding website build ok? :D
35+
- inv docs
36+
# I have this in my git pre-push hook, but contributors probably don't
37+
- flake8

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017 Jeff Forcier.
1+
Copyright (c) 2018 Jeff Forcier.
22

33
Based on original work copyright (c) 2011 Kenneth Reitz and copyright (c) 2010
44
Armin Ronacher.

alabaster/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def update_context(app, pagename, templatename, context, doctree):
1515
context['alabaster_version'] = version.__version__
1616

1717
def setup(app):
18+
# add_html_theme is new in Sphinx 1.6+
19+
if hasattr(app, 'add_html_theme'):
20+
theme_path = os.path.abspath(os.path.dirname(__file__))
21+
app.add_html_theme('alabaster', theme_path)
1822
app.connect('html-page-context', update_context)
1923
return {'version': version.__version__,
2024
'parallel_read_safe': True}

alabaster/about.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
3333
<p>
3434
<a href="https://travis-ci.org/{{ path }}">
3535
<img
36-
alt="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
37-
src="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
36+
alt="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
37+
src="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
3838
/>
3939
</a>
4040
</p>
@@ -49,8 +49,8 @@ <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
4949
<p>
5050
<a href="https://codecov.io/github/{{ path }}">
5151
<img
52-
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
53-
src="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
52+
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
53+
src="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
5454
/>
5555
</a>
5656
</p>

alabaster/support.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# flake8: noqa
2+
13
from pygments.style import Style
24
from pygments.token import Keyword, Name, Comment, String, Error, \
35
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal

alabaster/theme.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ github_button = true
1515
github_banner = false
1616
github_type = watch
1717
github_count = true
18+
badge_branch = master
1819
travis_button = false
1920
codecov_button = false
2021
gratipay_user =

dev-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ invoke>=0.10.1
33
invocations>=0.6.2
44
semantic_version>=2.4,<2.5
55
wheel==0.24
6-
twine==1.5
6+
twine==1.11.0
77
releases>=1.2.0,<2.0
8+
flake8==2.4.0

docs/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Changelog
55
* :feature:`18` add optional *next* and *previous* links at the top and bottom
66
of page content. Use theme option ``show_relbars`` to enable these. Credit:
77
William Minchin.
8+
* :support:`- backported` Miscellaneous project maintenance updates such as
9+
adding to Travis CI and enforcing the use of ``flake8``.
10+
* :feature:`110 backported` Add ``badge_branch`` option allowing
11+
configurability of which specific Git branch the Travis, Codecov, etc buttons
12+
default to. Credit: ``@TitanSnow``.
13+
* :support:`111 backported` Add setuptools-level entrypoint for improved theme
14+
distribution compatibility. Thanks to Aaron Carlisle for the patch.
815
* :release:`0.7.10 <2017-02-28>`
916
* :bug:`32` Update styling of various block-level elements such as admonitions
1017
(``.. note::``, ``.. warning::``, etc) and code blocks (``.. code::``) so

docs/customization.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ Variables and feature toggles
104104
``$PROJECT/_static/``) to be used as the banner image instead of the
105105
default.
106106

107+
* ``badge_branch``: Set which branch is used in Travis, CodeCov, etc badges.
108+
Defaults to ``master``.
109+
107110
* ``travis_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
108111
string - used to display a `Travis-CI <https://travis-ci.org>`_ build status
109112
button in the sidebar. If ``true``, uses your ``github_(user|repo)``

0 commit comments

Comments
 (0)