https://gitlab.inria.fr/jrye/mlflow-extra.git
Tip revision: fea71bf11644d91d887f70e25c07904ef0aca9eb authored by Jan-Michael Rye on 02 April 2023, 10:09:39 UTC
Capitalize first letter of all log messages
Capitalize first letter of all log messages
Tip revision: fea71bf
conf.py
#!/usr/bin/env python3
'''
Sphinx configuration file.
'''
# pylint: disable=invalid-name,redefined-builtin
import importlib
import pathlib
import sys
source_code = '../../src'
git_url = 'https://gitlab.inria.fr/jrye/mlflow-extra'
this_path = pathlib.Path(__file__).resolve()
sys.path.insert(0, str((this_path.parent / source_code).resolve()))
author = 'Jan-Michael Rye'
copyright = '2022, Inria'
project = 'MLflow Extra'
html_theme = 'sphinx_rtd_theme'
autodoc_mock_imports = [
'mlflow',
'pandas',
'yaml'
]
extensions = [
'myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.linkcode',
'sphinx.ext.napoleon',
'sphinx.ext.todo'
]
def linkcode_resolve(domain, info):
'''Get source links for the linkcode extension.'''
module = info['module']
if domain != 'py' or not module:
return None
top_mod = importlib.import_module(module.split('.')[0])
mod = importlib.import_module(module)
top_mod_path = pathlib.Path(top_mod.__file__)
mod_path = pathlib.Path(mod.__file__)
subpath = str(mod_path.relative_to(top_mod_path.parent.parent))
return f'{git_url}/-/blob/main/src/{subpath}'
