Skip to content

Commit e4c8ebd

Browse files
authored
Merge pull request #687 from CGATOxford/{IS}_fix_rtd
RTD fixes ahead of new documentation
2 parents 77e186c + 78e25ca commit e4c8ebd

4 files changed

Lines changed: 58 additions & 12 deletions

File tree

.readthedocs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.12"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: doc/conf.py
20+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21+
# builder: "dirhtml"
22+
# Fail on all warnings to avoid broken references
23+
# fail_on_warning: true
24+
25+
# Optionally build your docs in additional formats such as PDF and ePub
26+
# formats:
27+
# - pdf
28+
# - epub
29+
30+
# Optional but recommended, declare the Python requirements required
31+
# to build your documentation
32+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33+
python:
34+
install:
35+
- requirements: doc/requirements.txt

doc/conf.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,23 @@
1212
# add these directories to sys.path here. If the directory is relative to the
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
#
15-
# import os
16-
# import sys
17-
# sys.path.insert(0, os.path.abspath('.'))
15+
import os
16+
import sys
17+
sys.path.insert(0, os.path.abspath('..'))
18+
19+
from mock import Mock as MagicMock
20+
21+
class Mock(MagicMock):
22+
@classmethod
23+
def __getattr__(cls, name):
24+
return MagicMock()
25+
26+
MOCK_MODULES = [ 'numpy',
27+
'pandas',
28+
'pysam',
29+
'regex', "umi_tools._dedup_umi",
30+
"umi_tools.whitelist_methods"]
31+
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
1832

1933
from recommonmark.parser import CommonMarkParser
2034

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
.. image:: https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?url=https://cloud.githubusercontent.com/assets/6096414/19521726/a4dea98e-960c-11e6-806a-a18ff04a391e.png&container=focus&resize_w=550
6+
.. image:: https://cloud.githubusercontent.com/assets/6096414/19521726/a4dea98e-960c-11e6-806a-a18ff04a391e.png
77

88
Tools for dealing with Unique Molecular Identifiers
99
====================================================

doc/requirements.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
setuptools>=1.1
2-
numpy>=1.7
3-
pandas>=0.12.0
4-
pysam>=0.9
51
future
6-
six
7-
regex
8-
scipy
9-
matplotlib
2+
mock
103
sphinx-markdown-tables
4+
commonmark
5+
recommonmark
6+
sphinx-rtd-theme
7+

0 commit comments

Comments
 (0)