JADE is a Python V&V (Verification & Validation) framework for nuclear data libraries and particle transport codes. It automates benchmark execution, raw output parsing, and report generation (Excel + Word atlas).
- Documentation: ReadTheDocs
- PyPI package:
jadevv(imports asjade) - Python: ≥ 3.11
pip install -e .[dev,ui,docs] # dev: pytest, ruff; ui: ttkthemes; docs: sphinxpytest # all tests
pytest --cov=jade --cov-report=term-missing # with coverageTests mirror src/jade/ under tests/. Fixtures live in tests/dummy_structure/ (pre-baked folder tree) and tests/<subpackage>/resources/.
ruff is the mandated formatter — run it before committing:
ruff format .
ruff check .src/jade/
app/ — JadeApp orchestrator; fetch.py downloads benchmark inputs from IAEA/F4E/SINBAD
config/ — Dataclasses + YAML parsers for run/PP config; PathsTree; GlobalStatus
run/ — Input generation, translation, job submission; benchmark.py + input.py
post/ — 3-stage pipeline: raw output → CSV → Excel/Atlas Word doc
helper/ — CODE enum, ALLOWED_COLUMN_NAMES, path/folder helpers, optional deps guard
gui/ — Tkinter GUIs (conditional on TKINTER_AVAIL)
resources/ — Bundled default YAML config templates (copied on first install)
All entry points wire through JadeApp in src/jade/app/app.py.
Every transport-code-extensible concept uses this pattern:
# helper/constants.py
class CODE(Enum):
MCNP = "mcnp"; OPENMC = "openmc"; SERPENT = "serpent"; D1S = "d1s"; ACTINV = "actinv"; EXPERIMENT = "exp"
# e.g. run/benchmark.py
class SingleRun(ABC): ...
class SingleRunMCNP(SingleRun): ...
class SingleRunFactory:
@staticmethod
def create(code: CODE, ...) -> SingleRun: ...The same pattern applies to Library/LibraryFactory. Input subclasses are selected by CODE inside BenchmarkRun (run/benchmark.py), and AbstractSimOutput subclasses inside RawProcessor.__init__() (post/raw_processor.py).
run_cfg = RunConfig.from_root(paths_tree) # reads 4 YAML files
run_cfg = RunConfig.from_yamls(env_path, ...) # explicit pathsNever construct config dataclasses directly.
SingleRun.run(test=True) and BenchmarkRun methods return the shell command string instead of executing it. This is used throughout the test suite.
Simulation output folders follow _<code>_-_<lib name>_, e.g. _mcnp_-_FENDL 3.2c_.
Encode/decode with print_code_lib() / get_code_lib() from src/jade/helper/aux_functions.py.
Expensive state (e.g. GlobalStatus.simulations) uses @property with an internal _attr = None guard. Do not initialize in __init__.
New modules should start with this import (most existing modules already do).
All parsed tally DataFrames use only column names from ALLOWED_COLUMN_NAMES in src/jade/helper/constants.py:
Energy, Cells, time, tally, Dir, User, Segments, Multiplier, Cosine, Cor A, Cor B, Cor C
See dev guide for full details. The four required touch points are:
src/jade/helper/constants.py— add tag toCODEenumsrc/jade/config/run_config.py— subclassLibrary, register inLibraryFactorysrc/jade/run/benchmark.py+src/jade/run/input.py— subclassSingleRun(implement_build_command(),_get_lib_data_command()) andInput(implementset_nps(),translate(),_write()); register inSingleRunFactoryand in the input selection ofBenchmarkRunsrc/jade/post/sim_output.py— subclassAbstractSimOutput; wire intoRawProcessor.__init__()insrc/jade/post/raw_processor.py
Add tests mirroring the new code's path under tests/.
See dev guide for full details. The three required config YAML files go in src/jade/resources/default_cfg/benchmarks_pp/:
raw/<name>.yaml— tally → CSV pipeline (ConfigRawProcessor)excel/<name>.yaml— comparison table config (ConfigExcelProcessor)atlas/<name>.yaml— Word atlas plot config (ConfigAtlasProcessor)
Input files are hosted externally (not in this repo): IAEA GitHub for open benchmarks, F4E GitLab or SINBAD for restricted ones.
YAML alias convention: alias names must start with _ (e.g. &_my_alias) to avoid clashing with config key parsing.
- Permanent branches:
developing(default, integration),master(stable) - Branch types:
Feature/*andBenchmark/*offdeveloping;Release/*for stabilization;Hotfix/*offmaster - Semantic versioning: Major = non-backwards-compatible change (new transport code, class restructure, folder layout). Minor = new features/benchmarks. Patch = bug fixes.
- Every bug fix must include a regression test.
- PRs require an independent code review (contributor cannot review their own PR).
- OS:
ubuntu-latest,windows-latest - Python: 3.11, 3.12, 3.13, 3.14
- Full matrix only on pushes to
developing/master/release*; other branches and PRs run only the two latest Python versions (both OSes). - Coverage is uploaded to Codecov from the Ubuntu / Python 3.13 job.
- OpenMC is installed on Linux only; Windows CI skips OpenMC tests.