diff --git a/.travis.yml b/.travis.yml index 64fbdc9df2..bb2c500c9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ before_install: - conda update -q conda - conda info -a - if [[ $OPENMC_CONFIG != "check_source" ]]; then - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION six numpy scipy h5py=2.5 pandas; + conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy cython; source activate test-environment; sudo add-apt-repository ppa:nschloe/hdf5-backports -y; sudo apt-get update -q; @@ -52,7 +52,8 @@ before_install: export HDF5_DIR=/usr; fi -install: true +install: + - pip install -e .[test] before_script: - if [[ $OPENMC_CONFIG != "check_source" ]]; then @@ -73,4 +74,5 @@ script: else ./run_tests.py -C $OPENMC_CONFIG -j 2; fi + - pytest unit_tests/ - cd .. diff --git a/CMakeLists.txt b/CMakeLists.txt index 905555a050..0b0bef14ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -468,6 +468,11 @@ file(GLOB_RECURSE TESTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_*.py) # Loop through all the tests foreach(test ${TESTS}) + # Remove unit tests + if(test MATCHES ".*unit_tests.*") + continue() + endif() + # Get test information get_filename_component(TEST_NAME ${test} NAME) get_filename_component(TEST_PATH ${test} PATH) diff --git a/setup.py b/setup.py index 354098ea35..e064efa68c 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import glob import sys import numpy as np -from setuptools import setup +from setuptools import setup, find_packages try: from Cython.Build import cythonize have_cython = True @@ -36,9 +36,9 @@ kwargs = { }, # Metadata - 'author': 'Will Boyd', - 'author_email': 'wbinventor@gmail.com', - 'description': 'OpenMC Python API', + 'author': 'The OpenMC Development Team', + 'author_email': 'openmc-dev@googlegroups.com', + 'description': 'OpenMC', 'url': 'https://github.com/mit-crpg/openmc', 'classifiers': [ 'Development Status :: 4 - Beta', @@ -59,13 +59,14 @@ kwargs = { ], # Required dependencies - 'install_requires': ['six', 'numpy>=1.9', 'h5py', 'scipy', - 'pandas>=0.17.0', 'lxml'], + 'install_requires': [ + 'six', 'numpy>=1.9', 'h5py', 'scipy', 'ipython', 'matplotlib', + 'pandas>=0.17.0', 'lxml', 'uncertainties' + ], # Optional dependencies 'extras_require': { - 'decay': ['uncertainties'], - 'plot': ['matplotlib', 'ipython'], + 'test': ['pytest'], 'vtk': ['vtk', 'silomesh'], }, }