Skip to content

Commit

Permalink
Merge pull request #248 from CovertLab/suffix-time
Browse files Browse the repository at this point in the history
Filename-friendly time suffix
  • Loading branch information
thalassemia authored Nov 28, 2024
2 parents 991d277 + 6629900 commit 14a52f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ecoli/experiments/ecoli_master_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ def run(self):
self.experiment_id_base = self.experiment_id
if self.suffix_time:
self.experiment_id = datetime.now().strftime(
f"{self.experiment_id_base}_%d-%m-%Y_%H-%M-%S"
f"{self.experiment_id_base}_%Y%m%d-%H%M%S"
)
# Special characters can break Hive partitioning so quote them
self.experiment_id = parse.quote_plus(self.experiment_id)
Expand Down
2 changes: 1 addition & 1 deletion runscripts/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def main():
if experiment_id is None:
raise RuntimeError("No experiment ID was provided.")
if config["suffix_time"]:
current_time = datetime.now().strftime("%d-%m-%Y %H:%M:%S")
current_time = datetime.now().strftime("%Y%m%d-%H%M%S")
experiment_id = experiment_id + "_" + current_time
config["suffix_time"] = False

Expand Down

0 comments on commit 14a52f7

Please sign in to comment.