From c9b5ed9fbee6ef4cc1c1f5f85facffd051b68e74 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sun, 5 Mar 2023 23:57:22 -0600 Subject: [PATCH] rename to environment --- src/pyhf/cli/utils.py | 10 +++++----- src/pyhf/utils.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pyhf/cli/utils.py b/src/pyhf/cli/utils.py index 2b786a5795..7dc5a2a978 100644 --- a/src/pyhf/cli/utils.py +++ b/src/pyhf/cli/utils.py @@ -21,15 +21,15 @@ def cli(): help="The location of the output file. If not specified, prints to screen.", default=None, ) -def debug(output_file): - debug_info = utils.debug_info() +def environment(output_file): + environment_info = utils.environment_info() if output_file: output_file = Path(output_file) output_file.parent.mkdir(parents=True, exist_ok=True) with open(output_file, "w+", encoding="utf-8") as out_file: - out_file.write(debug_info) - log.debug(f"Written to {output_file}") + out_file.write(environment_info) + log.environment(f"Written to {output_file}") else: - click.echo(debug_info) + click.echo(environment_info) diff --git a/src/pyhf/utils.py b/src/pyhf/utils.py index a5f125a4ef..2e9f2ba8b3 100644 --- a/src/pyhf/utils.py +++ b/src/pyhf/utils.py @@ -19,7 +19,7 @@ __all__ = [ "EqDelimStringParamType", "citation", - "debug_info", + "environment_info", "digest", "options_from_eqdelimstring", ] @@ -132,14 +132,14 @@ def citation(oneline=False): return data -def debug_info(): +def environment_info(): """ Produce OS / environment information useful for filing a bug report Example: >>> import pyhf - >>> pyhf.utils.debug_info() + >>> pyhf.utils.environment_info() Returns: os_info (:obj:`str`): The operating system and environment information