Skip to content

Commit

Permalink
Fixed a diffeent analyze script error.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bennet committed May 31, 2022
1 parent 3cfb05e commit 32da26f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 45 deletions.
8 changes: 5 additions & 3 deletions changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
Expand Down Expand Up @@ -103,11 +103,13 @@ def main():
print("### %s\n" % milestone_name)

print_category("Highlights", prs(gh, milestone, with_labels="highlight"))
print_category("Enhancements", prs(gh, milestone, with_labels="enhancement", without_labels=[":Docs", "highlight", ":internal", ":misc"]))
print_category(
"Enhancements", prs(gh, milestone, with_labels="enhancement", without_labels=[":Docs", "highlight", ":internal", ":misc"])
)
print_category("Bug Fixes", prs(gh, milestone, with_labels="bug", without_labels=[":Docs", "highlight", ":internal", ":misc"]))
print_category("Doc Changes", prs(gh, milestone, with_labels=":Docs", without_labels=["highlight", ":misc"]))
print_category("Miscellaneous Changes", prs(gh, milestone, with_labels=":misc", without_labels=[":internal"]))


if __name__ == '__main__':
if __name__ == "__main__":
main()
63 changes: 26 additions & 37 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
Expand All @@ -30,17 +30,15 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.ifconfig"
]
extensions = ["sphinx.ext.ifconfig"]

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

# The suffix(es) of source filenames. You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
master_doc = 'index'
source_suffix = ".rst"
master_doc = "index"
language = None

CI_VARS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".ci", "variables.json")
Expand All @@ -51,14 +49,10 @@ def read_min_python_version():
with open(CI_VARS, "rt") as fp:
return json.load(fp)["python_versions"]["MIN_PY_VER"]
except KeyError as e:
raise ConfigError(
f"Failed building docs as required key [{e}] couldn't be found in the file [{CI_VARS}]."
)
raise ConfigError(f"Failed building docs as required key [{e}] couldn't be found in the file [{CI_VARS}].")


GLOBAL_SUBSTITUTIONS = {
"{MIN_PY_VER}": read_min_python_version()
}
GLOBAL_SUBSTITUTIONS = {"{MIN_PY_VER}": read_min_python_version()}


# inspiration from https://github.com/sphinx-doc/sphinx/issues/4054#issuecomment-329097229
Expand Down Expand Up @@ -104,23 +98,23 @@ def read_min_es_version():

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -132,62 +126,57 @@ def read_min_es_version():
# a list of builtin themes.
# html_theme = 'alabaster'

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# html_extra_path = []


# Output file base name for HTML help builder.
htmlhelp_basename = 'Rallydoc'
htmlhelp_basename = "Rallydoc"

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {}

latex_documents = [
(master_doc, 'Rally.tex', 'Rally Documentation',
'Daniel Mitterdorfer', 'manual'),
(master_doc, "Rally.tex", "Rally Documentation", "Daniel Mitterdorfer", "manual"),
]

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'esrally', 'Rally Documentation',
[author], 1)
]
man_pages = [(master_doc, "esrally", "Rally Documentation", [author], 1)]

# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False

# -- Options for Texinfo output -------------------------------------------
texinfo_documents = [
(master_doc, 'Rally', 'Rally Documentation',
author, 'Rally', 'Macrobenchmarking framework for Elasticsearch.',
'Miscellaneous'),
(master_doc, "Rally", "Rally Documentation", author, "Rally", "Macrobenchmarking framework for Elasticsearch.", "Miscellaneous"),
]
9 changes: 5 additions & 4 deletions docs/create_scheduler_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
Expand All @@ -16,6 +16,7 @@
# under the License.

import sys

# we don't include matplotlib in setup.py as it's just a development dependency
try:
import matplotlib
Expand Down Expand Up @@ -58,14 +59,14 @@ def n(data, sched):
ax.set_title("Poisson schedule")
ax.plot(tnp, yn, "o-")

plt.xlabel('time [s]')
plt.xlabel("time [s]")

if len(sys.argv) == 2:
output_file_path = sys.argv[1]
print("Saving output to [%s]" % output_file_path)
plt.savefig(output_file_path, bbox_inches='tight')
plt.savefig(output_file_path, bbox_inches="tight")
plt.show()


if __name__ == '__main__':
if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion scripts/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def plot_service_time(raw_data, label_key):
data_series = data_series_name(d, label_key)
for op_metrics in d["results"]["op_metrics"]:
operation = op_metrics["operation"]
service_time_metrics = op_metrics["service_time"]
service_time_metrics = {k: v for k, v in op_metrics["service_time"].items() if k not in ("mean", "unit")}
if operation not in service_time_per_op:
service_time_per_op[operation] = []
service_time_per_op[operation].append(
Expand Down

0 comments on commit 32da26f

Please sign in to comment.