From 498e07d0bf1ba58d7568cd899d20eee8298bbc92 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 22 May 2015 13:43:29 +0700 Subject: [PATCH 01/13] Move Python API into openmc/ directory and move Python scripts into scripts/ directory. --- src/CMakeLists.txt => CMakeLists.txt | 36 +++++++------------ src/Makefile => Makefile | 0 docs/source/quickinstall.rst | 3 +- docs/source/usersguide/install.rst | 36 +++++++++---------- {src/utils/openmc => openmc}/__init__.py | 0 {src/utils/openmc => openmc}/checkvalue.py | 0 {src/utils/openmc => openmc}/clean_xml.py | 0 {src/utils/openmc => openmc}/cmfd.py | 0 {src/utils/openmc => openmc}/constants.py | 0 {src/utils/openmc => openmc}/element.py | 0 {src/utils/openmc => openmc}/executor.py | 0 {src/utils/openmc => openmc}/filter.py | 0 {src/utils/openmc => openmc}/geometry.py | 0 {src/utils/openmc => openmc}/material.py | 0 {src/utils/openmc => openmc}/mesh.py | 0 {src/utils/openmc => openmc}/nuclide.py | 0 .../openmc => openmc}/opencg_compatible.py | 0 .../openmc => openmc}/particle_restart.py | 0 {src/utils/openmc => openmc}/plots.py | 0 {src/utils/openmc => openmc}/settings.py | 0 {src/utils/openmc => openmc}/statepoint.py | 0 {src/utils/openmc => openmc}/summary.py | 0 {src/utils/openmc => openmc}/surface.py | 0 {src/utils/openmc => openmc}/tallies.py | 0 {src/utils/openmc => openmc}/trigger.py | 0 {src/utils/openmc => openmc}/universe.py | 0 {src/utils => scripts}/convert_binary.py | 0 {src/utils => scripts}/convert_xsdata.py | 0 {src/utils => scripts}/convert_xsdir.py | 0 {src/utils => scripts}/memory_usage.py | 0 {src/utils => scripts}/plot_mesh_tally.py | 0 {src/utils => scripts}/statepoint_3d.py | 0 .../utils => scripts}/statepoint_histogram.py | 0 {src/utils => scripts}/tally_conv.py | 0 {src/utils => scripts}/track.py | 0 {src/utils => scripts}/update_inputs.py | 0 {src/utils => scripts}/voxel.py | 0 {src/utils => scripts}/xml_validate.py | 0 src/utils/setup.py => setup.py | 4 ++- 39 files changed, 32 insertions(+), 47 deletions(-) rename src/CMakeLists.txt => CMakeLists.txt (91%) rename src/Makefile => Makefile (100%) rename {src/utils/openmc => openmc}/__init__.py (100%) rename {src/utils/openmc => openmc}/checkvalue.py (100%) rename {src/utils/openmc => openmc}/clean_xml.py (100%) rename {src/utils/openmc => openmc}/cmfd.py (100%) rename {src/utils/openmc => openmc}/constants.py (100%) rename {src/utils/openmc => openmc}/element.py (100%) rename {src/utils/openmc => openmc}/executor.py (100%) rename {src/utils/openmc => openmc}/filter.py (100%) rename {src/utils/openmc => openmc}/geometry.py (100%) rename {src/utils/openmc => openmc}/material.py (100%) rename {src/utils/openmc => openmc}/mesh.py (100%) rename {src/utils/openmc => openmc}/nuclide.py (100%) rename {src/utils/openmc => openmc}/opencg_compatible.py (100%) rename {src/utils/openmc => openmc}/particle_restart.py (100%) rename {src/utils/openmc => openmc}/plots.py (100%) rename {src/utils/openmc => openmc}/settings.py (100%) rename {src/utils/openmc => openmc}/statepoint.py (100%) rename {src/utils/openmc => openmc}/summary.py (100%) rename {src/utils/openmc => openmc}/surface.py (100%) rename {src/utils/openmc => openmc}/tallies.py (100%) rename {src/utils/openmc => openmc}/trigger.py (100%) rename {src/utils/openmc => openmc}/universe.py (100%) rename {src/utils => scripts}/convert_binary.py (100%) rename {src/utils => scripts}/convert_xsdata.py (100%) rename {src/utils => scripts}/convert_xsdir.py (100%) rename {src/utils => scripts}/memory_usage.py (100%) rename {src/utils => scripts}/plot_mesh_tally.py (100%) rename {src/utils => scripts}/statepoint_3d.py (100%) rename {src/utils => scripts}/statepoint_histogram.py (100%) rename {src/utils => scripts}/tally_conv.py (100%) rename {src/utils => scripts}/track.py (100%) rename {src/utils => scripts}/update_inputs.py (100%) rename {src/utils => scripts}/voxel.py (100%) rename {src/utils => scripts}/xml_validate.py (100%) rename src/utils/setup.py => setup.py (69%) diff --git a/src/CMakeLists.txt b/CMakeLists.txt similarity index 91% rename from src/CMakeLists.txt rename to CMakeLists.txt index 12f408618..f004c28e9 100644 --- a/src/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,29 +169,29 @@ endif() # Only initialize git submodules if it is not there. User is responsible # for future updates of fox xml submodule. -if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/xml/fox/.git) - if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) +if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/xml/fox/.git) + if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) message("-- Cloning FoX XML git repository...") execute_process(COMMAND git clone https://github.com/mit-crpg/fox.git src/xml/fox - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) execute_process(COMMAND git checkout bdc852f4f43d969fb1b179cba79295c1e095a455 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/xml/fox) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/xml/fox) else() message("-- Initializing/Updating FoX XML submodule...") execute_process(COMMAND git submodule init - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) execute_process(COMMAND git submodule update - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endif() endif() -add_subdirectory(xml/fox) +add_subdirectory(src/xml/fox) #=============================================================================== # Build OpenMC executable #=============================================================================== set(program "openmc") -file(GLOB source *.F90 xml/openmc_fox.F90) +file(GLOB source src/*.F90 src/xml/openmc_fox.F90) add_executable(${program} ${source}) target_link_libraries(${program} ${libraries} fox_dom) set_target_properties(${program} PROPERTIES @@ -203,28 +203,16 @@ set_target_properties(${program} PROPERTIES #=============================================================================== install(TARGETS ${program} RUNTIME DESTINATION bin) -install(PROGRAMS utils/plot_mesh_tally.py - DESTINATION bin - RENAME plot_mesh_tally) -install(PROGRAMS utils/statepoint_histogram.py - DESTINATION bin - RENAME statepoint_histogram) -install(PROGRAMS utils/update_inputs.py - DESTINATION bin - RENAME update_inputs) -install(PROGRAMS utils/xml_validate.py - DESTINATION bin - RENAME xml_validate) install(DIRECTORY relaxng DESTINATION share) -install(FILES ../man/man1/openmc.1 DESTINATION share/man/man1) -install(FILES ../LICENSE DESTINATION "share/doc/${program}/copyright") +install(FILES man/man1/openmc.1 DESTINATION share/man/man1) +install(FILES LICENSE DESTINATION "share/doc/${program}/copyright") find_package(PythonInterp) if(PYTHONINTERP_FOUND) install(CODE "execute_process( COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${CMAKE_INSTALL_PREFIX} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/utils)") + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") endif() #=============================================================================== @@ -235,7 +223,7 @@ endif() include(CTest) # Get a list of all the tests to run -file(GLOB_RECURSE TESTS ${CMAKE_CURRENT_SOURCE_DIR}/../tests/test_*.py) +file(GLOB_RECURSE TESTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_*.py) # Check for MEM_CHECK and COVERAGE variables if (DEFINED ENV{MEM_CHECK}) diff --git a/src/Makefile b/Makefile similarity index 100% rename from src/Makefile rename to Makefile diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index 1ffebbebe..b64dfebda 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -43,8 +43,7 @@ the following commands in a terminal: git clone https://github.com/mit-crpg/openmc.git cd openmc git checkout -b master origin/master - mkdir src/build - cd src/build + mkdir build && cd build cmake .. make sudo make install diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index d06806d98..707355ddc 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -112,7 +112,7 @@ repository:: By default, the cloned repository will be set to the development branch. To switch to the source of the latest stable release, run the following commands:: - cd openmc/src + cd openmc git checkout master .. _GitHub: https://github.com/mit-crpg/openmc @@ -132,14 +132,13 @@ following .. code-block:: sh - mkdir src/build - cd src/build + mkdir build && cd build cmake .. make Note that first a build directory is created as a subdirectory of the source -directory. The Makefile in ``src/`` will automatically perform an out-of-source -build with default options. +directory. The Makefile in the top-level directory will automatically perform an +out-of-source build with default options. CMakeLists.txt Options ++++++++++++++++++++++ @@ -166,7 +165,7 @@ should be used: .. code-block:: sh - cmake -Ddebug=on /path/to/src + cmake -Ddebug=on /path/to/openmc Compiling with MPI ++++++++++++++++++ @@ -177,14 +176,14 @@ the MPI Fortran wrapper. For example, in a bash shell: .. code-block:: sh export FC=mpif90 - cmake /path/to/src + cmake /path/to/openmc Note that in many shells, an environment variable can be set for a single command, i.e. .. code-block:: sh - FC=mpif90 cmake /path/to/src + FC=mpif90 cmake /path/to/openmc Compiling with HDF5 +++++++++++++++++++ @@ -195,14 +194,14 @@ the HDF5 Fortran wrapper. For example, in a bash shell: .. code-block:: sh export FC=h5fc - cmake /path/to/src + cmake /path/to/openmc As noted above, an environment variable can typically be set for a single command, i.e. .. code-block:: sh - FC=h5fc cmake /path/to/src + FC=h5fc cmake /path/to/openmc To compile with support for both MPI and HDF5, use the parallel HDF5 wrapper ``h5pfc`` instead. Note that this requires that your HDF5 installation be @@ -216,8 +215,7 @@ the root directory of the source code: .. code-block:: sh - mkdir src/build - cd src/build + mkdir build && cd build cmake .. make make install @@ -267,7 +265,8 @@ the source code root directory: .. code-block:: sh - cd src + mkdir build && cd build + cmake .. make This will build an executable named ``openmc``. @@ -293,7 +292,6 @@ in the root directory of the OpenMC distribution: .. code-block:: sh - cd src make This will build an executable named ``openmc``. @@ -312,7 +310,6 @@ the source directory and run the following: .. code-block:: sh - cd src make test If you want more options for testing you can use ctest_ command. For example, @@ -320,7 +317,7 @@ if we wanted to run only the plot tests with 4 processors, we run: .. code-block:: sh - cd src/build + cd build ctest -j 4 -R plot If you want to run the full test suite with different build options please @@ -370,7 +367,7 @@ the following steps must be taken: .. code-block:: sh - openmc/src/utils/convert_xsdir.py xsdir31 cross_sections.xml + openmc/scripts/convert_xsdir.py xsdir31 cross_sections.xml 3. In the converted ``cross_sections.xml`` file, change the contents of the element to the absolute path of the directory containing the @@ -416,9 +413,8 @@ Running OpenMC Once you have a model built (see :ref:`usersguide_input`), you can either run the openmc executable directly from the directory containing your XML input files, or you can specify as a command-line argument the directory containing -the XML input files. For example, if the path of your OpenMC executable is -``/home/username/openmc/src/openmc`` and your XML input files are in the -directory ``/home/username/somemodel/``, one way to run the simulation would be: +the XML input files. For example, if your XML input files are in the directory +``/home/username/somemodel/``, one way to run the simulation would be: .. code-block:: sh diff --git a/src/utils/openmc/__init__.py b/openmc/__init__.py similarity index 100% rename from src/utils/openmc/__init__.py rename to openmc/__init__.py diff --git a/src/utils/openmc/checkvalue.py b/openmc/checkvalue.py similarity index 100% rename from src/utils/openmc/checkvalue.py rename to openmc/checkvalue.py diff --git a/src/utils/openmc/clean_xml.py b/openmc/clean_xml.py similarity index 100% rename from src/utils/openmc/clean_xml.py rename to openmc/clean_xml.py diff --git a/src/utils/openmc/cmfd.py b/openmc/cmfd.py similarity index 100% rename from src/utils/openmc/cmfd.py rename to openmc/cmfd.py diff --git a/src/utils/openmc/constants.py b/openmc/constants.py similarity index 100% rename from src/utils/openmc/constants.py rename to openmc/constants.py diff --git a/src/utils/openmc/element.py b/openmc/element.py similarity index 100% rename from src/utils/openmc/element.py rename to openmc/element.py diff --git a/src/utils/openmc/executor.py b/openmc/executor.py similarity index 100% rename from src/utils/openmc/executor.py rename to openmc/executor.py diff --git a/src/utils/openmc/filter.py b/openmc/filter.py similarity index 100% rename from src/utils/openmc/filter.py rename to openmc/filter.py diff --git a/src/utils/openmc/geometry.py b/openmc/geometry.py similarity index 100% rename from src/utils/openmc/geometry.py rename to openmc/geometry.py diff --git a/src/utils/openmc/material.py b/openmc/material.py similarity index 100% rename from src/utils/openmc/material.py rename to openmc/material.py diff --git a/src/utils/openmc/mesh.py b/openmc/mesh.py similarity index 100% rename from src/utils/openmc/mesh.py rename to openmc/mesh.py diff --git a/src/utils/openmc/nuclide.py b/openmc/nuclide.py similarity index 100% rename from src/utils/openmc/nuclide.py rename to openmc/nuclide.py diff --git a/src/utils/openmc/opencg_compatible.py b/openmc/opencg_compatible.py similarity index 100% rename from src/utils/openmc/opencg_compatible.py rename to openmc/opencg_compatible.py diff --git a/src/utils/openmc/particle_restart.py b/openmc/particle_restart.py similarity index 100% rename from src/utils/openmc/particle_restart.py rename to openmc/particle_restart.py diff --git a/src/utils/openmc/plots.py b/openmc/plots.py similarity index 100% rename from src/utils/openmc/plots.py rename to openmc/plots.py diff --git a/src/utils/openmc/settings.py b/openmc/settings.py similarity index 100% rename from src/utils/openmc/settings.py rename to openmc/settings.py diff --git a/src/utils/openmc/statepoint.py b/openmc/statepoint.py similarity index 100% rename from src/utils/openmc/statepoint.py rename to openmc/statepoint.py diff --git a/src/utils/openmc/summary.py b/openmc/summary.py similarity index 100% rename from src/utils/openmc/summary.py rename to openmc/summary.py diff --git a/src/utils/openmc/surface.py b/openmc/surface.py similarity index 100% rename from src/utils/openmc/surface.py rename to openmc/surface.py diff --git a/src/utils/openmc/tallies.py b/openmc/tallies.py similarity index 100% rename from src/utils/openmc/tallies.py rename to openmc/tallies.py diff --git a/src/utils/openmc/trigger.py b/openmc/trigger.py similarity index 100% rename from src/utils/openmc/trigger.py rename to openmc/trigger.py diff --git a/src/utils/openmc/universe.py b/openmc/universe.py similarity index 100% rename from src/utils/openmc/universe.py rename to openmc/universe.py diff --git a/src/utils/convert_binary.py b/scripts/convert_binary.py similarity index 100% rename from src/utils/convert_binary.py rename to scripts/convert_binary.py diff --git a/src/utils/convert_xsdata.py b/scripts/convert_xsdata.py similarity index 100% rename from src/utils/convert_xsdata.py rename to scripts/convert_xsdata.py diff --git a/src/utils/convert_xsdir.py b/scripts/convert_xsdir.py similarity index 100% rename from src/utils/convert_xsdir.py rename to scripts/convert_xsdir.py diff --git a/src/utils/memory_usage.py b/scripts/memory_usage.py similarity index 100% rename from src/utils/memory_usage.py rename to scripts/memory_usage.py diff --git a/src/utils/plot_mesh_tally.py b/scripts/plot_mesh_tally.py similarity index 100% rename from src/utils/plot_mesh_tally.py rename to scripts/plot_mesh_tally.py diff --git a/src/utils/statepoint_3d.py b/scripts/statepoint_3d.py similarity index 100% rename from src/utils/statepoint_3d.py rename to scripts/statepoint_3d.py diff --git a/src/utils/statepoint_histogram.py b/scripts/statepoint_histogram.py similarity index 100% rename from src/utils/statepoint_histogram.py rename to scripts/statepoint_histogram.py diff --git a/src/utils/tally_conv.py b/scripts/tally_conv.py similarity index 100% rename from src/utils/tally_conv.py rename to scripts/tally_conv.py diff --git a/src/utils/track.py b/scripts/track.py similarity index 100% rename from src/utils/track.py rename to scripts/track.py diff --git a/src/utils/update_inputs.py b/scripts/update_inputs.py similarity index 100% rename from src/utils/update_inputs.py rename to scripts/update_inputs.py diff --git a/src/utils/voxel.py b/scripts/voxel.py similarity index 100% rename from src/utils/voxel.py rename to scripts/voxel.py diff --git a/src/utils/xml_validate.py b/scripts/xml_validate.py similarity index 100% rename from src/utils/xml_validate.py rename to scripts/xml_validate.py diff --git a/src/utils/setup.py b/setup.py similarity index 69% rename from src/utils/setup.py rename to setup.py index 72682aea9..86047cc55 100644 --- a/src/utils/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os from distutils.core import setup setup(name='openmc', @@ -8,4 +9,5 @@ setup(name='openmc', author='Will Boyd', author_email='wbinventor@gmail.com', url='https://github.com/mit-crpg/openmc', - packages=['openmc']) + packages=['openmc'], + scripts=[os.path.join('scripts', f) for f in os.listdir('scripts')]) From 3b5640fcb467b30a66bfde5318fb7b83b5f5b9a3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 22 May 2015 13:46:36 +0700 Subject: [PATCH 02/13] Update .gitignore --- .gitignore | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c92c10340..a052c2a4a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ # Compiler python objects *.pyc -# OpenMC executable -src/openmc - # Inputs generated from Python API examples/python/**/*.xml @@ -25,7 +22,7 @@ docs/build docs/source/_images/*.pdf # Source build -src/build +build # build from src/utils/setup.py src/utils/build @@ -33,9 +30,6 @@ src/utils/build # xml-fortran reader src/xml-fortran/xmlreader -# Modules built from XML templates -src/templates/*.f90 - # Test results error file results_error.dat @@ -61,4 +55,4 @@ data/nndc # PyCharm project configuration files .idea -.idea/* \ No newline at end of file +.idea/* From 4d2dbff8de01754196f97f6c8834e10be111c291 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 22 May 2015 16:59:47 +0700 Subject: [PATCH 03/13] Rename scripts to all start with openmc-. Also added openmc.ace module. --- data/get_nndc_data.py | 4 ++-- scripts/convert_binary.py => openmc/ace.py | 12 ------------ scripts/openmc-ascii-to-binary | 13 +++++++++++++ scripts/{memory_usage.py => openmc-memory-usage} | 0 .../{plot_mesh_tally.py => openmc-plot-mesh-tally} | 0 scripts/{statepoint_3d.py => openmc-statepoint-3d} | 0 ...int_histogram.py => openmc-statepoint-histogram} | 0 scripts/{tally_conv.py => openmc-tally-convergence} | 0 scripts/{track.py => openmc-track-to-vtk} | 0 scripts/{update_inputs.py => openmc-update-inputs} | 0 scripts/{xml_validate.py => openmc-validate-xml} | 0 scripts/{voxel.py => openmc-voxel-to-silovtk} | 0 scripts/{convert_xsdata.py => openmc-xsdata-to-xml} | 0 scripts/{convert_xsdir.py => openmc-xsdir-to-xml} | 0 14 files changed, 15 insertions(+), 14 deletions(-) rename scripts/convert_binary.py => openmc/ace.py (88%) mode change 100755 => 100644 create mode 100755 scripts/openmc-ascii-to-binary rename scripts/{memory_usage.py => openmc-memory-usage} (100%) rename scripts/{plot_mesh_tally.py => openmc-plot-mesh-tally} (100%) rename scripts/{statepoint_3d.py => openmc-statepoint-3d} (100%) rename scripts/{statepoint_histogram.py => openmc-statepoint-histogram} (100%) rename scripts/{tally_conv.py => openmc-tally-convergence} (100%) rename scripts/{track.py => openmc-track-to-vtk} (100%) rename scripts/{update_inputs.py => openmc-update-inputs} (100%) rename scripts/{xml_validate.py => openmc-validate-xml} (100%) rename scripts/{voxel.py => openmc-voxel-to-silovtk} (100%) rename scripts/{convert_xsdata.py => openmc-xsdata-to-xml} (100%) rename scripts/{convert_xsdir.py => openmc-xsdir-to-xml} (100%) diff --git a/data/get_nndc_data.py b/data/get_nndc_data.py index 5df69f3ac..18c94dd64 100755 --- a/data/get_nndc_data.py +++ b/data/get_nndc_data.py @@ -21,8 +21,8 @@ except ImportError: from urllib2 import urlopen cwd = os.getcwd() -sys.path.append(os.path.join(cwd, '..', 'src', 'utils')) -from convert_binary import ascii_to_binary +sys.path.insert(0, os.path.join(cwd, '..')) +from openmc.ace import ascii_to_binary baseUrl = 'http://www.nndc.bnl.gov/endf/b7.1/aceFiles/' files = ['ENDF-B-VII.1-neutron-293.6K.tar.gz', diff --git a/scripts/convert_binary.py b/openmc/ace.py old mode 100755 new mode 100644 similarity index 88% rename from scripts/convert_binary.py rename to openmc/ace.py index 48477c27e..3606b1e94 --- a/scripts/convert_binary.py +++ b/openmc/ace.py @@ -1,9 +1,5 @@ -#!/usr/bin/env python - from __future__ import division - from struct import pack -import sys def ascii_to_binary(ascii_file, binary_file): @@ -67,11 +63,3 @@ def ascii_to_binary(ascii_file, binary_file): # Close binary file binary.close() - -if __name__ == '__main__': - # Check for proper number of arguments - if len(sys.argv) < 3: - sys.exit('Usage: {0} ascii_file binary_file'.format(sys.argv[0])) - - # Convert ASCII file - ascii_to_binary(sys.argv[1], sys.argv[2]) diff --git a/scripts/openmc-ascii-to-binary b/scripts/openmc-ascii-to-binary new file mode 100755 index 000000000..e707e2a85 --- /dev/null +++ b/scripts/openmc-ascii-to-binary @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +from openmc.ace import ascii_to_binary +import sys + + +if __name__ == '__main__': + # Check for proper number of arguments + if len(sys.argv) < 3: + sys.exit('Usage: {0} ascii_file binary_file'.format(sys.argv[0])) + + # Convert ASCII file + ascii_to_binary(sys.argv[1], sys.argv[2]) diff --git a/scripts/memory_usage.py b/scripts/openmc-memory-usage similarity index 100% rename from scripts/memory_usage.py rename to scripts/openmc-memory-usage diff --git a/scripts/plot_mesh_tally.py b/scripts/openmc-plot-mesh-tally similarity index 100% rename from scripts/plot_mesh_tally.py rename to scripts/openmc-plot-mesh-tally diff --git a/scripts/statepoint_3d.py b/scripts/openmc-statepoint-3d similarity index 100% rename from scripts/statepoint_3d.py rename to scripts/openmc-statepoint-3d diff --git a/scripts/statepoint_histogram.py b/scripts/openmc-statepoint-histogram similarity index 100% rename from scripts/statepoint_histogram.py rename to scripts/openmc-statepoint-histogram diff --git a/scripts/tally_conv.py b/scripts/openmc-tally-convergence similarity index 100% rename from scripts/tally_conv.py rename to scripts/openmc-tally-convergence diff --git a/scripts/track.py b/scripts/openmc-track-to-vtk similarity index 100% rename from scripts/track.py rename to scripts/openmc-track-to-vtk diff --git a/scripts/update_inputs.py b/scripts/openmc-update-inputs similarity index 100% rename from scripts/update_inputs.py rename to scripts/openmc-update-inputs diff --git a/scripts/xml_validate.py b/scripts/openmc-validate-xml similarity index 100% rename from scripts/xml_validate.py rename to scripts/openmc-validate-xml diff --git a/scripts/voxel.py b/scripts/openmc-voxel-to-silovtk similarity index 100% rename from scripts/voxel.py rename to scripts/openmc-voxel-to-silovtk diff --git a/scripts/convert_xsdata.py b/scripts/openmc-xsdata-to-xml similarity index 100% rename from scripts/convert_xsdata.py rename to scripts/openmc-xsdata-to-xml diff --git a/scripts/convert_xsdir.py b/scripts/openmc-xsdir-to-xml similarity index 100% rename from scripts/convert_xsdir.py rename to scripts/openmc-xsdir-to-xml From acc7b2cf2490b2eca9ac54bfd2254b0537ebe602 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 22 May 2015 17:04:27 +0700 Subject: [PATCH 04/13] Fix openmc imports in tests and fix a few paths in run_test.py --- tests/run_tests.py | 18 +++++++++--------- tests/test_basic/results.py | 2 +- tests/test_cmfd_feed/results.py | 2 +- tests/test_cmfd_nofeed/results.py | 2 +- tests/test_confidence_intervals/results.py | 2 +- tests/test_density_atombcm/results.py | 2 +- tests/test_density_atomcm3/results.py | 2 +- tests/test_density_kgm3/results.py | 2 +- tests/test_density_sum/results.py | 2 +- tests/test_eigenvalue_genperbatch/results.py | 2 +- tests/test_eigenvalue_no_inactive/results.py | 2 +- tests/test_energy_grid/results.py | 2 +- tests/test_entropy/results.py | 2 +- tests/test_filter_cell/results.py | 2 +- tests/test_filter_cellborn/results.py | 2 +- tests/test_filter_distribcell/results.py | 2 +- tests/test_filter_energy/results.py | 2 +- tests/test_filter_energyout/results.py | 2 +- tests/test_filter_group_transfer/results.py | 2 +- tests/test_filter_material/results.py | 2 +- tests/test_filter_mesh_2d/results.py | 2 +- tests/test_filter_mesh_3d/results.py | 2 +- tests/test_filter_universe/results.py | 2 +- tests/test_fixed_source/results.py | 2 +- tests/test_infinite_cell/results.py | 2 +- tests/test_lattice/results.py | 2 +- tests/test_lattice_hex/results.py | 2 +- tests/test_lattice_mixed/results.py | 2 +- tests/test_lattice_multiple/results.py | 2 +- tests/test_natural_element/results.py | 2 +- tests/test_output/results.py | 2 +- tests/test_particle_restart_eigval/results.py | 2 +- tests/test_particle_restart_fixed/results.py | 2 +- tests/test_ptables_off/results.py | 2 +- tests/test_reflective_cone/results.py | 2 +- tests/test_reflective_cylinder/results.py | 2 +- tests/test_reflective_plane/results.py | 2 +- tests/test_reflective_sphere/results.py | 2 +- tests/test_resonance_scattering/results.py | 2 +- tests/test_rotation/results.py | 2 +- tests/test_salphabeta/results.py | 2 +- tests/test_salphabeta_multiple/results.py | 2 +- tests/test_score_MT/results.py | 2 +- tests/test_score_absorption/results.py | 2 +- tests/test_score_current/results.py | 2 +- tests/test_score_events/results.py | 2 +- tests/test_score_fission/results.py | 2 +- tests/test_score_flux/results.py | 2 +- tests/test_score_flux_yn/results.py | 2 +- tests/test_score_kappafission/results.py | 2 +- tests/test_score_nufission/results.py | 2 +- tests/test_score_nuscatter/results.py | 2 +- tests/test_score_nuscatter_n/results.py | 2 +- tests/test_score_nuscatter_pn/results.py | 2 +- tests/test_score_nuscatter_yn/results.py | 2 +- tests/test_score_scatter/results.py | 2 +- tests/test_score_scatter_n/results.py | 2 +- tests/test_score_scatter_pn/results.py | 2 +- tests/test_score_scatter_yn/results.py | 2 +- tests/test_score_total/results.py | 2 +- tests/test_score_total_yn/results.py | 2 +- tests/test_seed/results.py | 2 +- tests/test_source_angle_mono/results.py | 2 +- tests/test_source_energy_maxwell/results.py | 2 +- tests/test_source_energy_mono/results.py | 2 +- tests/test_source_file/results.py | 2 +- tests/test_source_point/results.py | 2 +- tests/test_sourcepoint_batch/results.py | 2 +- tests/test_sourcepoint_interval/results.py | 2 +- tests/test_sourcepoint_latest/results.py | 2 +- tests/test_sourcepoint_restart/results.py | 2 +- tests/test_statepoint_batch/results.py | 2 +- tests/test_statepoint_interval/results.py | 2 +- tests/test_statepoint_restart/results.py | 2 +- tests/test_statepoint_sourcesep/results.py | 2 +- tests/test_survival_biasing/results.py | 2 +- tests/test_tally_assumesep/results.py | 2 +- tests/test_tally_nuclides/results.py | 2 +- tests/test_trace/results.py | 2 +- tests/test_track_output/results.py | 2 +- tests/test_translation/results.py | 2 +- tests/test_trigger_batch_interval/results.py | 2 +- .../test_trigger_no_batch_interval/results.py | 2 +- tests/test_trigger_no_status/results.py | 2 +- tests/test_trigger_tallies/results.py | 2 +- tests/test_uniform_fs/results.py | 2 +- tests/test_union_energy_grids/results.py | 2 +- tests/test_universe/results.py | 2 +- tests/test_void/results.py | 2 +- 89 files changed, 97 insertions(+), 97 deletions(-) diff --git a/tests/run_tests.py b/tests/run_tests.py index 3a8296083..1679fa5c3 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -121,7 +121,7 @@ class Test(object): self.skipped = False self.valgrind_cmd = "" self.gcov_cmd = "" - self.cmake = ['cmake', '-H../src', '-Bbuild'] + self.cmake = ['cmake', '-H..', '-Bbuild'] # Check for MPI/HDF5 if self.mpi and not self.hdf5: @@ -345,15 +345,15 @@ else: script_mode = False # Setup CTest script vars. Not used in non-script mode -pwd = os.environ['PWD'] +pwd = os.getcwd() ctest_vars = { -'source_dir' : pwd + '/../src', -'build_dir' : pwd + '/build', -'host_name' : socket.gethostname(), -'dashboard' : dash, -'submit' : submit, -'update' : update, -'n_procs' : options.n_procs + 'source_dir': os.path.join(pwd, '..'), + 'build_dir': os.path.join(pwd, 'build'), + 'host_name': socket.gethostname(), + 'dashboard': dash, + 'submit': submit, + 'update': update, + 'n_procs': options.n_procs } # Check project name diff --git a/tests/test_basic/results.py b/tests/test_basic/results.py index 55087f58c..479a94833 100644 --- a/tests/test_basic/results.py +++ b/tests/test_basic/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_cmfd_feed/results.py b/tests/test_cmfd_feed/results.py index 869b785f3..577941c24 100644 --- a/tests/test_cmfd_feed/results.py +++ b/tests/test_cmfd_feed/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc diff --git a/tests/test_cmfd_nofeed/results.py b/tests/test_cmfd_nofeed/results.py index d22c2b2b4..4c8ea4444 100644 --- a/tests/test_cmfd_nofeed/results.py +++ b/tests/test_cmfd_nofeed/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc diff --git a/tests/test_confidence_intervals/results.py b/tests/test_confidence_intervals/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_confidence_intervals/results.py +++ b/tests/test_confidence_intervals/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_density_atombcm/results.py b/tests/test_density_atombcm/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_density_atombcm/results.py +++ b/tests/test_density_atombcm/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_density_atomcm3/results.py b/tests/test_density_atomcm3/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_density_atomcm3/results.py +++ b/tests/test_density_atomcm3/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_density_kgm3/results.py b/tests/test_density_kgm3/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_density_kgm3/results.py +++ b/tests/test_density_kgm3/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_density_sum/results.py b/tests/test_density_sum/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_density_sum/results.py +++ b/tests/test_density_sum/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_eigenvalue_genperbatch/results.py b/tests/test_eigenvalue_genperbatch/results.py index 6b61666a6..cb97c815f 100644 --- a/tests/test_eigenvalue_genperbatch/results.py +++ b/tests/test_eigenvalue_genperbatch/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_eigenvalue_no_inactive/results.py b/tests/test_eigenvalue_no_inactive/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_eigenvalue_no_inactive/results.py +++ b/tests/test_eigenvalue_no_inactive/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_energy_grid/results.py b/tests/test_energy_grid/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_energy_grid/results.py +++ b/tests/test_energy_grid/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_entropy/results.py b/tests/test_entropy/results.py index 843bf4631..a55f37a26 100644 --- a/tests/test_entropy/results.py +++ b/tests/test_entropy/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_cell/results.py b/tests/test_filter_cell/results.py index e113be6d7..996a2b96d 100644 --- a/tests/test_filter_cell/results.py +++ b/tests/test_filter_cell/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_cellborn/results.py b/tests/test_filter_cellborn/results.py index e113be6d7..996a2b96d 100644 --- a/tests/test_filter_cellborn/results.py +++ b/tests/test_filter_cellborn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_distribcell/results.py b/tests/test_filter_distribcell/results.py index a1dc38ebd..67997aafd 100644 --- a/tests/test_filter_distribcell/results.py +++ b/tests/test_filter_distribcell/results.py @@ -4,7 +4,7 @@ import sys import numpy as np # import statepoint -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') from openmc.statepoint import StatePoint from openmc import Filter diff --git a/tests/test_filter_energy/results.py b/tests/test_filter_energy/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_filter_energy/results.py +++ b/tests/test_filter_energy/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_energyout/results.py b/tests/test_filter_energyout/results.py index 19cd4d9a3..7e6fe8909 100644 --- a/tests/test_filter_energyout/results.py +++ b/tests/test_filter_energyout/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_group_transfer/results.py b/tests/test_filter_group_transfer/results.py index 19cd4d9a3..7e6fe8909 100644 --- a/tests/test_filter_group_transfer/results.py +++ b/tests/test_filter_group_transfer/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_material/results.py b/tests/test_filter_material/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_filter_material/results.py +++ b/tests/test_filter_material/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_mesh_2d/results.py b/tests/test_filter_mesh_2d/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_filter_mesh_2d/results.py +++ b/tests/test_filter_mesh_2d/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_mesh_3d/results.py b/tests/test_filter_mesh_3d/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_filter_mesh_3d/results.py +++ b/tests/test_filter_mesh_3d/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_filter_universe/results.py b/tests/test_filter_universe/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_filter_universe/results.py +++ b/tests/test_filter_universe/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_fixed_source/results.py b/tests/test_fixed_source/results.py index 0e7a3e017..f39d73de6 100644 --- a/tests/test_fixed_source/results.py +++ b/tests/test_fixed_source/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_infinite_cell/results.py b/tests/test_infinite_cell/results.py index 9b8c89cd2..076b19411 100644 --- a/tests/test_infinite_cell/results.py +++ b/tests/test_infinite_cell/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_lattice/results.py b/tests/test_lattice/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_lattice/results.py +++ b/tests/test_lattice/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_lattice_hex/results.py b/tests/test_lattice_hex/results.py index ae613eee6..d5317232e 100644 --- a/tests/test_lattice_hex/results.py +++ b/tests/test_lattice_hex/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_lattice_mixed/results.py b/tests/test_lattice_mixed/results.py index dc021dc22..769d2761e 100644 --- a/tests/test_lattice_mixed/results.py +++ b/tests/test_lattice_mixed/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_lattice_multiple/results.py b/tests/test_lattice_multiple/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_lattice_multiple/results.py +++ b/tests/test_lattice_multiple/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_natural_element/results.py b/tests/test_natural_element/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_natural_element/results.py +++ b/tests/test_natural_element/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_output/results.py b/tests/test_output/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_output/results.py +++ b/tests/test_output/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_particle_restart_eigval/results.py b/tests/test_particle_restart_eigval/results.py index 2ff1ef2b8..192342e6d 100644 --- a/tests/test_particle_restart_eigval/results.py +++ b/tests/test_particle_restart_eigval/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import particle restart import openmc.particle_restart as pr diff --git a/tests/test_particle_restart_fixed/results.py b/tests/test_particle_restart_fixed/results.py index 6c9a40d5a..5cbbb0021 100644 --- a/tests/test_particle_restart_fixed/results.py +++ b/tests/test_particle_restart_fixed/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import particle restart import openmc.particle_restart as pr diff --git a/tests/test_ptables_off/results.py b/tests/test_ptables_off/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_ptables_off/results.py +++ b/tests/test_ptables_off/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_reflective_cone/results.py b/tests/test_reflective_cone/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_reflective_cone/results.py +++ b/tests/test_reflective_cone/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_reflective_cylinder/results.py b/tests/test_reflective_cylinder/results.py index 21e060889..b8e813daf 100644 --- a/tests/test_reflective_cylinder/results.py +++ b/tests/test_reflective_cylinder/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc.statepoint as statepoint diff --git a/tests/test_reflective_plane/results.py b/tests/test_reflective_plane/results.py index 21e060889..b8e813daf 100644 --- a/tests/test_reflective_plane/results.py +++ b/tests/test_reflective_plane/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc.statepoint as statepoint diff --git a/tests/test_reflective_sphere/results.py b/tests/test_reflective_sphere/results.py index 21e060889..b8e813daf 100644 --- a/tests/test_reflective_sphere/results.py +++ b/tests/test_reflective_sphere/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc.statepoint as statepoint diff --git a/tests/test_resonance_scattering/results.py b/tests/test_resonance_scattering/results.py index fdecf48f8..cd50adf18 100644 --- a/tests/test_resonance_scattering/results.py +++ b/tests/test_resonance_scattering/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_rotation/results.py b/tests/test_rotation/results.py index 21e060889..b8e813daf 100644 --- a/tests/test_rotation/results.py +++ b/tests/test_rotation/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc.statepoint as statepoint diff --git a/tests/test_salphabeta/results.py b/tests/test_salphabeta/results.py index 21e060889..b8e813daf 100644 --- a/tests/test_salphabeta/results.py +++ b/tests/test_salphabeta/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint import openmc.statepoint as statepoint diff --git a/tests/test_salphabeta_multiple/results.py b/tests/test_salphabeta_multiple/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_salphabeta_multiple/results.py +++ b/tests/test_salphabeta_multiple/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_MT/results.py b/tests/test_score_MT/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_MT/results.py +++ b/tests/test_score_MT/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_absorption/results.py b/tests/test_score_absorption/results.py index c6c923710..126eebb6e 100644 --- a/tests/test_score_absorption/results.py +++ b/tests/test_score_absorption/results.py @@ -4,7 +4,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_current/results.py b/tests/test_score_current/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_current/results.py +++ b/tests/test_score_current/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_events/results.py b/tests/test_score_events/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_events/results.py +++ b/tests/test_score_events/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_fission/results.py b/tests/test_score_fission/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_fission/results.py +++ b/tests/test_score_fission/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_flux/results.py b/tests/test_score_flux/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_flux/results.py +++ b/tests/test_score_flux/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_flux_yn/results.py b/tests/test_score_flux_yn/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_flux_yn/results.py +++ b/tests/test_score_flux_yn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_kappafission/results.py b/tests/test_score_kappafission/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_kappafission/results.py +++ b/tests/test_score_kappafission/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_nufission/results.py b/tests/test_score_nufission/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_nufission/results.py +++ b/tests/test_score_nufission/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_nuscatter/results.py b/tests/test_score_nuscatter/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_nuscatter/results.py +++ b/tests/test_score_nuscatter/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_nuscatter_n/results.py b/tests/test_score_nuscatter_n/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_nuscatter_n/results.py +++ b/tests/test_score_nuscatter_n/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_nuscatter_pn/results.py b/tests/test_score_nuscatter_pn/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_nuscatter_pn/results.py +++ b/tests/test_score_nuscatter_pn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_nuscatter_yn/results.py b/tests/test_score_nuscatter_yn/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_nuscatter_yn/results.py +++ b/tests/test_score_nuscatter_yn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_scatter/results.py b/tests/test_score_scatter/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_scatter/results.py +++ b/tests/test_score_scatter/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_scatter_n/results.py b/tests/test_score_scatter_n/results.py index 63208a987..ec65cc60e 100644 --- a/tests/test_score_scatter_n/results.py +++ b/tests/test_score_scatter_n/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_scatter_pn/results.py b/tests/test_score_scatter_pn/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_scatter_pn/results.py +++ b/tests/test_score_scatter_pn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_scatter_yn/results.py b/tests/test_score_scatter_yn/results.py index 40b65f9da..badc816d9 100644 --- a/tests/test_score_scatter_yn/results.py +++ b/tests/test_score_scatter_yn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_total/results.py b/tests/test_score_total/results.py index 1384d45d1..1f94be37b 100644 --- a/tests/test_score_total/results.py +++ b/tests/test_score_total/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_score_total_yn/results.py b/tests/test_score_total_yn/results.py index 86ccd719d..92ee8133f 100644 --- a/tests/test_score_total_yn/results.py +++ b/tests/test_score_total_yn/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_seed/results.py b/tests/test_seed/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_seed/results.py +++ b/tests/test_seed/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_source_angle_mono/results.py b/tests/test_source_angle_mono/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_source_angle_mono/results.py +++ b/tests/test_source_angle_mono/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_source_energy_maxwell/results.py b/tests/test_source_energy_maxwell/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_source_energy_maxwell/results.py +++ b/tests/test_source_energy_maxwell/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_source_energy_mono/results.py b/tests/test_source_energy_mono/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_source_energy_mono/results.py +++ b/tests/test_source_energy_mono/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_source_file/results.py b/tests/test_source_file/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_source_file/results.py +++ b/tests/test_source_file/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_source_point/results.py b/tests/test_source_point/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_source_point/results.py +++ b/tests/test_source_point/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_sourcepoint_batch/results.py b/tests/test_sourcepoint_batch/results.py index 1e51de783..2cd808705 100644 --- a/tests/test_sourcepoint_batch/results.py +++ b/tests/test_sourcepoint_batch/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_sourcepoint_interval/results.py b/tests/test_sourcepoint_interval/results.py index 1e51de783..2cd808705 100644 --- a/tests/test_sourcepoint_interval/results.py +++ b/tests/test_sourcepoint_interval/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_sourcepoint_latest/results.py b/tests/test_sourcepoint_latest/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_sourcepoint_latest/results.py +++ b/tests/test_sourcepoint_latest/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_sourcepoint_restart/results.py b/tests/test_sourcepoint_restart/results.py index 9a1f0fcd4..cbf927c5c 100644 --- a/tests/test_sourcepoint_restart/results.py +++ b/tests/test_sourcepoint_restart/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_statepoint_batch/results.py b/tests/test_statepoint_batch/results.py index a43950a29..642492d26 100644 --- a/tests/test_statepoint_batch/results.py +++ b/tests/test_statepoint_batch/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_statepoint_interval/results.py b/tests/test_statepoint_interval/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_statepoint_interval/results.py +++ b/tests/test_statepoint_interval/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_statepoint_restart/results.py b/tests/test_statepoint_restart/results.py index 394c8fc4b..3b7d3303d 100644 --- a/tests/test_statepoint_restart/results.py +++ b/tests/test_statepoint_restart/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_statepoint_sourcesep/results.py b/tests/test_statepoint_sourcesep/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_statepoint_sourcesep/results.py +++ b/tests/test_statepoint_sourcesep/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_survival_biasing/results.py b/tests/test_survival_biasing/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_survival_biasing/results.py +++ b/tests/test_survival_biasing/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_tally_assumesep/results.py b/tests/test_tally_assumesep/results.py index c775a8007..f2df0495f 100644 --- a/tests/test_tally_assumesep/results.py +++ b/tests/test_tally_assumesep/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_tally_nuclides/results.py b/tests/test_tally_nuclides/results.py index 4d6d2f05e..1fbdd5e3c 100644 --- a/tests/test_tally_nuclides/results.py +++ b/tests/test_tally_nuclides/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_trace/results.py b/tests/test_trace/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_trace/results.py +++ b/tests/test_trace/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_track_output/results.py b/tests/test_track_output/results.py index f79b47eff..959dd40d5 100644 --- a/tests/test_track_output/results.py +++ b/tests/test_track_output/results.py @@ -17,7 +17,7 @@ except ImportError: exit() # Run track processing script -call(['../../src/utils/track.py', '-o', 'poly'] + +call(['../../track.py', '-o', 'poly'] + glob.glob(''.join((cwd, '/track*')))) poly = ''.join((cwd, '/poly.pvtp')) assert os.path.isfile(poly), 'poly.pvtp file not found.' diff --git a/tests/test_translation/results.py b/tests/test_translation/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_translation/results.py +++ b/tests/test_translation/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_trigger_batch_interval/results.py b/tests/test_trigger_batch_interval/results.py index 922fd4f74..6cdec2654 100644 --- a/tests/test_trigger_batch_interval/results.py +++ b/tests/test_trigger_batch_interval/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') from openmc.statepoint import StatePoint diff --git a/tests/test_trigger_no_batch_interval/results.py b/tests/test_trigger_no_batch_interval/results.py index 3665b48a9..97ac258df 100644 --- a/tests/test_trigger_no_batch_interval/results.py +++ b/tests/test_trigger_no_batch_interval/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') from openmc.statepoint import StatePoint diff --git a/tests/test_trigger_no_status/results.py b/tests/test_trigger_no_status/results.py index 7754ec7e5..36bfc3b3d 100644 --- a/tests/test_trigger_no_status/results.py +++ b/tests/test_trigger_no_status/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') from openmc.statepoint import StatePoint diff --git a/tests/test_trigger_tallies/results.py b/tests/test_trigger_tallies/results.py index 88aa4146f..24602909b 100644 --- a/tests/test_trigger_tallies/results.py +++ b/tests/test_trigger_tallies/results.py @@ -3,7 +3,7 @@ import sys import numpy as np -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') from openmc.statepoint import StatePoint diff --git a/tests/test_uniform_fs/results.py b/tests/test_uniform_fs/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_uniform_fs/results.py +++ b/tests/test_uniform_fs/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_union_energy_grids/results.py b/tests/test_union_energy_grids/results.py index b616e2874..234e69f33 100644 --- a/tests/test_union_energy_grids/results.py +++ b/tests/test_union_energy_grids/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_universe/results.py b/tests/test_universe/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_universe/results.py +++ b/tests/test_universe/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint diff --git a/tests/test_void/results.py b/tests/test_void/results.py index d7aba2bcf..455905701 100644 --- a/tests/test_void/results.py +++ b/tests/test_void/results.py @@ -2,7 +2,7 @@ import sys -sys.path.insert(0, '../../src/utils') +sys.path.insert(0, '../..') # import statepoint from openmc.statepoint import StatePoint From e95a53864a2740406986ba2ca31a32114a77d23b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 23 May 2015 10:48:32 +0700 Subject: [PATCH 05/13] Update description of input-validating scrpit in user's guide --- docs/source/usersguide/input.rst | 47 +++++++++++++++----------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index e33a2e07e..426298076 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -55,23 +55,20 @@ files are called: Validating XML Files -------------------- -Input files can be checked before executing OpenMC using the ``xml_validate`` -script. It is located in ``src/utils/xml_validate.py`` in the source code or in -``bin/xml_validate`` in the install directory. - -Two command line arguments can be set when running ``xml_validate``: +Input files can be checked before executing OpenMC using the +``openmc-validate-xml`` script which is installed alongside the Python API. Two +command line arguments can be set when running ``openmc-validate-xml``: * ``-i``, ``--input-path`` - Location of OpenMC input files. *Default*: current working directory * ``-r``, ``--relaxng-path`` - Location of OpenMC RelaxNG files. *Default*: None -If the RelaxNG path is not set, ``xml_validate`` will search for these files -because it expects that the user is either running the script located in the -install directory ``bin`` folder or in ``src/utils``. Once executed, it will -match OpenMC XML files with their RelaxNG schema and check if they are valid. -Below is a table of the messages that will be printed after each file is -checked. +If the RelaxNG path is not set, the script will search for these files because +it expects that the user is either running the script located in the install +directory ``bin`` folder or in ``src/utils``. Once executed, it will match +OpenMC XML files with their RelaxNG schema and check if they are valid. Below +is a table of the messages that will be printed after each file is checked. ======================== =================================== Message Description @@ -193,7 +190,7 @@ should be performed. It has the following attributes/sub-elements: *Default*: None :threshold: - The precision trigger's convergence criterion for the + The precision trigger's convergence criterion for the combined :math:`k_{eff}`. *Default*: None @@ -646,16 +643,16 @@ particle number, respectively. ------------------------- OpenMC includes tally precision triggers which allow the user to define -uncertainty thresholds on :math:`k_{eff}` in the ```` subelement of -``settings.xml``, and/or tallies in ``tallies.xml``. When using triggers, +uncertainty thresholds on :math:`k_{eff}` in the ```` subelement of +``settings.xml``, and/or tallies in ``tallies.xml``. When using triggers, OpenMC will run until it completes as many batches as defined by ````. -At this point, the uncertainties on all tallied values are computed and -compared with their corresponding trigger thresholds. If any triggers have not -been met, OpenMC will continue until either all trigger thresholds have been +At this point, the uncertainties on all tallied values are computed and +compared with their corresponding trigger thresholds. If any triggers have not +been met, OpenMC will continue until either all trigger thresholds have been satisfied or ```` has been reached. The ```` element provides an active "toggle switch" for tally -precision trigger(s), the maximum number of batches and the batch interval. It +precision trigger(s), the maximum number of batches and the batch interval. It has the following attributes/sub-elements: :active: @@ -674,11 +671,11 @@ has the following attributes/sub-elements: OpenMC will check if the trigger has been reached at each batch defined by ``batch_interval`` after the minimum number of batches is reached. - .. note:: If this tag is not present, the ``batch_interval`` is predicted - dynamically by OpenMC for each convergence check. The predictive - model assumes no correlation between fission sources - distributions from batch-to-batch. This assumption is reasonable - for fixed source and small criticality calculations, but is very + .. note:: If this tag is not present, the ``batch_interval`` is predicted + dynamically by OpenMC for each convergence check. The predictive + model assumes no correlation between fission sources + distributions from batch-to-batch. This assumption is reasonable + for fixed source and small criticality calculations, but is very optimistic for highly coupled full-core reactor problems. @@ -1382,8 +1379,8 @@ The ```` element accepts the following sub-elements: Number of scoring events :trigger: - Precision trigger applied to all filter bins and nuclides for this tally. - It must specify the trigger's type, threshold and scores to which it will + Precision trigger applied to all filter bins and nuclides for this tally. + It must specify the trigger's type, threshold and scores to which it will be applied. It has the following attributes/sub-elements: :type: From a8a98f0aa6bc6628338aed08372f1b90892cdf7b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 23 May 2015 11:16:12 +0700 Subject: [PATCH 06/13] Expand setup.py to include required and optional dependencies --- setup.py | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 86047cc55..830d54215 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,35 @@ #!/usr/bin/env python +import glob import os -from distutils.core import setup +from setuptools import setup, find_packages setup(name='openmc', version='0.6.2', - description='OpenMC Python API', + packages=find_packages(), + scripts=glob.glob('scripts/openmc-*'), + + # Required dependencies + install_requires=['numpy', 'scipy', 'h5py', 'matplotlib'], + + # Optional dependencies + extras_require={ + 'vtk': ['vtk', 'silomesh'], + 'validate': ['lxml'], + }, + + # Metadata author='Will Boyd', author_email='wbinventor@gmail.com', + description='OpenMC Python API', url='https://github.com/mit-crpg/openmc', - packages=['openmc'], - scripts=[os.path.join('scripts', f) for f in os.listdir('scripts')]) + classifiers=[ + 'Intended Audience :: Developers', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering' + ] +) From 6096b9a8ccf0dfc91c2e5f4770037b7ac57eee83 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 31 May 2015 10:00:17 +0700 Subject: [PATCH 07/13] Update reference to convert_xsdir.py in documentation --- docs/source/usersguide/install.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 707355ddc..848c6ecaa 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -362,12 +362,12 @@ the following steps must be taken: 2. In the root directory, a file named ``xsdir``, or some variant thereof, should be present. This file contains a listing of all the cross sections and is used by MCNP. This file should be converted to a ``cross_sections.xml`` - file for use with OpenMC. A Python script is provided in the OpenMC - distribution for this purpose: + file for use with OpenMC. A utility is provided in the OpenMC distribution + for this purpose: .. code-block:: sh - openmc/scripts/convert_xsdir.py xsdir31 cross_sections.xml + openmc/scripts/openmc-xsdir-to-xml xsdir31 cross_sections.xml 3. In the converted ``cross_sections.xml`` file, change the contents of the element to the absolute path of the directory containing the From 37179d21380ec993ea858cec1e030bf7ee6a7b75 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 31 May 2015 10:03:10 +0700 Subject: [PATCH 08/13] Add pandas as an optional dependency --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 830d54215..1524922b7 100644 --- a/setup.py +++ b/setup.py @@ -14,8 +14,9 @@ setup(name='openmc', # Optional dependencies extras_require={ + 'pandas': ['pandas'], 'vtk': ['vtk', 'silomesh'], - 'validate': ['lxml'], + 'validate': ['lxml'] }, # Metadata From 5d954a3c263a5a8f3f0a9be31b3c69c8b1d9de99 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 31 May 2015 15:22:30 +0700 Subject: [PATCH 09/13] Fix path for installation of RelaxNG files --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f004c28e9..e335dfd57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +203,7 @@ set_target_properties(${program} PROPERTIES #=============================================================================== install(TARGETS ${program} RUNTIME DESTINATION bin) -install(DIRECTORY relaxng DESTINATION share) +install(DIRECTORY src/relaxng DESTINATION share/openmc) install(FILES man/man1/openmc.1 DESTINATION share/man/man1) install(FILES LICENSE DESTINATION "share/doc/${program}/copyright") From f8dffcf9b840611549655df543fdf8424654da78 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 31 May 2015 15:25:29 +0700 Subject: [PATCH 10/13] Add Python distribution-related directories to .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index a052c2a4a..bfa33d856 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ # Compiler python objects *.pyc +# Python distribution +dist/ +openmc.egg-info/ + # Inputs generated from Python API examples/python/**/*.xml From cfd6a37683e32e062e6ec0e645734d8264ce566a Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 1 Jun 2015 08:37:01 +0700 Subject: [PATCH 11/13] Fallback to using distutils if user doesn't have setuptools installed --- setup.py | 64 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/setup.py b/setup.py index 1524922b7..b86582dd0 100644 --- a/setup.py +++ b/setup.py @@ -2,35 +2,43 @@ import glob import os -from setuptools import setup, find_packages +try: + from setuptools import setup + have_setuptools = True +except ImportError: + from distutils.core import setup + have_setuptools = False -setup(name='openmc', - version='0.6.2', - packages=find_packages(), - scripts=glob.glob('scripts/openmc-*'), +kwargs = {'name': 'openmc', + 'version': '0.6.2', + 'packages': ['openmc'], + 'scripts': glob.glob('scripts/openmc-*'), - # Required dependencies - install_requires=['numpy', 'scipy', 'h5py', 'matplotlib'], + # Metadata + 'author': 'Will Boyd', + 'author_email': 'wbinventor@gmail.com', + 'description': 'OpenMC Python API', + 'url': 'https://github.com/mit-crpg/openmc', + 'classifiers': [ + 'Intended Audience :: Developers', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering' + ]} - # Optional dependencies - extras_require={ - 'pandas': ['pandas'], - 'vtk': ['vtk', 'silomesh'], - 'validate': ['lxml'] - }, +if have_setuptools: + kwargs.update({ + # Required dependencies + 'install_requires': ['numpy', 'scipy', 'h5py', 'matplotlib'], - # Metadata - author='Will Boyd', - author_email='wbinventor@gmail.com', - description='OpenMC Python API', - url='https://github.com/mit-crpg/openmc', - classifiers=[ - 'Intended Audience :: Developers', - 'Intended Audience :: End Users/Desktop', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', - 'Natural Language :: English', - 'Programming Language :: Python', - 'Topic :: Scientific/Engineering' - ] -) + # Optional dependencies + 'extras_require': { + 'pandas': ['pandas'], + 'vtk': ['vtk', 'silomesh'], + 'validate': ['lxml'] + }}) + +setup(**kwargs) From 5be69f0e4d91f9abce2bbd97552d60efe9b8bd02 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 1 Jun 2015 08:51:12 +0700 Subject: [PATCH 12/13] Make it clear why sys.path is amended in results.py scripts --- tests/test_basic/results.py | 2 -- tests/test_cmfd_feed/results.py | 2 -- tests/test_cmfd_nofeed/results.py | 2 -- tests/test_confidence_intervals/results.py | 2 -- tests/test_density_atombcm/results.py | 2 -- tests/test_density_atomcm3/results.py | 2 -- tests/test_density_kgm3/results.py | 2 -- tests/test_density_sum/results.py | 2 -- tests/test_eigenvalue_genperbatch/results.py | 2 -- tests/test_eigenvalue_no_inactive/results.py | 2 -- tests/test_energy_grid/results.py | 2 -- tests/test_entropy/results.py | 2 -- tests/test_filter_cell/results.py | 2 -- tests/test_filter_cellborn/results.py | 2 -- tests/test_filter_distribcell/results.py | 1 - tests/test_filter_energy/results.py | 2 -- tests/test_filter_energyout/results.py | 2 -- tests/test_filter_group_transfer/results.py | 2 -- tests/test_filter_material/results.py | 2 -- tests/test_filter_mesh_2d/results.py | 2 -- tests/test_filter_mesh_3d/results.py | 2 -- tests/test_filter_universe/results.py | 2 -- tests/test_fixed_source/results.py | 2 -- tests/test_infinite_cell/results.py | 2 -- tests/test_lattice/results.py | 2 -- tests/test_lattice_hex/results.py | 2 -- tests/test_lattice_mixed/results.py | 2 -- tests/test_lattice_multiple/results.py | 2 -- tests/test_natural_element/results.py | 2 -- tests/test_output/results.py | 2 -- tests/test_particle_restart_eigval/results.py | 2 -- tests/test_particle_restart_fixed/results.py | 2 -- tests/test_ptables_off/results.py | 2 -- tests/test_reflective_cone/results.py | 2 -- tests/test_reflective_cylinder/results.py | 2 -- tests/test_reflective_plane/results.py | 2 -- tests/test_reflective_sphere/results.py | 2 -- tests/test_resonance_scattering/results.py | 2 -- tests/test_rotation/results.py | 2 -- tests/test_salphabeta/results.py | 2 -- tests/test_salphabeta_multiple/results.py | 2 -- tests/test_score_MT/results.py | 2 -- tests/test_score_absorption/results.py | 2 -- tests/test_score_current/results.py | 2 -- tests/test_score_events/results.py | 2 -- tests/test_score_fission/results.py | 2 -- tests/test_score_flux/results.py | 2 -- tests/test_score_flux_yn/results.py | 2 -- tests/test_score_kappafission/results.py | 2 -- tests/test_score_nufission/results.py | 2 -- tests/test_score_nuscatter/results.py | 2 -- tests/test_score_nuscatter_n/results.py | 2 -- tests/test_score_nuscatter_pn/results.py | 2 -- tests/test_score_nuscatter_yn/results.py | 2 -- tests/test_score_scatter/results.py | 2 -- tests/test_score_scatter_n/results.py | 2 -- tests/test_score_scatter_pn/results.py | 2 -- tests/test_score_scatter_yn/results.py | 2 -- tests/test_score_total/results.py | 2 -- tests/test_score_total_yn/results.py | 2 -- tests/test_seed/results.py | 2 -- tests/test_source_angle_mono/results.py | 2 -- tests/test_source_energy_maxwell/results.py | 2 -- tests/test_source_energy_mono/results.py | 2 -- tests/test_source_file/results.py | 2 -- tests/test_source_point/results.py | 2 -- tests/test_sourcepoint_batch/results.py | 2 -- tests/test_sourcepoint_interval/results.py | 2 -- tests/test_sourcepoint_latest/results.py | 2 -- tests/test_sourcepoint_restart/results.py | 2 -- tests/test_statepoint_batch/results.py | 2 -- tests/test_statepoint_interval/results.py | 2 -- tests/test_statepoint_restart/results.py | 2 -- tests/test_statepoint_sourcesep/results.py | 2 -- tests/test_survival_biasing/results.py | 2 -- tests/test_tally_assumesep/results.py | 2 -- tests/test_tally_nuclides/results.py | 2 -- tests/test_trace/results.py | 2 -- tests/test_translation/results.py | 2 -- tests/test_trigger_batch_interval/results.py | 1 - tests/test_trigger_no_batch_interval/results.py | 1 - tests/test_trigger_no_status/results.py | 1 - tests/test_trigger_tallies/results.py | 1 - tests/test_uniform_fs/results.py | 2 -- tests/test_universe/results.py | 2 -- tests/test_void/results.py | 2 -- 86 files changed, 167 deletions(-) diff --git a/tests/test_basic/results.py b/tests/test_basic/results.py index 479a94833..03f3e4b43 100644 --- a/tests/test_basic/results.py +++ b/tests/test_basic/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_cmfd_feed/results.py b/tests/test_cmfd_feed/results.py index 577941c24..fe38537b3 100644 --- a/tests/test_cmfd_feed/results.py +++ b/tests/test_cmfd_feed/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint import openmc from openmc.statepoint import StatePoint diff --git a/tests/test_cmfd_nofeed/results.py b/tests/test_cmfd_nofeed/results.py index 4c8ea4444..0ba4d2c98 100644 --- a/tests/test_cmfd_nofeed/results.py +++ b/tests/test_cmfd_nofeed/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint import openmc from openmc.statepoint import StatePoint diff --git a/tests/test_confidence_intervals/results.py b/tests/test_confidence_intervals/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_confidence_intervals/results.py +++ b/tests/test_confidence_intervals/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_density_atombcm/results.py b/tests/test_density_atombcm/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_density_atombcm/results.py +++ b/tests/test_density_atombcm/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_density_atomcm3/results.py b/tests/test_density_atomcm3/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_density_atomcm3/results.py +++ b/tests/test_density_atomcm3/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_density_kgm3/results.py b/tests/test_density_kgm3/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_density_kgm3/results.py +++ b/tests/test_density_kgm3/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_density_sum/results.py b/tests/test_density_sum/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_density_sum/results.py +++ b/tests/test_density_sum/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_eigenvalue_genperbatch/results.py b/tests/test_eigenvalue_genperbatch/results.py index cb97c815f..a84a6f652 100644 --- a/tests/test_eigenvalue_genperbatch/results.py +++ b/tests/test_eigenvalue_genperbatch/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_eigenvalue_no_inactive/results.py b/tests/test_eigenvalue_no_inactive/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_eigenvalue_no_inactive/results.py +++ b/tests/test_eigenvalue_no_inactive/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_energy_grid/results.py b/tests/test_energy_grid/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_energy_grid/results.py +++ b/tests/test_energy_grid/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_entropy/results.py b/tests/test_entropy/results.py index a55f37a26..e0d0d97c5 100644 --- a/tests/test_entropy/results.py +++ b/tests/test_entropy/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_cell/results.py b/tests/test_filter_cell/results.py index 996a2b96d..e8ee1d2d5 100644 --- a/tests/test_filter_cell/results.py +++ b/tests/test_filter_cell/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_cellborn/results.py b/tests/test_filter_cellborn/results.py index 996a2b96d..e8ee1d2d5 100644 --- a/tests/test_filter_cellborn/results.py +++ b/tests/test_filter_cellborn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_distribcell/results.py b/tests/test_filter_distribcell/results.py index 67997aafd..90a5572cf 100644 --- a/tests/test_filter_distribcell/results.py +++ b/tests/test_filter_distribcell/results.py @@ -3,7 +3,6 @@ import sys import numpy as np -# import statepoint sys.path.insert(0, '../..') from openmc.statepoint import StatePoint from openmc import Filter diff --git a/tests/test_filter_energy/results.py b/tests/test_filter_energy/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_filter_energy/results.py +++ b/tests/test_filter_energy/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_energyout/results.py b/tests/test_filter_energyout/results.py index 7e6fe8909..1574bbc25 100644 --- a/tests/test_filter_energyout/results.py +++ b/tests/test_filter_energyout/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_group_transfer/results.py b/tests/test_filter_group_transfer/results.py index 7e6fe8909..1574bbc25 100644 --- a/tests/test_filter_group_transfer/results.py +++ b/tests/test_filter_group_transfer/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_material/results.py b/tests/test_filter_material/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_filter_material/results.py +++ b/tests/test_filter_material/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_mesh_2d/results.py b/tests/test_filter_mesh_2d/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_filter_mesh_2d/results.py +++ b/tests/test_filter_mesh_2d/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_mesh_3d/results.py b/tests/test_filter_mesh_3d/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_filter_mesh_3d/results.py +++ b/tests/test_filter_mesh_3d/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_filter_universe/results.py b/tests/test_filter_universe/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_filter_universe/results.py +++ b/tests/test_filter_universe/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_fixed_source/results.py b/tests/test_fixed_source/results.py index f39d73de6..80ae5515d 100644 --- a/tests/test_fixed_source/results.py +++ b/tests/test_fixed_source/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_infinite_cell/results.py b/tests/test_infinite_cell/results.py index 076b19411..c70b1a6de 100644 --- a/tests/test_infinite_cell/results.py +++ b/tests/test_infinite_cell/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_lattice/results.py b/tests/test_lattice/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_lattice/results.py +++ b/tests/test_lattice/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_lattice_hex/results.py b/tests/test_lattice_hex/results.py index d5317232e..021609f24 100644 --- a/tests/test_lattice_hex/results.py +++ b/tests/test_lattice_hex/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_lattice_mixed/results.py b/tests/test_lattice_mixed/results.py index 769d2761e..953e81046 100644 --- a/tests/test_lattice_mixed/results.py +++ b/tests/test_lattice_mixed/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_lattice_multiple/results.py b/tests/test_lattice_multiple/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_lattice_multiple/results.py +++ b/tests/test_lattice_multiple/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_natural_element/results.py b/tests/test_natural_element/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_natural_element/results.py +++ b/tests/test_natural_element/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_output/results.py b/tests/test_output/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_output/results.py +++ b/tests/test_output/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_particle_restart_eigval/results.py b/tests/test_particle_restart_eigval/results.py index 192342e6d..adb0b3d7c 100644 --- a/tests/test_particle_restart_eigval/results.py +++ b/tests/test_particle_restart_eigval/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import particle restart import openmc.particle_restart as pr # read in particle restart file diff --git a/tests/test_particle_restart_fixed/results.py b/tests/test_particle_restart_fixed/results.py index 5cbbb0021..1c01db35c 100644 --- a/tests/test_particle_restart_fixed/results.py +++ b/tests/test_particle_restart_fixed/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import particle restart import openmc.particle_restart as pr # read in particle restart file diff --git a/tests/test_ptables_off/results.py b/tests/test_ptables_off/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_ptables_off/results.py +++ b/tests/test_ptables_off/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_reflective_cone/results.py b/tests/test_reflective_cone/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_reflective_cone/results.py +++ b/tests/test_reflective_cone/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_reflective_cylinder/results.py b/tests/test_reflective_cylinder/results.py index b8e813daf..b194e843e 100644 --- a/tests/test_reflective_cylinder/results.py +++ b/tests/test_reflective_cylinder/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint import openmc.statepoint as statepoint # read in statepoint file diff --git a/tests/test_reflective_plane/results.py b/tests/test_reflective_plane/results.py index b8e813daf..b194e843e 100644 --- a/tests/test_reflective_plane/results.py +++ b/tests/test_reflective_plane/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint import openmc.statepoint as statepoint # read in statepoint file diff --git a/tests/test_reflective_sphere/results.py b/tests/test_reflective_sphere/results.py index b8e813daf..b194e843e 100644 --- a/tests/test_reflective_sphere/results.py +++ b/tests/test_reflective_sphere/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint import openmc.statepoint as statepoint # read in statepoint file diff --git a/tests/test_resonance_scattering/results.py b/tests/test_resonance_scattering/results.py index cd50adf18..084bcc683 100644 --- a/tests/test_resonance_scattering/results.py +++ b/tests/test_resonance_scattering/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_rotation/results.py b/tests/test_rotation/results.py index b8e813daf..b194e843e 100644 --- a/tests/test_rotation/results.py +++ b/tests/test_rotation/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint import openmc.statepoint as statepoint # read in statepoint file diff --git a/tests/test_salphabeta/results.py b/tests/test_salphabeta/results.py index b8e813daf..b194e843e 100644 --- a/tests/test_salphabeta/results.py +++ b/tests/test_salphabeta/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint import openmc.statepoint as statepoint # read in statepoint file diff --git a/tests/test_salphabeta_multiple/results.py b/tests/test_salphabeta_multiple/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_salphabeta_multiple/results.py +++ b/tests/test_salphabeta_multiple/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_MT/results.py b/tests/test_score_MT/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_MT/results.py +++ b/tests/test_score_MT/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_absorption/results.py b/tests/test_score_absorption/results.py index 126eebb6e..ac9a0e91b 100644 --- a/tests/test_score_absorption/results.py +++ b/tests/test_score_absorption/results.py @@ -5,8 +5,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_current/results.py b/tests/test_score_current/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_current/results.py +++ b/tests/test_score_current/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_events/results.py b/tests/test_score_events/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_events/results.py +++ b/tests/test_score_events/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_fission/results.py b/tests/test_score_fission/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_fission/results.py +++ b/tests/test_score_fission/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_flux/results.py b/tests/test_score_flux/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_flux/results.py +++ b/tests/test_score_flux/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_flux_yn/results.py b/tests/test_score_flux_yn/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_flux_yn/results.py +++ b/tests/test_score_flux_yn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_kappafission/results.py b/tests/test_score_kappafission/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_kappafission/results.py +++ b/tests/test_score_kappafission/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_nufission/results.py b/tests/test_score_nufission/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_nufission/results.py +++ b/tests/test_score_nufission/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_nuscatter/results.py b/tests/test_score_nuscatter/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_nuscatter/results.py +++ b/tests/test_score_nuscatter/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_nuscatter_n/results.py b/tests/test_score_nuscatter_n/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_nuscatter_n/results.py +++ b/tests/test_score_nuscatter_n/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_nuscatter_pn/results.py b/tests/test_score_nuscatter_pn/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_nuscatter_pn/results.py +++ b/tests/test_score_nuscatter_pn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_nuscatter_yn/results.py b/tests/test_score_nuscatter_yn/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_nuscatter_yn/results.py +++ b/tests/test_score_nuscatter_yn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_scatter/results.py b/tests/test_score_scatter/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_scatter/results.py +++ b/tests/test_score_scatter/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_scatter_n/results.py b/tests/test_score_scatter_n/results.py index ec65cc60e..3f215b287 100644 --- a/tests/test_score_scatter_n/results.py +++ b/tests/test_score_scatter_n/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_scatter_pn/results.py b/tests/test_score_scatter_pn/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_scatter_pn/results.py +++ b/tests/test_score_scatter_pn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_scatter_yn/results.py b/tests/test_score_scatter_yn/results.py index badc816d9..d2cb9adc0 100644 --- a/tests/test_score_scatter_yn/results.py +++ b/tests/test_score_scatter_yn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_total/results.py b/tests/test_score_total/results.py index 1f94be37b..3022c3272 100644 --- a/tests/test_score_total/results.py +++ b/tests/test_score_total/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_score_total_yn/results.py b/tests/test_score_total_yn/results.py index 92ee8133f..c858d6baa 100644 --- a/tests/test_score_total_yn/results.py +++ b/tests/test_score_total_yn/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_seed/results.py b/tests/test_seed/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_seed/results.py +++ b/tests/test_seed/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_source_angle_mono/results.py b/tests/test_source_angle_mono/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_source_angle_mono/results.py +++ b/tests/test_source_angle_mono/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_source_energy_maxwell/results.py b/tests/test_source_energy_maxwell/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_source_energy_maxwell/results.py +++ b/tests/test_source_energy_maxwell/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_source_energy_mono/results.py b/tests/test_source_energy_mono/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_source_energy_mono/results.py +++ b/tests/test_source_energy_mono/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_source_file/results.py b/tests/test_source_file/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_source_file/results.py +++ b/tests/test_source_file/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_source_point/results.py b/tests/test_source_point/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_source_point/results.py +++ b/tests/test_source_point/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_sourcepoint_batch/results.py b/tests/test_sourcepoint_batch/results.py index 2cd808705..47e9dcdc9 100644 --- a/tests/test_sourcepoint_batch/results.py +++ b/tests/test_sourcepoint_batch/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_sourcepoint_interval/results.py b/tests/test_sourcepoint_interval/results.py index 2cd808705..47e9dcdc9 100644 --- a/tests/test_sourcepoint_interval/results.py +++ b/tests/test_sourcepoint_interval/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_sourcepoint_latest/results.py b/tests/test_sourcepoint_latest/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_sourcepoint_latest/results.py +++ b/tests/test_sourcepoint_latest/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_sourcepoint_restart/results.py b/tests/test_sourcepoint_restart/results.py index cbf927c5c..88789385b 100644 --- a/tests/test_sourcepoint_restart/results.py +++ b/tests/test_sourcepoint_restart/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_statepoint_batch/results.py b/tests/test_statepoint_batch/results.py index 642492d26..e9237ee87 100644 --- a/tests/test_statepoint_batch/results.py +++ b/tests/test_statepoint_batch/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_statepoint_interval/results.py b/tests/test_statepoint_interval/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_statepoint_interval/results.py +++ b/tests/test_statepoint_interval/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_statepoint_restart/results.py b/tests/test_statepoint_restart/results.py index 3b7d3303d..1341d6754 100644 --- a/tests/test_statepoint_restart/results.py +++ b/tests/test_statepoint_restart/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_statepoint_sourcesep/results.py b/tests/test_statepoint_sourcesep/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_statepoint_sourcesep/results.py +++ b/tests/test_statepoint_sourcesep/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_survival_biasing/results.py b/tests/test_survival_biasing/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_survival_biasing/results.py +++ b/tests/test_survival_biasing/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_tally_assumesep/results.py b/tests/test_tally_assumesep/results.py index f2df0495f..f04df3a01 100644 --- a/tests/test_tally_assumesep/results.py +++ b/tests/test_tally_assumesep/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_tally_nuclides/results.py b/tests/test_tally_nuclides/results.py index 1fbdd5e3c..edbebc126 100644 --- a/tests/test_tally_nuclides/results.py +++ b/tests/test_tally_nuclides/results.py @@ -4,8 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_trace/results.py b/tests/test_trace/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_trace/results.py +++ b/tests/test_trace/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_translation/results.py b/tests/test_translation/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_translation/results.py +++ b/tests/test_translation/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_trigger_batch_interval/results.py b/tests/test_trigger_batch_interval/results.py index 6cdec2654..8710a976c 100644 --- a/tests/test_trigger_batch_interval/results.py +++ b/tests/test_trigger_batch_interval/results.py @@ -4,7 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_trigger_no_batch_interval/results.py b/tests/test_trigger_no_batch_interval/results.py index 97ac258df..993296a57 100644 --- a/tests/test_trigger_no_batch_interval/results.py +++ b/tests/test_trigger_no_batch_interval/results.py @@ -4,7 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_trigger_no_status/results.py b/tests/test_trigger_no_status/results.py index 36bfc3b3d..c371ffb97 100644 --- a/tests/test_trigger_no_status/results.py +++ b/tests/test_trigger_no_status/results.py @@ -4,7 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_trigger_tallies/results.py b/tests/test_trigger_tallies/results.py index 24602909b..1dc194079 100644 --- a/tests/test_trigger_tallies/results.py +++ b/tests/test_trigger_tallies/results.py @@ -4,7 +4,6 @@ import sys import numpy as np sys.path.insert(0, '../..') - from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_uniform_fs/results.py b/tests/test_uniform_fs/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_uniform_fs/results.py +++ b/tests/test_uniform_fs/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_universe/results.py b/tests/test_universe/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_universe/results.py +++ b/tests/test_universe/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file diff --git a/tests/test_void/results.py b/tests/test_void/results.py index 455905701..fc1b491c6 100644 --- a/tests/test_void/results.py +++ b/tests/test_void/results.py @@ -3,8 +3,6 @@ import sys sys.path.insert(0, '../..') - -# import statepoint from openmc.statepoint import StatePoint # read in statepoint file From 58afab65bf88e3a6378020bbeacfca62dcd4f269 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 1 Jun 2015 08:52:35 +0700 Subject: [PATCH 13/13] Move CTestConfig.cmake down one level --- src/CTestConfig.cmake => CTestConfig.cmake | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/CTestConfig.cmake => CTestConfig.cmake (100%) diff --git a/src/CTestConfig.cmake b/CTestConfig.cmake similarity index 100% rename from src/CTestConfig.cmake rename to CTestConfig.cmake