[0.2.8] - Unreleased
########################################################################
+Added
+~~~~~
+
+- ``Nutrient`` class, and partially completed ``nnest`` nested list.
+- Print statement for average of 1-rep maxes (for 3 different formulas)
+- ``print_header()`` function inside of ``services/analyze.py``
+
+Removed
+~~~~~~~
+
+- ``-d`` and ``-v`` shortcuts for ``--debug`` and ``--version``
+
[0.2.7] - 2023-03-27
)
arg_parser.add_argument(
- "-d", "--debug", action="store_true", help="enable detailed error messages"
+ "--debug", action="store_true", help="enable detailed error messages"
)
arg_parser.add_argument(
"--no-pager", action="store_true", help="disable paging (print full output)"
if CLI_CONFIG.debug:
raise
except Exception as exception: # pylint: disable=broad-except # pragma: no cover
- print("Unforeseen error, run with -d for more info: " + repr(exception))
+ print("Unforeseen error, run with --debug for more info: " + repr(exception))
print("You can open an issue here: %s" % __url__)
print("Or send me an email with the debug output: %s" % __email__)
if CLI_CONFIG.debug:
def test_300_argparser_debug_no_paging(self):
"""Verifies the debug and no_paging flags are set"""
- args = arg_parser.parse_args(args=["-d", "--no-pager"])
+ args = arg_parser.parse_args(args=["--debug", "--no-pager"])
CLI_CONFIG.set_flags(args)
assert args.debug is True
assert result["navy"] == 10.64
# Invalid (failed Navy)
- args = arg_parser.parse_args(args="-d calc bf -w 80 -n 40".split())
+ args = arg_parser.parse_args(args="--debug calc bf -w 80 -n 40".split())
CLI_CONFIG.set_flags(args)
code, result = args.func(args)
assert code in {0, 1} # Might be a failed code one day, but returns 0 for now
nt_main(args=["-h"])
assert system_exit.value.code == 0
- # -d
- code = nt_main(args=["-d"])
+ # --debug
+ code = nt_main(args=["--debug"])
assert code == 0
# __main__: if args_dict
# TODO: replace with non-biometric test
# from ntclient.services import biometrics
#
- # args = arg_parser.parse_args(args=["-d", "bio", "log", "add", "12,12"])
+ # args = arg_parser.parse_args(args=["--debug", "bio", "log", "add", "12,12"])
# biometrics.input = (
# lambda x: "y"
# ) # mocks input, could also pass `-y` flag or set yes=True
)
with pytest.raises(SqlInvalidVersionError) as sql_invalid_version_error:
- nt_main(["-d", "nt"])
+ nt_main(["--debug", "nt"])
assert sql_invalid_version_error is not None
@unittest.skip(reason="Long-running test, want to replace with more 'unit' style")