Skip to content

Commit

Permalink
Fix sphinx apidoc exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Feb 16, 2024
1 parent b7deca6 commit e76965d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,14 @@ def __call__(self, filename):

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build', 'test.py', "../../src/pynwb/retinotopy.py",]
exclude_patterns = ['_build', 'test.py']

# List of patterns, relative to source directory, of modules to be
# excluded by apidoc when generating rst files.
apidoc_exclude = [
"../../src/pynwb/retinotopy.py",
]

# # This value contains a list of modules to be mocked up. This is useful
# # when some external dependencies are not met at build time and break the
# # building process.
# autodoc_mock_imports = [
# 'pynwb.retinotopy',
# ]

# The reST default role (used for this markup: `text`) to use for all documents.
# default_role = None

Expand Down Expand Up @@ -424,7 +417,8 @@ def run_apidoc(_):
out_dir = os.path.dirname(__file__)
src_dir = os.path.join(out_dir, '../../src')
sys.path.append(src_dir)
apidoc_main(['-f', '-e', '--no-toc', '-o', out_dir, src_dir, *apidoc_exclude])
apidoc_exclude_abs = [os.path.join(out_dir, f) for f in apidoc_exclude]
apidoc_main(['-f', '-e', '--no-toc', '-o', out_dir, src_dir, *apidoc_exclude_abs])


from abc import abstractproperty
Expand Down

0 comments on commit e76965d

Please sign in to comment.