Require benchmark to run in Travis #277

Merged
merged 3 commits into from Oct 17, 2015

Conversation

Projects
None yet
2 participants
@oliverlee
Contributor

oliverlee commented Oct 17, 2015

This commit resolves #167.

@@ -5,6 +5,8 @@
# external libraries
from numpy import hstack, ones, pi, linspace, array, zeros, zeros_like
+import matplotlib
+matplotlib.use('Agg')

This comment has been minimized.

@moorepants

moorepants Oct 17, 2015

Member

Should this be "if on Travis use agg"?

@moorepants

moorepants Oct 17, 2015

Member

Should this be "if on Travis use agg"?

This comment has been minimized.

@oliverlee

oliverlee Oct 17, 2015

Contributor

The benchmark doesn't call plt.show() and just saves the file so it's fine
as is. Works on my machine as is.

We can add the Travis check but I don't know the variable to check.
On Oct 17, 2015 21:31, "Jason K. Moore" notifications@github.com wrote:

In bin/benchmark_pydy_code_gen.py
#277 (comment):

@@ -5,6 +5,8 @@

external libraries

from numpy import hstack, ones, pi, linspace, array, zeros, zeros_like
+import matplotlib
+matplotlib.use('Agg')

Should this be "if on Travis use agg"?


Reply to this email directly or view it on GitHub
https://github.com/pydy/pydy/pull/277/files#r42313215.

@oliverlee

oliverlee Oct 17, 2015

Contributor

The benchmark doesn't call plt.show() and just saves the file so it's fine
as is. Works on my machine as is.

We can add the Travis check but I don't know the variable to check.
On Oct 17, 2015 21:31, "Jason K. Moore" notifications@github.com wrote:

In bin/benchmark_pydy_code_gen.py
#277 (comment):

@@ -5,6 +5,8 @@

external libraries

from numpy import hstack, ones, pi, linspace, array, zeros, zeros_like
+import matplotlib
+matplotlib.use('Agg')

Should this be "if on Travis use agg"?


Reply to this email directly or view it on GitHub
https://github.com/pydy/pydy/pull/277/files#r42313215.

This comment has been minimized.

@moorepants

moorepants Oct 17, 2015

Member

But some people may not have the agg backend install on their on machine (not sure about this, maybe agg is always available on all platforms).

You can check the TRAVIS env variable to see if true.

@moorepants

moorepants Oct 17, 2015

Member

But some people may not have the agg backend install on their on machine (not sure about this, maybe agg is always available on all platforms).

You can check the TRAVIS env variable to see if true.

This comment has been minimized.

This comment has been minimized.

@moorepants

This comment has been minimized.

Show comment
Hide comment
@moorepants

moorepants Oct 17, 2015

Member

+1, merge when tests pass.

Member

moorepants commented Oct 17, 2015

+1, merge when tests pass.

.travis.yml
@@ -52,3 +53,5 @@ script:
- cd docs && make html && cd ..
# Make sure the library installs.
- python setup.py install
+ # Run benchmark
+ - python bin/benchmark_pydy_code_gen.py 4 100

This comment has been minimized.

@moorepants

moorepants Oct 17, 2015

Member

You could make this: 1 10 so it runs faster. Any reason we need this to run with 4 links and 100 time steps?

@moorepants

moorepants Oct 17, 2015

Member

You could make this: 1 10 so it runs faster. Any reason we need this to run with 4 links and 100 time steps?

This comment has been minimized.

@oliverlee

oliverlee Oct 17, 2015

Contributor

not really

On Sat, Oct 17, 2015 at 10:21 PM, Jason K. Moore notifications@github.com
wrote:

In .travis.yml
#277 (comment):

@@ -52,3 +53,5 @@ script:

  • cd docs && make html && cd ..

    Make sure the library installs.

  • python setup.py install
    • Run benchmark

      • python bin/benchmark_pydy_code_gen.py 4 100

You could make this: 1 10 so it runs faster. Any reason we need this to
run with 4 links and 100 time steps?


Reply to this email directly or view it on GitHub
https://github.com/pydy/pydy/pull/277/files#r42313809.

@oliverlee

oliverlee Oct 17, 2015

Contributor

not really

On Sat, Oct 17, 2015 at 10:21 PM, Jason K. Moore notifications@github.com
wrote:

In .travis.yml
#277 (comment):

@@ -52,3 +53,5 @@ script:

  • cd docs && make html && cd ..

    Make sure the library installs.

  • python setup.py install
    • Run benchmark

      • python bin/benchmark_pydy_code_gen.py 4 100

You could make this: 1 10 so it runs faster. Any reason we need this to
run with 4 links and 100 time steps?


Reply to this email directly or view it on GitHub
https://github.com/pydy/pydy/pull/277/files#r42313809.

oliverlee added some commits Oct 17, 2015

Install matplotlib in Travis
matplotlib is required to generate the ode generator method comparison
figure in the benchmark script.
Set non-interactive matplotlib backend in benchmark
Set matplotlib backend to 'Agg' to generate images without having a
window appear.

oliverlee added a commit that referenced this pull request Oct 17, 2015

@oliverlee oliverlee merged commit cb6b79b into pydy:master Oct 17, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@oliverlee oliverlee deleted the oliverlee:add-benchmark-to-travis branch Oct 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment