From 60c418c42cc02e77aa1aeecfa79f74330d201b85 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 10 Jan 2024 12:02:40 +0100 Subject: CLI: Add a minimal sanity check --- lib/cli.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/cli.py b/lib/cli.py index 0ebe42d..5c6544c 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -4,10 +4,20 @@ import dfatool.functions as df import dfatool.plotter import logging import numpy as np +import os +import sys logger = logging.getLogger(__name__) +def sanity_check(args): + if args.force_tree and bool(int(os.getenv("DFATOOL_FIT_FOL", "0"))): + print( + "--force-tree and DFATOOL_FIT_FOL=1 are mutually exclusive", file=sys.stderr + ) + sys.exit(1) + + def print_static(model, static_model, name, attribute, with_dependence=False): unit = " " if attribute == "power": -- cgit v1.2.3