Skip to content

Commit

Permalink
Merge pull request #106 from decarlof/master
Browse files Browse the repository at this point in the history
update readthedocs requirements
  • Loading branch information
decarlof committed Aug 4, 2023
2 parents f07aeb5 + 3bc352c commit b2a221a
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 50 deletions.
15 changes: 15 additions & 0 deletions .readthedocs.yml
@@ -0,0 +1,15 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
sphinx:
configuration: doc/conf.py
python:
install:
- requirements: envs/requirements-doc.txt
submodules:
recursive: false
build:
os: ubuntu-22.04
tools:
python: "3"
108 changes: 62 additions & 46 deletions doc/conf.py
Expand Up @@ -301,49 +301,65 @@
#ztexinfo_no_detailmenu = False

# picked from http://read-the-docs.readthedocs.org/en/latest/faq.html
class Mock(object):

__all__ = []

def __init__(self, *args, **kwargs):
pass

def __call__(self, *args, **kwargs):
return Mock()

@classmethod
def __getattr__(cls, name):
return Mock()
def __mul__(self, other):
return Mock()
def __rmul__(self, other):
return Mock()
def __pow__(self, other):
return Mock()
def __div__(self, other):
return Mock()
def __add__(self, other):
return Mock()
def __radd__(self, other):
return Mock()

MOCK_MODULES = ['h5py',
'numpy',
'tifffile',
'spefile',
'netCDF4',
'EdfFile',
'astropy',
'olefile',
'pandas',
'scipy',
'scipy.misc',
# 'fnmatch',
# 'glob',
# 'collections',
# 'ssl',
# 'urllib3'
]

for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
# class Mock(object):

# __all__ = []

# def __init__(self, *args, **kwargs):
# pass

# def __call__(self, *args, **kwargs):
# return Mock()

# @classmethod
# def __getattr__(cls, name):
# return Mock()
# def __mul__(self, other):
# return Mock()
# def __rmul__(self, other):
# return Mock()
# def __pow__(self, other):
# return Mock()
# def __div__(self, other):
# return Mock()
# def __add__(self, other):
# return Mock()
# def __radd__(self, other):
# return Mock()

# MOCK_MODULES = ['h5py',
# 'numpy',
# 'tifffile',
# 'spefile',
# 'netCDF4',
# 'EdfFile',
# 'astropy',
# 'olefile',
# 'pandas',
# 'scipy',
# 'scipy.misc',
# # 'fnmatch',
# # 'glob',
# # 'collections',
# # 'ssl',
# # 'urllib3'
# ]

# for mod_name in MOCK_MODULES:
# sys.modules[mod_name] = Mock()
# -- Options for Texinfo output -------------------------------------------
# http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports

autodoc_mock_imports = [
'h5py',
'numpy',
'tifffile',
'spefile',
'netCDF4',
'EdfFile',
'astropy',
'olefile',
'pandas',
'scipy',
'scipy.misc',
'cv2',]
4 changes: 2 additions & 2 deletions doc/source/credits.rst
Expand Up @@ -15,8 +15,8 @@ We kindly request that you cite the following article
Code from `algotom <https://github.com/algotom/algotom>`_ :cite:`Vo:21` was used in the reader read_hdf_meta to generate an hdf file tree


References
==========
Reference
---------

.. bibliography:: bibtex/ref.bib
:style: plain
Expand Down
6 changes: 6 additions & 0 deletions envs/requirements-doc.txt
@@ -0,0 +1,6 @@
sphinx <7
sphinx_rtd_theme
sphinxcontrib-bibtex
nbsphinx
pandoc
jupyter
File renamed without changes.
2 changes: 0 additions & 2 deletions requirements-doc.txt

This file was deleted.

0 comments on commit b2a221a

Please sign in to comment.