Skip to content

Commit

Permalink
rename to environment
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Nov 2, 2023
1 parent 1729894 commit c9b5ed9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/pyhf/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions src/pyhf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
__all__ = [
"EqDelimStringParamType",
"citation",
"debug_info",
"environment_info",
"digest",
"options_from_eqdelimstring",
]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c9b5ed9

Please sign in to comment.