repo_helper_sphinx_theme¶
Sphinx Theme for repo_helper.
This is a modified version of the alabaster theme.
Docs |
|
---|---|
Tests |
|
PyPI |
|
Activity |
|
QA |
|
Other |
Installation¶
python3 -m pip install repo_helper_sphinx_theme --user
python3 -m pip install git+https://github.com/domdfcoding/repo_helper_sphinx_theme@master --user
The theme can then be enabled by setting it in your conf.py
file:
html_theme = "repo_helper_sphinx_theme"
Customisation¶
repo_helper_sphinx_theme
is based on the alabaster theme.
See https://alabaster.readthedocs.io/en/latest/customization.html for information on customising the theme.
Static path for images and/or custom stylesheet¶
If you’re using any of the image-related options (logo
or touch-icon
) or a custom stylesheet,
you’ll also want to tell Sphinx where to get these files from. If so, add a
line like this (changing the path if necessary; see the Sphinx docs for
‘html_static_path’) to your conf.py
:
html_static_path = ["_static"]
Overview¶
repo_helper Theme
uses tox to automate testing and packaging,
and pre-commit to maintain code quality.
Install pre-commit
with pip
and install the git hook:
python -m pip install pre-commit
pre-commit install
Coding style¶
formate is used for code formatting.
It can be run manually via pre-commit
:
pre-commit run formate -a
Or, to run the complete autoformatting suite:
pre-commit run -a
Automated tests¶
Tests are run with tox
and pytest
.
To run tests for a specific Python version, such as Python 3.6:
tox -e py36
To run tests for all Python versions, simply run:
tox
Type Annotations¶
Type annotations are checked using mypy
. Run mypy
using tox
:
tox -e mypy
Build documentation locally¶
The documentation is powered by Sphinx. A local copy of the documentation can be built with tox
:
tox -e docs
License¶
repo_helper Theme
is licensed under the BSD 3-Clause “New” or “Revised” License
A permissive license similar to the BSD 2-Clause License, but with a 3rd clause that prohibits others from using the name of the copyright holder or its contributors to promote derived products without written consent.
Permissions | Conditions | Limitations |
---|---|---|
|
|
Copyright (c) 2020 Dominic Davis-Foster.
Based on Alabaster: https://github.com/bitprophet/alabaster/
Copyright (c) 2020 Jeff Forcier.
Based on original work copyright (c) 2011 Kenneth Reitz and copyright (c) 2010
Armin Ronacher.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Downloading source code¶
The repo_helper Theme
source code is available on GitHub,
and can be accessed from the following URL: https://github.com/repo-helper/repo_helper_sphinx_theme
If you have git
installed, you can clone the repository with the following command:
git clone https://github.com/repo-helper/repo_helper_sphinx_theme
Cloning into 'repo_helper_sphinx_theme'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 173 (delta 16), reused 17 (delta 6), pack-reused 126
Receiving objects: 100% (173/173), 126.56 KiB | 678.00 KiB/s, done.
Resolving deltas: 100% (66/66), done.

Downloading a ‘zip’ file of the source code¶
Building from source¶
The recommended way to build repo_helper Theme
is to use tox:
tox -e build
The source and wheel distributions will be in the directory dist
.
If you wish, you may also use pep517.build or another PEP 517-compatible build tool.
View the Function Index or browse the Source Code.