https://gitlab.inria.fr/jrye/mlflow-extra.git
Revision 736f37ee72597e8653b2d26e1cd09f0af60fd2aa authored by Jan-Michael Rye on 27 November 2023, 19:19:43 UTC, committed by Jan-Michael Rye on 27 November 2023, 19:19:43 UTC
1 parent 9920265
Tip revision: 736f37ee72597e8653b2d26e1cd09f0af60fd2aa authored by Jan-Michael Rye on 27 November 2023, 19:19:43 UTC
Restrict CI to main branch
Restrict CI to main branch
Tip revision: 736f37e
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'
]
index_entries = [
]
def skip(_app, _what, name, _obj, would_skip, _options): # pylint: disable=too-many-arguments
'''Customize autodoc member skipping.'''
if name == '__init__':
return False
return would_skip
def setup(app):
'''Connect the skip function.'''
app.connect('autodoc-skip-member', skip)
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}'

Computing file changes ...