Skip to content

Commit

Permalink
Merge c543f4c into f65129b
Browse files Browse the repository at this point in the history
  • Loading branch information
wkerzendorf committed Apr 3, 2018
2 parents f65129b + c543f4c commit ffa6d4e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ addons:
apt:
packages:
- clang
- graphviz



Expand Down Expand Up @@ -83,6 +84,7 @@ before_install:
install:
- cd $TRAVIS_BUILD_DIR
- conda env create -f tardis_env27.yml
- conda install -y -c conda-forge graphviz=2.38.0 xorg-libxrender xorg-libxpm
- source activate tardis

script:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all_files = 1
upload-dir = docs/_build/html
show-response = 1

[pytest]
[tool:pytest]
minversion = 2.2
norecursedirs = build docs/_build

Expand Down
5 changes: 0 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@
add_command_option('develop', 'with-vpacket-logging', 'compile TARDIS with virtual packet logging',
is_bool=True)

# Adjust the compiler in case the default on this platform is to use a
# broken one.
adjust_compiler(PACKAGENAME)

# Freeze build information in version.py
generate_version_py(PACKAGENAME, VERSION, RELEASE,
get_debug_option(PACKAGENAME))
Expand Down Expand Up @@ -141,4 +137,3 @@
entry_points=entry_points,
**package_info
)

12 changes: 9 additions & 3 deletions tardis/plasma/tests/test_plasma_dot_tex.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import os
import pygraphviz as pgv
import pytest
from datetime import datetime

data_path = os.path.join('tardis', 'plasma', 'tests', 'data')


@pytest.mark.skipif(datetime.now() < datetime(2018, 10, 1),
reason="graphviz had trouble being installed via conda in "
"March 2018")
def test_write_dot(tmpdir, simulation_verysimple):
fname = str(tmpdir.mkdir('test_dot').join('plasma.dot'))
simulation_verysimple.plasma.write_to_dot(fname)
actual = pgv.AGraph(fname).to_string()
expected = pgv.AGraph(os.path.join(data_path, 'plasma_ref.dot')).to_string()
assert actual == expected


@pytest.mark.skipif(datetime.now() < datetime(2018, 10, 1),
reason="graphviz had trouble being installed via conda in "
"March 2018")
def test_write_tex(tmpdir, simulation_verysimple):
fname = str(tmpdir.mkdir('test_tex').join('plasma.tex'))
simulation_verysimple.plasma.write_to_tex(fname)
with open(fname, 'r') as fp1, open(os.path.join(data_path, 'plasma_ref.tex'), 'r') as fp2:
with open(fname, 'r') as fp1, open(
os.path.join(data_path, 'plasma_ref.tex'), 'r') as fp2:
assert fp1.readline() ==fp2.readline()
8 changes: 4 additions & 4 deletions tardis_env27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ channels:
dependencies:
- python=2.7
- numpy=1.12
- scipy=1.0
- scipy=1
- pandas=0.20
- pytables
- h5py=2.6
- h5py=2
- matplotlib=2.0
- astropy=1.3
- numexpr=2.6
- Cython=0.21
- Cython=0.28
- networkx=1.10
- pytest=3.0
- pyyaml=3.12
- jsonschema=2.5.1
- pyne=0.5.3
- pyne=0.5
- graphviz=2.38
- pygraphviz

Expand Down

0 comments on commit ffa6d4e

Please sign in to comment.