Skip to content

Commit

Permalink
docs: make sure .stack and .neuron_label modules are imported
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Apr 12, 2024
1 parent f647ae5 commit da9fcf8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,36 @@
#
import os
import re
import sys
import numpydoc
import sphinx_bootstrap_theme
import json

import matplotlib as mpl
mpl.use("Agg")

import matplotlib.sphinxext.plot_directive
import matplotlib.pyplot as plt

import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../..'))
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('..'))
# sys.path.insert(0, os.path.abspath('../..'))

import mock
MOCK_MODULES = ['py2cytoscape.data.cyrest_client.CyRestClient',
'rpy2.robjects.packages.importr'
'rpy2.robjects.pandas2ri',
MOCK_MODULES = ['aiohttp',
'dask', 'dask.array', 'da',
'imageio', 'imageio.v3', 'iio',
'xarray', 'xr',
#'zarr', 'zarr.storage', 'zarr.storage.BaseStore', # can't mock Zarr for some reason
'rpy2.robjects.numpy2ri',
'rpy2.robjects.conversion.localconverter']

for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

import pymaid
import pymaid.stack
import pymaid.neuron_label
#from pymaid import cytoscape

from subprocess import check_call as sh
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ ipykernel>=5.1.0
nbsphinx>=0.4.2
numpydoc>=0.9.1
sphinx_bootstrap_theme>=0.7.1
mock
PyQt5~=5.13.0
zarr

0 comments on commit da9fcf8

Please sign in to comment.