From 37ff58530d1392a73a9586e6af081f8e38a956ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schm=C3=B6lder?= Date: Wed, 14 Jan 2026 09:55:34 +0100 Subject: [PATCH 1/2] Add options.json to log --- cadetrdm/repositories.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/cadetrdm/repositories.py b/cadetrdm/repositories.py index ffd108f..a4338b2 100644 --- a/cadetrdm/repositories.py +++ b/cadetrdm/repositories.py @@ -1101,11 +1101,10 @@ def update_output_main_logs(self, output_dict: dict = None): self.output_repo._git.checkout(self.output_repo.main_branch) - logs_folderpath = self.output_repo.path / "run_history" / output_branch_name - if not logs_folderpath.exists(): - os.makedirs(logs_folderpath) + logs_dir= self.output_repo.path / "run_history" / output_branch_name + if not logs_dir.exists(): + os.makedirs(logs_dir) - json_filepath = logs_folderpath / "metadata.json" entry = LogEntry( output_repo_commit_message=output_commit_message, output_repo_branch=output_branch_name, @@ -1120,20 +1119,26 @@ def update_output_main_logs(self, output_dict: dict = None): **output_dict ) - with open(json_filepath, "w", encoding="utf-8") as f: + with open(logs_dir / "metadata.json", "w", encoding="utf-8") as f: json.dump(entry.to_dict(), f, indent=2) + if self.options is not None: + self.options.dump_json_file(logs_dir / "options.json") + log = OutputLog(self.output_log_file) log.entries[output_branch_name] = entry log.write() - self.dump_package_list(logs_folderpath) + self.dump_package_list(logs_dir) - self._copy_code(logs_folderpath) + self._copy_code(logs_dir) self.output_repo.add(".") - self.output_repo._git.commit("-m", f"log for '{output_commit_message}' \n" - f"of branch '{output_branch_name}'") + self.output_repo._git.commit( + "-m", + f"log for '{output_commit_message}' \n" + f"of branch '{output_branch_name}'" + ) self.output_repo._git.checkout(output_branch_name) self._most_recent_branch = output_branch_name From cf197d8302e9f7505b1ce05fc29612b68ca1a679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schm=C3=B6lder?= Date: Wed, 14 Jan 2026 10:01:40 +0100 Subject: [PATCH 2/2] fixup! Add options.json to log --- cadetrdm/repositories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cadetrdm/repositories.py b/cadetrdm/repositories.py index a4338b2..fe1ae3e 100644 --- a/cadetrdm/repositories.py +++ b/cadetrdm/repositories.py @@ -1101,7 +1101,7 @@ def update_output_main_logs(self, output_dict: dict = None): self.output_repo._git.checkout(self.output_repo.main_branch) - logs_dir= self.output_repo.path / "run_history" / output_branch_name + logs_dir = self.output_repo.path / "run_history" / output_branch_name if not logs_dir.exists(): os.makedirs(logs_dir)