Skip to content

Commit f8c45db

Browse files
author
Joe Hamman
authored
Merge pull request #62 from meghanrjones/fix-loader-docs
Update docs setup
2 parents 34ca3f9 + 8ffec20 commit f8c45db

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ var/
2222
*.egg-info/
2323
.installed.cfg
2424
*.egg
25-
doc/_build/
2625

2726
# PyInstaller
2827
# Usually these files are written by a python script from a template
@@ -52,7 +51,8 @@ coverage.xml
5251
*.log
5352

5453
# Sphinx documentation
55-
docs/_build/
54+
doc/_build/
55+
doc/generated/
5656

5757
# PyBuilder
5858
target/

.pre-commit-config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ repos:
3636
rev: v2.6.2
3737
hooks:
3838
- id: prettier
39-
language_version: system
4039

4140
- repo: https://github.com/pre-commit/mirrors-mypy
4241
rev: v0.942

doc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ help:
4848

4949
clean:
5050
rm -rf $(BUILDDIR)/*
51+
rm -rf generated/*
5152

5253
html:
5354
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

doc/conf.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
# type: ignore
1616

17-
import os
1817
import sys
1918

2019
import sphinx_autosummary_accessors
@@ -71,6 +70,8 @@ def setup(app):
7170
app.connect('autodoc-skip-member', skip)
7271

7372

73+
autodoc_mock_imports = ['torch']
74+
7475
# link to github issues
7576
extlinks = {
7677
'issue': ('https://github.com/pangeo-data/xbatcher/issues/%s', 'GH')
@@ -146,18 +147,10 @@ def setup(app):
146147

147148
# -- Options for HTML output ----------------------------------------------
148149

149-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
150-
151-
if not on_rtd: # only import and set the theme if we're building docs locally
152-
import sphinx_rtd_theme
153-
154-
html_theme = 'sphinx_rtd_theme'
155-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
156-
157150
# The theme to use for HTML and HTML Help pages. See the documentation for
158151
# a list of builtin themes.
159152
# tml_theme = 'default'
160-
html_theme = 'sphinx_rtd_theme'
153+
html_theme = 'pangeo_sphinx_book_theme'
161154

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

doc/environment.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- nodefaults
55
dependencies:
6-
- python=3.7
6+
- python=3.8
77
- dask
88
- docrep
99
- ipython
@@ -17,3 +17,5 @@ dependencies:
1717
- sphinx-copybutton
1818
- xarray
1919
- pip
20+
- pip:
21+
- pangeo-sphinx-book-theme

0 commit comments

Comments
 (0)