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

Enable black, isort, and doc formatters and checks #774

Merged
merged 57 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2df4bd4
Enable black and isort
bpkroth Jul 3, 2024
96b233c
remove autopep8
bpkroth Jul 3, 2024
949f2cd
Enable black and isort formatters in vscode
bpkroth Jul 3, 2024
ebd406e
adjust line length for other checkers
bpkroth Jul 3, 2024
87480d0
isort applied
bpkroth Jul 3, 2024
1b9843a
black formatting
bpkroth Jul 3, 2024
ae3bd62
incompatible rules between flake and black and pycodestyle
bpkroth Jul 3, 2024
8af6eac
enable string quote consistency checks
bpkroth Jul 3, 2024
a6d3214
Revert "black formatting"
bpkroth Jul 8, 2024
08baf0f
Revert "adjust line length for other checkers"
bpkroth Jul 8, 2024
49a73dc
make black use a longer line length for now
bpkroth Jul 8, 2024
857d694
decrease line length to a longer line than black defaults to but stil…
bpkroth Jul 8, 2024
9c3267c
reformat with black at line length 99
bpkroth Jul 8, 2024
af71e04
tweaks for comments for new line length
bpkroth Jul 8, 2024
d68712b
Revert "tweaks for comments for new line length"
bpkroth Jul 8, 2024
93943c7
Revert "reformat with black at line length 99"
bpkroth Jul 8, 2024
648ca63
Revert "decrease line length to a longer line than black defaults to …
bpkroth Jul 8, 2024
67c0219
isort change fixups
bpkroth Jul 8, 2024
23e218b
minor tweak for ripgrep so that --hidden option works to search dot f…
bpkroth Jul 8, 2024
ed6d7e0
add docformatter to aid black
bpkroth Jul 8, 2024
b28caa7
enable docformatter for docstrings as well
bpkroth Jul 8, 2024
41015a7
fixups
bpkroth Jul 8, 2024
d2f9fa6
tweaks
bpkroth Jul 8, 2024
c4537f8
fixups
bpkroth Jul 8, 2024
dd1d30d
doc style tweaks
bpkroth Jul 8, 2024
69bcc9f
fixups - run on all files
bpkroth Jul 8, 2024
bb2f4da
tweaks
bpkroth Jul 8, 2024
ee06185
docformatter applied
bpkroth Jul 8, 2024
ec1ba4d
restore shorter line lengths change
bpkroth Jul 8, 2024
01f43b3
reformat with black and lots of manual fixups for errors or missing t…
bpkroth Jul 8, 2024
382086a
comments
bpkroth Jul 8, 2024
ddd4d1e
tweak for consistency
bpkroth Jul 8, 2024
0094a81
some line by line tweaks to black reformatting rules
bpkroth Jul 8, 2024
be41f76
Merge branch 'main' into enable-black-isort-reformatting
bpkroth Jul 8, 2024
dd67302
let docstrings get reformatted again
bpkroth Jul 8, 2024
8f2efb5
more line by line tweaks
bpkroth Jul 8, 2024
a6aa7bf
comments
bpkroth Jul 8, 2024
8cea74d
more line by line tweaks
bpkroth Jul 10, 2024
839b96a
tweaks
bpkroth Jul 10, 2024
d811da5
tweaks
bpkroth Jul 10, 2024
a31e842
tweaks
bpkroth Jul 10, 2024
ef71a8b
tweaks
bpkroth Jul 10, 2024
0f3dbf1
tweaks
bpkroth Jul 10, 2024
3637e25
tweaks
bpkroth Jul 10, 2024
b062a84
tweawks
bpkroth Jul 10, 2024
76c4f67
tweaks
bpkroth Jul 10, 2024
948ba2a
reformat some single line args to multiline
bpkroth Jul 10, 2024
b17696b
CI fixups (#783)
bpkroth Jul 10, 2024
2670ab7
formats
bpkroth Jul 10, 2024
d892b58
tweak
bpkroth Jul 10, 2024
77e2635
reformat for multiline args
bpkroth Jul 10, 2024
b51153f
multiline args
bpkroth Jul 10, 2024
ad1982e
tweaks
bpkroth Jul 10, 2024
fb56118
tweaks
bpkroth Jul 10, 2024
605e4ab
Merge branch 'main' into enable-black-isort-reformatting
bpkroth Jul 10, 2024
420b458
Merge remote-tracking branch 'upstream/main' into enable-black-isort-…
bpkroth Jul 12, 2024
8afeec6
format
bpkroth Jul 12, 2024
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
6 changes: 2 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
// Adjust the python interpreter path to point to the conda environment
"python.defaultInterpreterPath": "/opt/conda/envs/mlos/bin/python",
"python.testing.pytestPath": "/opt/conda/envs/mlos/bin/pytest",
"python.formatting.autopep8Path": "/opt/conda/envs/mlos/bin/autopep8",
"python.linting.pylintPath": "/opt/conda/envs/mlos/bin/pylint",
"pylint.path": [
"/opt/conda/envs/mlos/bin/pylint"
Expand All @@ -71,9 +70,8 @@
"lextudio.restructuredtext",
"matangover.mypy",
"ms-azuretools.vscode-docker",
// TODO: Enable additional formatter extensions:
//"ms-python.black-formatter",
//"ms-python.isort",
"ms-python.black-formatter",
"ms-python.isort",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ charset = utf-8
# Note: this is not currently supported by all editors or their editorconfig plugins.
max_line_length = 132

[*.py]
max_line_length = 99

# Makefiles need tab indentation
[{Makefile,*.mk}]
indent_style = tab
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Ignore git directory (ripgrep)
.git/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ load-plugins=

[FORMAT]
# Maximum number of characters on a single line.
max-line-length=132
max-line-length=99

[MESSAGE CONTROL]
disable=
Expand All @@ -48,5 +48,5 @@ disable=
missing-raises-doc

[STRING]
#check-quote-consistency=yes
check-quote-consistency=yes
check-str-concat-over-line-jumps=yes
5 changes: 2 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"lextudio.restructuredtext",
"matangover.mypy",
"ms-azuretools.vscode-docker",
// TODO: Enable additional formatter extensions:
//"ms-python.black-formatter",
//"ms-python.isort",
"ms-python.black-formatter",
"ms-python.isort",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
10 changes: 3 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,10 @@
],
"esbonio.sphinx.confDir": "${workspaceFolder}/doc/source",
"esbonio.sphinx.buildDir": "${workspaceFolder}/doc/build/",
"autopep8.args": [
"--experimental"
],
"[python]": {
// TODO: Enable black formatter
//"editor.defaultFormatter": "ms-python.black-formatter",
//"editor.formatOnSave": true,
//"editor.formatOnSaveMode": "modifications"
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications"
},
// See Also .vscode/launch.json for environment variable args to pytest during debug sessions.
// For the rest, see setup.cfg
Expand Down
103 changes: 87 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ conda-env: build/conda-env.${CONDA_ENV_NAME}.build-stamp
MLOS_CORE_CONF_FILES := mlos_core/pyproject.toml mlos_core/setup.py mlos_core/MANIFEST.in
MLOS_BENCH_CONF_FILES := mlos_bench/pyproject.toml mlos_bench/setup.py mlos_bench/MANIFEST.in
MLOS_VIZ_CONF_FILES := mlos_viz/pyproject.toml mlos_viz/setup.py mlos_viz/MANIFEST.in
MLOS_GLOBAL_CONF_FILES := setup.cfg # pyproject.toml
MLOS_GLOBAL_CONF_FILES := setup.cfg pyproject.toml

MLOS_PKGS := mlos_core mlos_bench mlos_viz
MLOS_PKG_CONF_FILES := $(MLOS_CORE_CONF_FILES) $(MLOS_BENCH_CONF_FILES) $(MLOS_VIZ_CONF_FILES) $(MLOS_GLOBAL_CONF_FILES)
Expand Down Expand Up @@ -69,9 +69,9 @@ ifneq (,$(filter format,$(MAKECMDGOALS)))
endif

build/format.${CONDA_ENV_NAME}.build-stamp: build/licenseheaders.${CONDA_ENV_NAME}.build-stamp
# TODO: enable isort and black formatters
#build/format.${CONDA_ENV_NAME}.build-stamp: build/isort.${CONDA_ENV_NAME}.build-stamp
#build/format.${CONDA_ENV_NAME}.build-stamp: build/black.${CONDA_ENV_NAME}.build-stamp
build/format.${CONDA_ENV_NAME}.build-stamp: build/isort.${CONDA_ENV_NAME}.build-stamp
build/format.${CONDA_ENV_NAME}.build-stamp: build/black.${CONDA_ENV_NAME}.build-stamp
build/format.${CONDA_ENV_NAME}.build-stamp: build/docformatter.${CONDA_ENV_NAME}.build-stamp
build/format.${CONDA_ENV_NAME}.build-stamp:
touch $@

Expand Down Expand Up @@ -111,8 +111,8 @@ build/isort.${CONDA_ENV_NAME}.build-stamp:
# NOTE: when using pattern rules (involving %) we can only add one line of
# prerequisities, so we use this pattern to compose the list as variables.

# Both isort and licenseheaders alter files, so only run one at a time, by
# making licenseheaders an order-only prerequisite.
# black, licenseheaders, isort, and docformatter all alter files, so only run
# one at a time, by adding prerequisites, but only as necessary.
ISORT_COMMON_PREREQS :=
ifneq (,$(filter format licenseheaders,$(MAKECMDGOALS)))
ISORT_COMMON_PREREQS += build/licenseheaders.${CONDA_ENV_NAME}.build-stamp
Expand All @@ -126,7 +126,7 @@ build/isort.mlos_viz.${CONDA_ENV_NAME}.build-stamp: $(MLOS_VIZ_PYTHON_FILES)

build/isort.%.${CONDA_ENV_NAME}.build-stamp: $(ISORT_COMMON_PREREQS)
# Reformat python file imports with isort.
conda run -n ${CONDA_ENV_NAME} isort --verbose --only-modified --atomic -j0 $(filter %.py,$?)
conda run -n ${CONDA_ENV_NAME} isort --verbose --only-modified --atomic -j0 $(filter %.py,$+)
touch $@

.PHONY: black
Expand All @@ -142,8 +142,8 @@ build/black.${CONDA_ENV_NAME}.build-stamp: build/black.mlos_viz.${CONDA_ENV_NAME
build/black.${CONDA_ENV_NAME}.build-stamp:
touch $@

# Both black, licenseheaders, and isort all alter files, so only run one at a time, by
# making licenseheaders and isort an order-only prerequisite.
# black, licenseheaders, isort, and docformatter all alter files, so only run
# one at a time, by adding prerequisites, but only as necessary.
BLACK_COMMON_PREREQS :=
ifneq (,$(filter format licenseheaders,$(MAKECMDGOALS)))
BLACK_COMMON_PREREQS += build/licenseheaders.${CONDA_ENV_NAME}.build-stamp
Expand All @@ -160,13 +160,52 @@ build/black.mlos_viz.${CONDA_ENV_NAME}.build-stamp: $(MLOS_VIZ_PYTHON_FILES)

build/black.%.${CONDA_ENV_NAME}.build-stamp: $(BLACK_COMMON_PREREQS)
# Reformat python files with black.
conda run -n ${CONDA_ENV_NAME} black $(filter %.py,$?)
conda run -n ${CONDA_ENV_NAME} black $(filter %.py,$+)
touch $@

.PHONY: docformatter
docformatter: build/docformatter.${CONDA_ENV_NAME}.build-stamp

ifneq (,$(filter docformatter,$(MAKECMDGOALS)))
FORMAT_PREREQS += build/docformatter.${CONDA_ENV_NAME}.build-stamp
endif

build/docformatter.${CONDA_ENV_NAME}.build-stamp: build/docformatter.mlos_core.${CONDA_ENV_NAME}.build-stamp
build/docformatter.${CONDA_ENV_NAME}.build-stamp: build/docformatter.mlos_bench.${CONDA_ENV_NAME}.build-stamp
build/docformatter.${CONDA_ENV_NAME}.build-stamp: build/docformatter.mlos_viz.${CONDA_ENV_NAME}.build-stamp
build/docformatter.${CONDA_ENV_NAME}.build-stamp:
touch $@

# black, licenseheaders, isort, and docformatter all alter files, so only run
# one at a time, by adding prerequisites, but only as necessary.
DOCFORMATTER_COMMON_PREREQS :=
ifneq (,$(filter format licenseheaders,$(MAKECMDGOALS)))
DOCFORMATTER_COMMON_PREREQS += build/licenseheaders.${CONDA_ENV_NAME}.build-stamp
endif
ifneq (,$(filter format isort,$(MAKECMDGOALS)))
DOCFORMATTER_COMMON_PREREQS += build/isort.${CONDA_ENV_NAME}.build-stamp
endif
ifneq (,$(filter format black,$(MAKECMDGOALS)))
DOCFORMATTER_COMMON_PREREQS += build/black.${CONDA_ENV_NAME}.build-stamp
endif
DOCFORMATTER_COMMON_PREREQS += build/conda-env.${CONDA_ENV_NAME}.build-stamp
DOCFORMATTER_COMMON_PREREQS += $(MLOS_GLOBAL_CONF_FILES)

build/docformatter.mlos_core.${CONDA_ENV_NAME}.build-stamp: $(MLOS_CORE_PYTHON_FILES)
build/docformatter.mlos_bench.${CONDA_ENV_NAME}.build-stamp: $(MLOS_BENCH_PYTHON_FILES)
build/docformatter.mlos_viz.${CONDA_ENV_NAME}.build-stamp: $(MLOS_VIZ_PYTHON_FILES)

# docformatter returns non-zero when it changes anything so instead we ignore that
# return code and just have it recheck itself immediately
build/docformatter.%.${CONDA_ENV_NAME}.build-stamp: $(DOCFORMATTER_COMMON_PREREQS)
# Reformat python file docstrings with docformatter.
conda run -n ${CONDA_ENV_NAME} docformatter --in-place $(filter %.py,$+) || true
conda run -n ${CONDA_ENV_NAME} docformatter --check --diff $(filter %.py,$+)
touch $@


.PHONY: check
check: pycodestyle pydocstyle pylint mypy # cspell markdown-link-check
# TODO: Enable isort and black checks
#check: isort-check black-check pycodestyle pydocstyle pylint mypy # cspell markdown-link-check
check: isort-check black-check docformatter-check pycodestyle pydocstyle pylint mypy # cspell markdown-link-check

.PHONY: black-check
black-check: build/black-check.mlos_core.${CONDA_ENV_NAME}.build-stamp
Expand All @@ -185,7 +224,27 @@ BLACK_CHECK_COMMON_PREREQS += $(MLOS_GLOBAL_CONF_FILES)
build/black-check.%.${CONDA_ENV_NAME}.build-stamp: $(BLACK_CHECK_COMMON_PREREQS)
# Check for import sort order.
# Note: if this fails use "make format" or "make black" to fix it.
conda run -n ${CONDA_ENV_NAME} black --verbose --check --diff $(filter %.py,$?)
conda run -n ${CONDA_ENV_NAME} black --verbose --check --diff $(filter %.py,$+)
touch $@

.PHONY: docformatter-check
docformatter-check: build/docformatter-check.mlos_core.${CONDA_ENV_NAME}.build-stamp
docformatter-check: build/docformatter-check.mlos_bench.${CONDA_ENV_NAME}.build-stamp
docformatter-check: build/docformatter-check.mlos_viz.${CONDA_ENV_NAME}.build-stamp

# Make sure docformatter format rules run before docformatter-check rules.
build/docformatter-check.mlos_core.${CONDA_ENV_NAME}.build-stamp: $(MLOS_CORE_PYTHON_FILES)
build/docformatter-check.mlos_bench.${CONDA_ENV_NAME}.build-stamp: $(MLOS_BENCH_PYTHON_FILES)
build/docformatter-check.mlos_viz.${CONDA_ENV_NAME}.build-stamp: $(MLOS_VIZ_PYTHON_FILES)

BLACK_CHECK_COMMON_PREREQS := build/conda-env.${CONDA_ENV_NAME}.build-stamp
BLACK_CHECK_COMMON_PREREQS += $(FORMAT_PREREQS)
BLACK_CHECK_COMMON_PREREQS += $(MLOS_GLOBAL_CONF_FILES)

build/docformatter-check.%.${CONDA_ENV_NAME}.build-stamp: $(BLACK_CHECK_COMMON_PREREQS)
# Check for import sort order.
# Note: if this fails use "make format" or "make docformatter" to fix it.
conda run -n ${CONDA_ENV_NAME} docformatter --check --diff $(filter %.py,$+)
touch $@

.PHONY: isort-check
Expand All @@ -204,7 +263,7 @@ ISORT_CHECK_COMMON_PREREQS += $(MLOS_GLOBAL_CONF_FILES)

build/isort-check.%.${CONDA_ENV_NAME}.build-stamp: $(ISORT_CHECK_COMMON_PREREQS)
# Note: if this fails use "make format" or "make isort" to fix it.
conda run -n ${CONDA_ENV_NAME} isort --only-modified --check --diff -j0 $(filter %.py,$?)
conda run -n ${CONDA_ENV_NAME} isort --only-modified --check --diff -j0 $(filter %.py,$+)
touch $@

.PHONY: pycodestyle
Expand Down Expand Up @@ -723,7 +782,12 @@ clean-doc:

.PHONY: clean-format
clean-format:
# TODO: add black and isort rules
rm -f build/black.${CONDA_ENV_NAME}.build-stamp
rm -f build/black.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/docformatter.${CONDA_ENV_NAME}.build-stamp
rm -f build/docformatter.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/isort.${CONDA_ENV_NAME}.build-stamp
rm -f build/isort.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/licenseheaders.${CONDA_ENV_NAME}.build-stamp
rm -f build/licenseheaders-prereqs.${CONDA_ENV_NAME}.build-stamp

Expand All @@ -733,6 +797,13 @@ clean-check:
rm -f build/pylint.${CONDA_ENV_NAME}.build-stamp
rm -f build/pylint.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/mypy.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/black-check.build-stamp
rm -f build/black-check.${CONDA_ENV_NAME}.build-stamp
rm -f build/black-check.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/docformatter-check.${CONDA_ENV_NAME}.build-stamp
rm -f build/docformatter-check.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/isort-check.${CONDA_ENV_NAME}.build-stamp
rm -f build/isort-check.mlos_*.${CONDA_ENV_NAME}.build-stamp
rm -f build/pycodestyle.build-stamp
rm -f build/pycodestyle.${CONDA_ENV_NAME}.build-stamp
rm -f build/pycodestyle.mlos_*.${CONDA_ENV_NAME}.build-stamp
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/mlos-3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ dependencies:
# See comments in mlos.yml.
#- gcc_linux-64
- pip:
- autopep8>=1.7.0
- bump2version
- check-jsonschema
- isort
- docformatter
- licenseheaders
- mypy
- pandas-stubs
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/mlos-3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ dependencies:
# See comments in mlos.yml.
#- gcc_linux-64
- pip:
- autopep8>=1.7.0
- bump2version
- check-jsonschema
- isort
- docformatter
- licenseheaders
- mypy
- pandas-stubs
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/mlos-3.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ dependencies:
# See comments in mlos.yml.
#- gcc_linux-64
- pip:
- autopep8>=1.7.0
- bump2version
- check-jsonschema
- isort
- docformatter
- licenseheaders
- mypy
- pandas-stubs
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/mlos-3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ dependencies:
# See comments in mlos.yml.
#- gcc_linux-64
- pip:
- autopep8>=1.7.0
- bump2version
- check-jsonschema
- isort
- docformatter
- licenseheaders
- mypy
- pandas-stubs
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/mlos-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ dependencies:
# This also requires a more recent vs2015_runtime from conda-forge.
- pyrfr>=0.9.0
- pip:
- autopep8>=1.7.0
- bump2version
- check-jsonschema
- isort
- docformatter
- licenseheaders
- mypy
- pandas-stubs
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/mlos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ dependencies:
# FIXME: https://github.com/microsoft/MLOS/issues/727
- python<3.12
- pip:
- autopep8>=1.7.0
- bump2version
- check-jsonschema
- isort
- docformatter
- licenseheaders
- mypy
- pandas-stubs
Expand Down
21 changes: 15 additions & 6 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,23 @@ def pytest_configure(config: pytest.Config) -> None:
Add some additional (global) configuration steps for pytest.
"""
# Workaround some issues loading emukit in certain environments.
if os.environ.get('DISPLAY', None):
if os.environ.get("DISPLAY", None):
try:
import matplotlib # pylint: disable=import-outside-toplevel
matplotlib.rcParams['backend'] = 'agg'
if is_master(config) or dict(getattr(config, 'workerinput', {}))['workerid'] == 'gw0':
import matplotlib # pylint: disable=import-outside-toplevel

matplotlib.rcParams["backend"] = "agg"
if is_master(config) or dict(getattr(config, "workerinput", {}))["workerid"] == "gw0":
# Only warn once.
warn(UserWarning('DISPLAY environment variable is set, which can cause problems in some setups (e.g. WSL). '
+ f'Adjusting matplotlib backend to "{matplotlib.rcParams["backend"]}" to compensate.'))
warn(
UserWarning(
(
"DISPLAY environment variable is set, "
"which can cause problems in some setups (e.g. WSL). "
f"Adjusting matplotlib backend to '{matplotlib.rcParams['backend']}' "
"to compensate."
)
)
)
except ImportError:
pass

Expand Down
9 changes: 5 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@
numpydoc_class_members_toctree = False

autodoc_default_options = {
'members': True,
'undoc-members': True,
# Don't generate documentation for some (non-private) functions that are more for internal implementation use.
'exclude-members': 'mlos_bench.util.check_required_params'
"members": True,
"undoc-members": True,
# Don't generate documentation for some (non-private) functions that are more
# for internal implementation use.
"exclude-members": "mlos_bench.util.check_required_params",
}

# Generate the plots for the gallery
Expand Down
5 changes: 2 additions & 3 deletions mlos_bench/mlos_bench/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
mlos_bench is a framework to help automate benchmarking and and
OS/application parameter autotuning.
"""mlos_bench is a framework to help automate benchmarking and and OS/application
parameter autotuning.
"""
4 changes: 1 addition & 3 deletions mlos_bench/mlos_bench/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
mlos_bench.config
"""
"""mlos_bench.config."""
Loading
Loading