Skip to content

Commit

Permalink
Merge pull request #56 from SpiNNakerManchester/bug/readthedocs-fix
Browse files Browse the repository at this point in the history
Fix readthedocs build
  • Loading branch information
dkfellows committed Feb 23, 2021
2 parents 4de3f5c + 6b70faa commit 6d8e681
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
1 change: 1 addition & 0 deletions .ratexcludes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/SpiNNUtils/**
**/spinnutilities/**
27 changes: 27 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2017-2019 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

version: 2
build:
image: latest
sphinx:
configuration: docs/source/conf.py
builder: dirhtml
fail_on_warning: false
formats: [pdf] # This is ADDITIONAL to HTML
python:
version: 3.8
install:
- requirements: requirements-docs.txt
10 changes: 6 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import sys
from mock import Mock as MagicMock
import inspect
import spalloc
import os
from spalloc import __version__ as version


class Mock(MagicMock):
Expand Down Expand Up @@ -59,8 +57,12 @@ def __getattr__(cls, name):
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../..'))
sys.path[:0] = [os.path.abspath('.'), os.path.abspath('../..')]

# Note that this has to go AFTER we have updated sys.path!
# This is because RTD doesn't actually install our checkout.
import spalloc # noqa: E402
from spalloc import __version__ as version # noqa: E402

# -- General configuration ------------------------------------------------

Expand Down
3 changes: 3 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

appdirs
-e git+https://github.com/SpiNNakerManchester/SpiNNUtils.git@master#egg=SpiNNUtilities

sphinx >= 2
numpydoc
sentinel
Expand Down

0 comments on commit 6d8e681

Please sign in to comment.