Skip to content

Commit

Permalink
sphinx book theme
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed May 7, 2020
1 parent ec1c28a commit d98c056
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 14 deletions.
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 2
jobs:
build_docs:
docker:
- image: circleci/python:3.6-stretch
steps:
# Get our data and merge with upstream
- run: sudo apt-get update
- checkout

- restore_cache:
keys:
- cache-pip

- run: |
pip install --user .[sphinx]
- save_cache:
key: cache-pip
paths:
- ~/.cache/pip

# Build the docs
- run:
name: Build docs to store
command: |
sphinx-build -b html docs/ docs/_build/html
- store_artifacts:
path: docs/_build/html/
destination: html


workflows:
version: 2
default:
jobs:
- build_docs
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ python:
install:
- method: pip
path: .
extra_requirements:
- sphinx
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ matrix:
env: TOXENV=flake8
- python: 3.8
env: TOXENV=dist
- python: 3.8
env: TOXENV=docs
- python: 3.8
env: TOXENV=manifest
install:
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ global-exclude .ipynb_checkpoints
# Binder files to be excluded
exclude binder
recursive-exclude binder *.ipynb
recursive-exclude binder *.txt
recursive-exclude binder *.txt

# Exclude CI/CD files
prune .circleci
14 changes: 6 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'recommonmark'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -91,20 +90,18 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'sphinx_book_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#

html_theme_options = {
'description': 'Execute notebooks',
'github_button': True,
'github_user': 'jupyter',
'github_repo': 'nbclient',
'travis_button': True,
'codecov_button': True,
"path_to_docs": "docs",
"repository_url": "https://github.com/jupyter/nbclient",
"repository_branch": "master",
"use_edit_page_button": True,
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -119,6 +116,7 @@
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {'**': ['about.html', 'navigation.html', 'relations.html', 'searchbox.html']}

html_title = "nbclient"

# -- Options for HTMLHelp output ------------------------------------------

Expand Down
13 changes: 13 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Welcome to nbclient
===================

.. image:: https://img.shields.io/github/stars/jupyter/nbclient?label=stars&style=social
:alt: GitHub stars
:target: https://githu.com/jupyter/nbclient
.. image:: https://img.shields.io/travis/jupyter/nbclient
:alt: Travis (.org)
:target: https://travis-ci.org/jupyter/nbclient
.. image:: https://codecov.io/github/jupyter/nbclient/coverage.svg?branch=master
:alt: CodeCov
:target: https://codecov.io/github/jupyter/nbclient
---

**NBClient** is a tool for executing Jupyter Notebooks.

NBClient lets you:
Expand Down Expand Up @@ -36,6 +47,7 @@ These pages guide you through the installation and usage of nbclient.

.. toctree::
:maxdepth: 1
:caption: Documentation

installation
client
Expand All @@ -50,6 +62,7 @@ this documentation section will help you.

.. toctree::
:maxdepth: 3
:caption: Reference

reference/index.rst
reference/nbclient.tests.rst
Expand Down
3 changes: 1 addition & 2 deletions docs/requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Sphinx>=1.7
sphinx_rtd_theme
recommonmark
sphinx-book-theme
mock
moto
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def read_reqs(fname):
long_description = read(os.path.join(os.path.dirname(__file__), "README.md"))
requirements = read(os.path.join(os.path.dirname(__file__), "requirements.txt"))
dev_reqs = read_reqs(os.path.join(os.path.dirname(__file__), 'requirements-dev.txt'))
extras_require = {"test": dev_reqs, "dev": dev_reqs}
doc_reqs = read_reqs(os.path.join(os.path.dirname(__file__), 'docs/requirements-doc.txt'))
extras_require = {"test": dev_reqs, "dev": dev_reqs, "sphinx": doc_reqs}

setup(
name=name,
Expand Down

0 comments on commit d98c056

Please sign in to comment.