Skip to content

Commit fabe0ea

Browse files
committed
fix formatting issues
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent 68fd64a commit fabe0ea

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

‎examples-proposed/024-aggregated-compute-ensemble/instance_component.py‎

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def step(self, timestamp: float = 0.0, **keywords):
5353
# the `run_ensemble()` `name` argument prepended to a unique number
5454
# for each instance. E.g., ENSEMBLE_INSTANCE might be "MY_INSTANCE_23".
5555
instance_id = self.services.get_config_param('ENSEMBLE_INSTANCE')
56-
self.services.info(f'{instance_id}: Start of step of instance '
57-
f'component.')
56+
self.services.info(f'{instance_id}: Start of step of instance component.')
5857

5958
# Echo the parameters we're expecting, A, B, and C
6059
self.services.info(
@@ -64,35 +63,28 @@ def step(self, timestamp: float = 0.0, **keywords):
6463
)
6564

6665
cmd = create_cmd(
67-
instance_id, Path(self.BIN_PATH),
68-
self.alpha, self.l, self.t_final, self.nx, self.nt
66+
instance_id, Path(self.BIN_PATH), self.alpha, self.l, self.t_final, self.nx, self.nt
6967
)
7068

7169
working_dir = str(Path('.').absolute())
72-
self.services.info(f'{instance_id}: Launching executable in '
73-
f'{working_dir}')
70+
self.services.info(f'{instance_id}: Launching executable in {working_dir}')
7471
run_id = None
7572
try:
7673
cmd = ' '.join(cmd) # need one big ole string for executing tasks
77-
run_id = self.services.launch_task(nproc=1,
78-
working_dir=working_dir,
79-
binary=cmd)
74+
run_id = self.services.launch_task(nproc=1, working_dir=working_dir, binary=cmd)
8075
except Exception:
81-
self.services.critical(f'{instance_id}: Unable to launch executable '
82-
f'in {working_dir}')
76+
self.services.critical(f'{instance_id}: Unable to launch executable in {working_dir}')
8377

8478
return_value = self.services.wait_task(run_id) # block until done
8579

8680
self.services.info(
87-
f'{instance_id}: Completed MPI executable with return value: '
88-
f'{return_value}.'
81+
f'{instance_id}: Completed MPI executable with return value: {return_value}.'
8982
)
9083

9184
# Add the generated data JSON and CSV files to the portal
9285
try:
9386
self.services.add_analysis_data_files(
94-
[f'{instance_id}_solution.json', f'{instance_id}_stats.csv'],
95-
replace=True
87+
[f'{instance_id}_solution.json', f'{instance_id}_stats.csv'], replace=True
9688
)
9789
except Exception:
9890
print('did not add data files to portal, check logs')

0 commit comments

Comments
 (0)