diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3b8eef0..e3169f7ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 43.2.6 [#1297](https://github.com/openfisca/openfisca-core/pull/1297) + +#### Bugfix + +- Add `int` default to `max_depth` in `openfisca test` + ### 43.2.5 [#1296](https://github.com/openfisca/openfisca-core/pull/1296) #### Bugfix diff --git a/openfisca_core/scripts/openfisca_command.py b/openfisca_core/scripts/openfisca_command.py index d82e0aef6..f8d839772 100644 --- a/openfisca_core/scripts/openfisca_command.py +++ b/openfisca_core/scripts/openfisca_command.py @@ -117,7 +117,7 @@ def build_test_parser(parser): "-d", "--max-depth", type=int, - default=None, + default=sys.maxsize, help="set maximal verbosity depth. If specified, output the calculation trace up to the provided depth. This flag has no effect without --verbose.", ) parser.add_argument( diff --git a/openfisca_core/tools/test_runner.py b/openfisca_core/tools/test_runner.py index 1f7b603b6..f04d4b585 100644 --- a/openfisca_core/tools/test_runner.py +++ b/openfisca_core/tools/test_runner.py @@ -25,7 +25,7 @@ class Options(TypedDict, total=False): aggregate: bool ignore_variables: Sequence[str] | None - max_depth: int | None + max_depth: int name_filter: str | None only_variables: Sequence[str] | None pdb: bool diff --git a/openfisca_core/tracers/computation_log.py b/openfisca_core/tracers/computation_log.py index 9fcc09e25..bd68b4b21 100644 --- a/openfisca_core/tracers/computation_log.py +++ b/openfisca_core/tracers/computation_log.py @@ -40,7 +40,8 @@ def print_log(self, aggregate: bool = False, max_depth: int = sys.maxsize) -> No This mode is more suited for simulations on a large population. - If ``max_depth`` is ``None`` (default), print the entire computation. + If ``max_depth`` is ``sys.maxsize`` (default), print the entire + computation. If ``max_depth`` is set, for example to ``3``, only print computed vectors up to a depth of ``max_depth``. diff --git a/setup.py b/setup.py index b466b2407..fbb378359 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( name="OpenFisca-Core", - version="43.2.5", + version="43.2.6", author="OpenFisca Team", author_email="contact@openfisca.org", classifiers=[