Skip to content

Commit 64f5f1a

Browse files
authored
Mic 4612/env restart (#210)
Mic-4612/env-restart Gives user the ability to choose whether or not to continue psimulate restart if the environment is different from the original run. - *Category*: Feature - *JIRA issue*: https://jira.ihme.washington.edu/browse/MIC-4612 Changes and notes -Gives user the option to continue a restart if the environment has changed from the original run Testing Was able to successfully continue a restart or abort a restart.
1 parent 8e4860e commit 64f5f1a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**1.5.6 - 02/27/24**
2+
3+
- Give user option to continue psimulate restart if environment has changed
4+
15
**1.5.5 - 02/12/24**
26

37
- Add central performance logging and testing

src/vivarium_cluster_tools/psimulate/pip_env.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from pathlib import Path
1212
from typing import Dict, List, Tuple
1313

14+
import click
1415
from loguru import logger
1516

1617

@@ -93,9 +94,11 @@ def _compare_environments(current: Dict, original: Dict) -> None:
9394

9495
if differences:
9596
differences = "\n".join(differences)
96-
raise ValueError(
97-
"Differences found between environment used for original run and current environment. "
98-
"In order to successfully run, you should make a new environment using the requirements.txt "
99-
"file found in the output directory (or rename/delete the requirements.txt before running "
100-
f"if you know what you're doing).\n\nDifferences found as follows: {differences}."
97+
logger.info(
98+
"Differences found between current environment and original environment used for "
99+
f" this run. \n\nDifferences found are as follows: {differences}. Would you like to proceed?"
100+
)
101+
click.confirm(
102+
"Would you like to proceed psimulate restart with the new environment?",
103+
abort=True,
101104
)

0 commit comments

Comments
 (0)