Skip to content

Commit a6e0615

Browse files
committed
cli: updated directories names
1 parent 244d4ee commit a6e0615

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/pymcnp/Run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def run(self, path: str | pathlib.Path):
9595

9696
processes = []
9797
for i, inp in enumerate(self.inps):
98-
subdirectory = directory / f'run-{i}'
99-
path_input = subdirectory / f'run-{i}.inp'
100-
path_output = subdirectory / f'run-{i}.outp'
101-
path_ptrac = subdirectory / f'run-{i}.ptrac'
98+
subdirectory = directory / f'run-{i:05}'
99+
path_input = subdirectory / f'run-{i:05}.inp'
100+
path_output = subdirectory / f'run-{i:05}.outp'
101+
path_ptrac = subdirectory / f'run-{i:05}.ptrac'
102102

103103
subdirectory.mkdir()
104104
inp.to_file(path_input)

src/pymcnp/_cli/_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def get_outfile(path: str | pathlib.Path, ext: str, i: int = None) -> str:
88
path = str(path)
99
path, _ = path.rsplit('.', maxsplit=1)
1010

11-
return pathlib.Path(path + f'{f"-{i}" if i else ""}.' + ext)
11+
return pathlib.Path(path + f'{f"-{i:05}" if i else ""}.' + ext)
1212

1313

1414
def info(msg: str):

0 commit comments

Comments
 (0)