Skip to content

Commit

Permalink
Replacing endf c functions with package (#3101)
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell authored Aug 14, 2024
1 parent 346f751 commit 3ef54ec
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 75 deletions.
8 changes: 0 additions & 8 deletions openmc/data/_endf.pyx

This file was deleted.

57 changes: 0 additions & 57 deletions openmc/data/endf.c

This file was deleted.

10 changes: 1 addition & 9 deletions openmc/data/endf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@

from .data import gnds_name
from .function import Tabulated1D
try:
from ._endf import float_endf
_CYTHON = True
except ImportError:
_CYTHON = False
from endf.records import float_endf


_LIBRARY = {0: 'ENDF/B', 1: 'ENDF/A', 2: 'JEFF', 3: 'EFF',
Expand Down Expand Up @@ -91,10 +87,6 @@ def py_float_endf(s):
return float(ENDF_FLOAT_RE.sub(r'\1e\2\3', s))


if not _CYTHON:
float_endf = py_float_endf


def int_endf(s):
"""Convert string of integer number in ENDF to int.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dependencies = [
"lxml",
"uncertainties",
"setuptools",
"endf",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


kwargs = {
# Cython is used to add resonance reconstruction and fast float_endf
# Cython is used to add resonance reconstruction
'ext_modules': cythonize('openmc/data/*.pyx'),
'include_dirs': [np.get_include()]
}
Expand Down

0 comments on commit 3ef54ec

Please sign in to comment.