Skip to content

Commit

Permalink
Add source links
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Apr 24, 2024
1 parent 8c882fe commit 61478d3
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,36 @@

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

sys.path.insert(0, os.path.abspath("../src/DataSchemas"))
from aind_behavior_vr_foraging import __version__

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'aind_behavior_vr_foraging'
copyright = '2024, Allen Institute for Neural Dynamics'
author = 'Bruno Cruz'
project = "aind_behavior_vr_foraging"
copyright = "2024, Allen Institute for Neural Dynamics"
author = "Bruno Cruz"
release = __version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx-jsonschema',
"sphinx-jsonschema",
"sphinx_jinja",
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'sphinx.ext.githubpages',
'myst_parser',
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx.ext.githubpages",
"sphinx.ext.linkcode",
"myst_parser",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

autosummary_generate = True

Expand All @@ -53,4 +55,16 @@
html_show_sphinx = False

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = False
html_show_copyright = False


source_code_root = "https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging/tree/main/src/DataSchemas/"


def linkcode_resolve(domain, info):
if domain != "py":
return None
if not info["module"]:
return None
filename = info["module"].replace(".", "/")
return f"{source_code_root}/{filename}.py"

0 comments on commit 61478d3

Please sign in to comment.