summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-03-07 09:47:14 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-03-07 09:47:14 +0100
commit260a5fa322c6910fbc7b046b6f63aef1a636ef92 (patch)
tree2f050212556afbc7803e7ca8699589af800c113b /lib
parent1dfb6da4f8f1fec01d82f5f2dcbc66751d4078ec (diff)
dataref export: include environment variables
Diffstat (limited to 'lib')
-rw-r--r--lib/cli.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cli.py b/lib/cli.py
index ed25d62..ff58099 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -336,6 +336,9 @@ def model_quality_table(
def export_dataref(dref_file, dref, precision=None):
with open(dref_file, "w") as f:
+ for k, v in sorted(os.environ.items(), key=lambda kv: kv[1]):
+ if k.startswith("DFATOOL_"):
+ print(f"% {k}='{v}'", file=f)
for arg in sys.argv:
print(f"% {arg}", file=f)
for k, v in sorted(dref.items()):