Skip to content

Commit e8b508b

Browse files
authored
Add python3 kernel for doc build (#138)
* Add python3 kernel for doc build * Remove Waterwatch from doc * Package for Python 3.12
1 parent 786e811 commit e8b508b

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ name: Python package
55

66
on:
77
push:
8+
branches: ['master']
89
pull_request:
10+
branches: ['master']
911

1012
jobs:
1113
build:
@@ -14,7 +16,7 @@ jobs:
1416
fail-fast: false
1517
matrix:
1618
os: [ubuntu-latest, windows-latest]
17-
python-version: [3.8, 3.9, '3.10', 3.11]
19+
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
1820

1921
steps:
2022
- uses: actions/checkout@v2

.github/workflows/sphinx-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
run: |
2020
python -m pip install --upgrade pip
2121
pip install .[doc]
22+
ipython kernel install --name "python3" --user
2223
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng pandoc
2324
(cd docs && make docs)
2425
(cd docs && make html)

docs/source/conf.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
# If extensions (or modules to document with autodoc) are in another directory,
42
# add these directories to sys.path here. If the directory is relative to the
53
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -32,7 +30,7 @@
3230
'sphinx.ext.viewcode',
3331
'sphinx.ext.githubpages',
3432
'nbsphinx',
35-
'nbsphinx_link'
33+
'nbsphinx_link',
3634
]
3735

3836
# Add any paths that contain templates here, relative to this directory.
@@ -85,7 +83,7 @@
8583
autodoc_default_options = {
8684
'members': True,
8785
'inherited-members': False,
88-
'private-members': True
86+
'private-members': True,
8987
}
9088

9189
# doctest
@@ -108,8 +106,8 @@
108106
# documentation.
109107

110108
html_theme_options = {
111-
"logo_only": False,
112-
"display_version": True,
109+
'logo_only': False,
110+
'display_version': True,
113111
}
114112

115113
# Add any paths that contain custom static files (such as style sheets) here,
@@ -124,5 +122,8 @@
124122
r'https://streamstats.usgs.gov/streamstatsservices/#/',
125123
r'https://www.waterqualitydata.us/public_srsnames/',
126124
r'https://waterqualitydata.us',
127-
r'https://github.com/USGS-python/dataretrieval/tree/master/demos/hydroshare'
125+
r'https://github.com/USGS-python/dataretrieval/tree/master/demos/hydroshare',
128126
]
127+
128+
# Some notebooks have warnings, which nbsphinx should ignore
129+
nbsphinx_allow_errors = True

docs/source/reference/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ API reference
1111
nwis
1212
streamstats
1313
utils
14-
waterwatch
15-
wqp
14+
wqp

docs/source/reference/waterwatch.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source/userguide/dataportals.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@ provided below.
2121
+-----------------------------------+---------------------------------------------------------------+
2222
| Water Quality Portal | https://waterqualitydata.us |
2323
+-----------------------------------+---------------------------------------------------------------+
24-
| WaterWatch | https://waterwatch.usgs.gov |
25-
+-----------------------------------+---------------------------------------------------------------+
2624
| Water Services | https://waterservices.usgs.gov |
27-
+-----------------------------------+---------------------------------------------------------------+
25+
+-----------------------------------+---------------------------------------------------------------+

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ test = [
3434
]
3535
doc = [
3636
"sphinx",
37-
"sphinx_rtd_theme",
37+
"sphinx-rtd-theme",
3838
"nbsphinx",
3939
"nbsphinx_link",
40+
"ipython",
41+
"ipykernel",
42+
"matplotlib",
4043
]
4144
nldi = [
4245
'geopandas>=0.10'

0 commit comments

Comments
 (0)