Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSava committed Nov 29, 2024
1 parent e663924 commit cd0765c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/everest/bin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def _get_jobs_status(progress):
for job_idx, job in enumerate(queue):
if job_idx not in job_progress:
job_progress[job_idx] = JobProgress(name=job["name"])
simulation = int(job["simulation"])
realization = int(job["realization"])
status = job["status"]
if status in [JOB_RUNNING, JOB_SUCCESS, JOB_FAILURE]:
job_progress[job_idx].status[status].append(simulation)
job_progress[job_idx].status[status].append(realization)
return job_progress.values()

def _filter_jobs(self, progress):
Expand Down
2 changes: 1 addition & 1 deletion src/everest/simulator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
JOB_SUCCESS = "Finished"
JOB_WAITING = "Waiting"
JOB_RUNNING = "Running"
JOB_FAILURE = "Failure"
JOB_FAILURE = "Failed"


DEFAULT_DATA_SUMMARY_KEYS = ("YEAR", "YEARS" "TCPU", "TCPUDAY", "MONTH", "DAY")
Expand Down
3 changes: 1 addition & 2 deletions tests/everest/entry_points/test_everest_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def build_job(
"end_time": end_time,
"name": name,
"error": error,
"simulation": 0,
"realization": 0,
}

shell_cmd_jobs = [build_job(name=command) for command in all_shell_script_fm_steps]
Expand All @@ -60,7 +60,6 @@ def build_job(
},
"progress": [all_jobs],
"batch_number": "0",
"event": "end",
}
else:
raise Exception("Stop! Hands in the air!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ install_data:
target: templates

forward_model:
- well_swapping --priorities well_priorities.json --constraints swapping_constraints.json --cases wells.json --output well_swap_output.json --config files/well_swap_config.yml
- well_swapping run --priorities well_priorities.json --constraints swapping_constraints.json --cases wells.json --output well_swap_output.json --config files/well_swap_config.yml

####################################
# FROM HERE ON, NOTHING NEW...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ install_data:
target: templates

forward_model:
- well_swapping --priorities well_priorities.json --constraints swapping_constraints.json --cases wells.json --output well_swap_output.json --config files/well_swap_config.yml
- well_swapping run --priorities well_priorities.json --constraints swapping_constraints.json --cases wells.json --output well_swap_output.json --config files/well_swap_config.yml

####################################
# FROM HERE ON, NOTHING NEW...
Expand Down
5 changes: 3 additions & 2 deletions tests/everest/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def test_state_modifier_workflow_run(
)
evaluator_server_config = evaluator_server_config_generator(run_model)
run_model.run_experiment(evaluator_server_config)

for path in Path.cwd().glob("**/simulation_0/RESULT.SCH"):
paths = list(Path.cwd().glob("**/simulation_0/RESULT.SCH"))
assert paths
for path in paths:
assert path.read_bytes() == (cwd / "eclipse/model/EXPECTED.SCH").read_bytes()

0 comments on commit cd0765c

Please sign in to comment.