Skip to content

Commit

Permalink
Fixed outfile name bug openmc'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbradnam committed Oct 22, 2024
1 parent 6719703 commit 47607c3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions jade/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ def _get_output_files(results_path, code):
elif file_name[-1] == "o":
file2 = file_name
elif code == "openmc":
if file_name.startswith("statepoint"):
if file_name.endswith('.out'):
file1 = file_name
elif file_name.startswith("statepoint"):
file2 = file_name


if file1 is None or (code == "mcnp" and file2 is None):
raise FileNotFoundError(
Expand Down Expand Up @@ -297,12 +300,12 @@ def _read_code_version(self, pathtofile: os.PathLike) -> str | None:
# this can happen the first time
return None

elif self.mcnp or self.d1s:
if self.mcnp or self.d1s:
_, mcnp_ofile = self._get_output_files(pathtofile, "mcnp")
return self._read_mcnp_code_version(mcnp_ofile)
elif self.openmc:
_, openmc_ofile = self._get_output_files(pathtofile, "openmc")
return self._read_openmc_code_version(openmc_ofile)
_, openmc_sfile = self._get_output_files(pathtofile, "openmc")
return self._read_openmc_code_version(openmc_sfile)
elif self.serpent:
pass

Check warning on line 310 in jade/output.py

View check run for this annotation

Codecov / codecov/patch

jade/output.py#L309-L310

Added lines #L309 - L310 were not covered by tests

Expand Down

0 comments on commit 47607c3

Please sign in to comment.