def load(self): """Loads the simulation.""" Env.set_nuc_data_path() self.rec = rec = Recorder() self._load_backends() self._load_schema_path() self._load_input_file() self.si = SimInit(rec, self.file_backend)
def get_schema_path(flat_schema=False, schema_path=None): """Gets the schema path based on the given schema path an the flatness.""" if flat_schema: path = Env.rng_schema(True) elif schema_path is not None: path = schema_path else: path = Env.rng_schema(False) return path
def main(args=None): """Main function for Cyclus CLI""" ensure_close_dynamic_modules() Env.set_nuc_data_path() p = make_parser() ns = p.parse_args(args=args) if(ns.rng_print): print_master_schema(ns) elif ns.input_file is not None: run_simulation(ns)
import sqlite3 import platform import tables import numpy as np from numpy.testing import assert_array_almost_equal from numpy.testing import assert_almost_equal from cyclus.lib import Env from nose.plugins.skip import SkipTest from nose.tools import assert_equal, assert_true import helper from helper import check_cmd, run_cyclus, table_exist, cyclus_has_coin ALLOW_MILPS = Env().allow_milps def skip_if_dont_allow_milps(): """A don't run certain tests if MILPs are disabled.""" if not ALLOW_MILPS: raise SkipTest("Cyclus was compiled without MILPS support or the " "ALLOW_MILPS env var was not set to true.") class TestRegression(object): """A base class for all regression tests. A derived class is required for each new input file to be tested. Each derived class *must* declare an `inf` member in their `__init__` function that points to the input file to be tested, e.g., `self.inf_ = ./path/to/my/input_file.xml. See below for examples.