Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plasma write_to_tex/dot unit tests #782

Merged
merged 7 commits into from
Aug 29, 2017
Merged

Conversation

vg3095
Copy link
Contributor

@vg3095 vg3095 commented Aug 23, 2017

No description provided.

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wkerzendorf This passes on my Travis build for Ubuntu , not for Mac . And on Tardis Travis CI it fails for Ubuntu as well as for Mac. I can't understand the reason for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well they are slightly different. can you post the diff of those files?

.travis.yml Outdated
@@ -77,6 +77,8 @@ before_install:
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs pull --include="atom_data/kurucz_cd23_chianti_H_He.h5" origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs pull --include="plasma_reference/" origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then cd $TRAVIS_BUILD_DIR; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install graphviz; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use conda to install graphviz

@@ -222,7 +222,7 @@ def write_to_dot(self, fname, latex_label=True):
print_graph.node[str(node)]['label']+=label
print_graph.node[str(node)]['label']+='$'

nx.write_dot(print_graph, fname)
nx.drawing.nx_agraph.write_dot(print_graph, fname)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for changing that!

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well they are slightly different. can you post the diff of those files?

@wkerzendorf
Copy link
Member

Travis complains about dot2tex missing. Plasma graph will not be generated.

@vg3095
Copy link
Contributor Author

vg3095 commented Aug 29, 2017

@wkerzendorf It is working now.

@wkerzendorf wkerzendorf merged commit b4ec6a4 into tardis-sn:master Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants