A global ENV variable based switch is added (DATALAD_CORE_LOGGER_ENABLE), which, when set, prevents the disabling of the `datalad_core`-scoped logger. A fully disabled logger is the default and expected behavior for a library. In addition, a `datalad_core_logger` test fixture is provided that enables a TRACE-level logger (-> stderr) for an individual test. Arguable, debugging a single test like this is more common then running all tests with full logging. In contrast to legacy-datalad, there is no log *rendering* code to be tested in the library.
48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# For the full list of built-in configuration values, see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
|
|
import datalad_core
|
|
|
|
project = 'datalad-core'
|
|
copyright = '2024-2026, DataLad team'
|
|
author = 'DataLad team'
|
|
release = datalad_core.__version__
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
extensions = [
|
|
'sphinx.ext.autosummary',
|
|
'sphinx.ext.autodoc',
|
|
'sphinx_autodoc_typehints',
|
|
'sphinx.ext.viewcode',
|
|
]
|
|
|
|
templates_path = ['_templates']
|
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
|
primary_domain = 'py'
|
|
autoclass_content = "both"
|
|
|
|
typehints_use_signature = True
|
|
typehints_use_signature_return = True
|
|
|
|
# we build some docstrings from loguru. define some no-op substitutions
|
|
# to avoid errors
|
|
rst_prolog = """
|
|
.. |Logger| replace:: Logger
|
|
.. |add| replace:: add
|
|
.. |sys.stderr| replace:: sys.stderr
|
|
.. |str.format| replace:: str.format
|
|
"""
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|
|
html_static_path = ['_static']
|