Skip to content

Commit d8faf01

Browse files
committed
Merge branch 'trs/document-AUGUR_DEBUG'
2 parents 988380c + 8c31208 commit d8faf01

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

CHANGES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
* A new command, `augur merge`, now allows for generalized merging of two or more metadata tables. [#1563][] (@tsibley)
88
* Two new commands, `augur read-file` and `augur write-file`, now allow external programs to do i/o like Augur by piping from/to these new commands. They provide handling of compression formats and newlines consistent with the rest of Augur. [#1562][] (@tsibley)
9-
* A new debugging mode can be enabled by setting the `AUGUR_DEBUG` environment variable to `1` (or another truthy value). Currently the only effect is to print more information about handled (i.e. anticipated) errors. For example, stack traces and parent exceptions in an exception chain are normally omitted for handled errors, but setting this env var includes them. Future debugging and troubleshooting features, like verbose operation logging, will likely also condition on this new debugging mode. [#1577][] (@tsibley)
9+
* A new debugging mode can be enabled by setting the `AUGUR_DEBUG` environment variable to `1` (or any non-empty value). Currently the only effect is to print more information about handled (i.e. anticipated) errors. For example, stack traces and parent exceptions in an exception chain are normally omitted for handled errors, but setting this env var includes them. Future debugging and troubleshooting features, like verbose operation logging, will likely also condition on this new debugging mode. [#1577][] (@tsibley)
1010

1111
### Bug Fixes
1212

augur/debug.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
"""
22
Debug flags and utilities.
33
4-
.. envvar:: AUGUR_DEBUG
5-
6-
Set to a truthy value (e.g. 1) to print more information about (handled)
7-
errors. For example, when this is not set or falsey, stack traces and
8-
parent exceptions in an exception chain are omitted from handled errors.
4+
See also :envvar:`AUGUR_DEBUG`.
95
"""
106
from os import environ
117

augur/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def write_json(data, file, indent=(None if os.environ.get("AUGUR_MINIFY_JSON") e
104104
file
105105
file path or handle to write to
106106
indent : int or None, optional
107-
JSON indentation level. Default is `None` if the environment variable `AUGUR_MINIFY_JSON`
107+
JSON indentation level. Default is `None` if the environment variable :envvar:`AUGUR_MINIFY_JSON`
108108
is truthy, else 1
109109
include_version : bool, optional
110110
Include the augur version. Default: `True`.

docs/usage/envvars.rst

+12-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@ Environment variables
55
Augur's behaviour can be globally modified by the values of some specific environment variables.
66
These can be especially useful in the context of an entire pipeline or workflow which uses Augur, as the environment variables can be set once for all Augur commands at the start of the pipeline.
77

8-
``AUGUR_MINIFY_JSON``
8+
.. envvar:: AUGUR_DEBUG
9+
10+
Boolean.
11+
If set to a non-empty value, more detailed debugging information is shown by Augur during execution and handling of errors.
12+
13+
For example, when this is enabled, stack traces and parent exceptions in an exception chain are no longer omitted from handled (i.e. expected) errors.
14+
Some commands will also emit more verbose operation logging during their execution.
15+
16+
.. envvar:: AUGUR_MINIFY_JSON
17+
918
Boolean.
1019
If set to a non-empty value, all JSON output produced by Augur will be minified by omitting indentation and newlines.
1120

1221
Minifying the JSON will substantially reduce file sizes, which is helpful for large, deeply nested trees.
1322

14-
``AUGUR_RECURSION_LIMIT``
23+
.. envvar:: AUGUR_RECURSION_LIMIT
24+
1525
Integer.
1626
If set to a non-empty value, the Python recursion limit will be set to the given value early in Augur's execution by calling :func:`sys.setrecursionlimit`.
1727

0 commit comments

Comments
 (0)