Skip to content

Commit

Permalink
Merge branch 'master' into 101-int
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed May 14, 2018
2 parents ef6a82e + 85a83f8 commit 5006b52
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.egg-info/
build/
dist/
docs/_build
*.egg-info
*.py[cod]
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
language: python
cache: pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "pypy"
- "pypy3"
env:
- SPHINX=">=1.3,<1.4"
- SPHINX=">=1.4,<1.5"
- SPHINX=">=1.5,<1.6"
- SPHINX=">=1.6,<1.7"
install:
# For some reason Travis' build envs have wildly different pip/setuptools
# versions between minor Python versions, and this can cause many hilarious
# corner packaging cases. So...
- pip install -U pip
# Setuptools 34+ seems to get less stable
- pip install 'setuptools>33,<34'
# Install dev requirements
- pip install -r dev-requirements.txt
# Limit Sphinx version re: test matrix
- pip install "sphinx$SPHINX"
# Sanity/debug-friendliness: list what got installed
- pip list --format=columns
# Dev tooling sanity test: can invoke list tasks?
- inv --list
script:
# We have no real tests at present so we just make sure installation works,
# first off.
- pip install .
# Does our own dogfooding website build ok? :D
- inv docs
# I have this in my git pre-push hook, but contributors probably don't
- flake8
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 Jeff Forcier.
Copyright (c) 2018 Jeff Forcier.

Based on original work copyright (c) 2011 Kenneth Reitz and copyright (c) 2010
Armin Ronacher.
Expand Down
4 changes: 4 additions & 0 deletions alabaster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def update_context(app, pagename, templatename, context, doctree):
context['alabaster_version'] = version.__version__

def setup(app):
# add_html_theme is new in Sphinx 1.6+
if hasattr(app, 'add_html_theme'):
theme_path = os.path.abspath(os.path.dirname(__file__))
app.add_html_theme('alabaster', theme_path)
app.connect('html-page-context', update_context)
return {'version': version.__version__,
'parallel_read_safe': True}
8 changes: 4 additions & 4 deletions alabaster/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
<p>
<a href="https://travis-ci.org/{{ path }}">
<img
alt="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
src="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
alt="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
src="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
/>
</a>
</p>
Expand All @@ -49,8 +49,8 @@ <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
<p>
<a href="https://codecov.io/github/{{ path }}">
<img
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
src="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
src="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
/>
</a>
</p>
Expand Down
2 changes: 2 additions & 0 deletions alabaster/support.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# flake8: noqa

from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
Expand Down
1 change: 1 addition & 0 deletions alabaster/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ github_button = true
github_banner = false
github_type = watch
github_count = true
badge_branch = master
travis_button = false
codecov_button = false
gratipay_user =
Expand Down
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ invoke>=0.10.1
invocations>=0.6.2
semantic_version>=2.4,<2.5
wheel==0.24
twine==1.5
twine==1.11.0
releases>=1.2.0,<2.0
flake8==2.4.0
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ Changelog
* :feature:`18` add optional *next* and *previous* links at the top and bottom
of page content. Use theme option ``show_relbars`` to enable these. Credit:
William Minchin.
* :support:`- backported` Miscellaneous project maintenance updates such as
adding to Travis CI and enforcing the use of ``flake8``.
* :feature:`110 backported` Add ``badge_branch`` option allowing
configurability of which specific Git branch the Travis, Codecov, etc buttons
default to. Credit: ``@TitanSnow``.
* :support:`111 backported` Add setuptools-level entrypoint for improved theme
distribution compatibility. Thanks to Aaron Carlisle for the patch.
* :release:`0.7.10 <2017-02-28>`
* :bug:`32` Update styling of various block-level elements such as admonitions
(``.. note::``, ``.. warning::``, etc) and code blocks (``.. code::``) so
Expand Down
3 changes: 3 additions & 0 deletions docs/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ Variables and feature toggles
``$PROJECT/_static/``) to be used as the banner image instead of the
default.

* ``badge_branch``: Set which branch is used in Travis, CodeCov, etc badges.
Defaults to ``master``.

* ``travis_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
string - used to display a `Travis-CI <https://travis-ci.org>`_ build status
button in the sidebar. If ``true``, uses your ``github_(user|repo)``
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The bare minimum required to install Alabaster is as follows:
Alabaster (as RTD defaults to using its own theme) by adding this line
to your ``conf.py``::

html_theme = ['alabaster']
html_theme = 'alabaster'

* **Either way**, add an explicit ``html_sidebars`` setting so Alabaster's
customized sidebar templates are loaded:
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[bdist_wheel]
universal = 1

[metadata]
license_file = LICENSE

[flake8]
ignore = E124,E125,E128,E261,E301,E302,E303
max-line-length = 79
16 changes: 14 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,29 @@
url='https://alabaster.readthedocs.io',
packages=['alabaster'],
include_package_data=True,
entry_points={
'sphinx.html_themes': [
'alabaster = alabaster',
]
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
],
)

0 comments on commit 5006b52

Please sign in to comment.