Skip to content

Commit

Permalink
Merge pull request #16 from kmpaul/main
Browse files Browse the repository at this point in the history
New Theme based on Sphinx Book Theme
  • Loading branch information
Kevin Paul authored Dec 12, 2021
2 parents 2c95094 + 811b58e commit 243b35e
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 28 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ on:
pull_request:

jobs:
pre-commit:

book:
name: Build Jupyter Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: pre-commit/[email protected]
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Download kitchen sink
run: python book/getkitchensink.py book
- name: Build documentation
run: jupyter-book build book

docs:
name: Build Sphinx Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -29,15 +41,15 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jupyter-book
pip install sphinx-click sphinx-inline-tabs sphinxext-rediraffe
pip install -r requirements.txt
pip install -e .
- name: Build documentation
run: jupyter-book build book
run: >
sphinx-build -b html docs docs/_build/html -w warnings.txt
publish:
name: Publish to PyPI
needs: [pre-commit, docs]
needs: [docs, book]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
Expand All @@ -55,4 +67,4 @@ jobs:
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}
password: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
dist/
/build
_build
__pycache__
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: flake8

- repo: https://github.com/psf/black
rev: 21.11b1
rev: 21.12b0
hooks:
- id: black

Expand Down
18 changes: 18 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
python:
version: '3.8'
install:
- requirements: requirements.txt
- method: pip
path: .
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ recursive-exclude src *

exclude .flake8
exclude .pre-commit-config.yaml
exclude .readthedocs.yaml
exclude .web-compile-config.yml
exclude requirements.txt
recursive-exclude ci *.yml

include LICENSE
Expand Down
11 changes: 0 additions & 11 deletions ci/environment.yml

This file was deleted.

15 changes: 8 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@
extensions = [
"ablog",
"myst_nb",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_click.ext",
"sphinx_comments",
"sphinx_copybutton",
"sphinx_external_toc",
"sphinx_design",
"sphinx_external_toc",
"sphinx_inline_tabs",
"sphinx_panels",
"sphinx_thebe",
"sphinx_togglebutton",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinxext.opengraph",
"sphinx_click.ext",
"sphinx_inline_tabs",
"sphinx_panels",
]

comments_config = {"hypothesis": False, "utterances": False}
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ablog
jupyter-book
sphinx-click
sphinx-design
sphinx-inline-tabs
sphinxext-opengraph

0 comments on commit 243b35e

Please sign in to comment.