Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various quick CI fixups #870

Merged
merged 6 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ build/check-doc.build-stamp: doc/build/html/index.html doc/build/html/htmlcov/in
| egrep -C1 -e WARNING -e CRITICAL -e ERROR \
| egrep -v \
-e "warnings.warn\(f'\"{wd.path}\" is shallow and may cause errors'\)" \
-e "No such file or directory: '.*.examples'.$$" \
-e "No such file or directory: '.*.examples'.( \[docutils\]\s*)?$$" \
motus marked this conversation as resolved.
Show resolved Hide resolved
-e 'Problems with "include" directive path:' \
-e 'duplicate object description' \
-e "document isn't included in any toctree" \
Expand Down
53 changes: 28 additions & 25 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""Sphinx configuration for MLOS documentation."""
# pylint: disable=invalid-name

# Configuration file for the Sphinx documentation builder.
#
Expand All @@ -21,30 +23,31 @@

from logging import warning

import sphinx_rtd_theme
import sphinx_rtd_theme # pylint: disable=unused-import


sys.path.insert(0, os.path.abspath('../../mlos_core/mlos_core'))
sys.path.insert(1, os.path.abspath('../../mlos_bench/mlos_bench'))
sys.path.insert(1, os.path.abspath('../../mlos_viz/mlos_viz'))
sys.path.insert(0, os.path.abspath("../../mlos_core/mlos_core"))
sys.path.insert(1, os.path.abspath("../../mlos_bench/mlos_bench"))
sys.path.insert(1, os.path.abspath("../../mlos_viz/mlos_viz"))


# -- Project information -----------------------------------------------------

project = 'MLOS'
copyright = '2024, Microsoft GSL'
author = 'Microsoft GSL'
project = "MLOS"
copyright = "2024, Microsoft GSL" # pylint: disable=redefined-builtin
author = "Microsoft GSL"

# The full version, including alpha/beta/rc tags
try:
from version import VERSION
except ImportError:
VERSION = '0.0.1-dev'
VERSION = "0.0.1-dev"
warning(f"version.py not found, using dummy VERSION={VERSION}")

try:
from setuptools_scm import get_version
version = get_version(root='../..', relative_to=__file__, fallback_version=VERSION)

version = get_version(root="../..", relative_to=__file__, fallback_version=VERSION)
if version is not None:
VERSION = version
except ImportError:
Expand All @@ -60,25 +63,25 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'nbsphinx',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
"nbsphinx",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
# 'sphinx.ext.intersphinx',
# 'sphinx.ext.linkcode',
'numpydoc',
'matplotlib.sphinxext.plot_directive',
'myst_parser',
"numpydoc",
"matplotlib.sphinxext.plot_directive",
"myst_parser",
]

source_suffix = {
'.rst': 'restructuredtext',
".rst": "restructuredtext",
# '.txt': 'markdown',
'.md': 'markdown',
".md": "markdown",
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# generate autosummary even if no references
autosummary_generate = True
Expand All @@ -100,24 +103,24 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', '_templates']
exclude_patterns = ["_build", "_templates"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = "sphinx_rtd_theme"
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
motus marked this conversation as resolved.
Show resolved Hide resolved

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# -- nbsphinx options for rendering notebooks -------------------------------
# nbsphinx_execute = 'never' # enable to stop nbsphinx from executing notebooks
nbsphinx_kernel_name = 'python3'
nbsphinx_kernel_name = "python3"
# Exclude build directory and Jupyter backup files:
exclude_patterns = ['_build', '**.ipynb_checkpoints']
exclude_patterns = ["_build", "**.ipynb_checkpoints"]
3 changes: 3 additions & 0 deletions mlos_core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def _get_long_desc_from_readme(base_url: str) -> dict:
'pandas >= 2.2.0;python_version>="3.9"',
'pandas >= 1.0.3;python_version<"3.9"',
"ConfigSpace>=1.0",
# pyparsing (required by matplotlib and needed for the notebook examples)
# 3.2 has incompatibilities with python 3.8 due to type hints
'pyparsing<3.2; python_version<"3.9"',
motus marked this conversation as resolved.
Show resolved Hide resolved
],
extras_require=extra_requires,
**_get_long_desc_from_readme("https://github.com/microsoft/MLOS/tree/main/mlos_core"),
Expand Down
Loading