MHKiT-Software / MHKiT-MATLAB

MHKiT-MATLAB provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
https://mhkit-software.github.io/MHKiT/
BSD 3-Clause "New" or "Revised" License
15 stars 23 forks source link

Setting up Travis CI #41

Closed mfaltas-sandia closed 3 years ago

mfaltas-sandia commented 3 years ago

This adds a .travis.yml file to setup MHKiT with Travis CI

My travis.yml file - which configures the Travis CI build - could be found on my fork of MHKiT on: https://github.com/mfaltas-sandia/MHKiT-MATLAB

The Travis CI build could be found on: https://travis-ci.com/github/mfaltas-sandia/MHKiT-MATLAB/jobs/457545743

The build returns the following errors:

 River_TestResource/test_polynomial_fit                                X         X       Failed by assertion.

--------------------------------------------------------------------------------------------------------------

 River_TestResource/test_discharge_to_velocity                         X         X       Failed by assertion.

--------------------------------------------------------------------------------------------------------------

 River_TestResource/test_velocity_to_power                             X         X       Failed by assertion.

--------------------------------------------------------------------------------------------------------------

 Wave_TestResourceMetrics/test_plot_elevation_timeseries               X         X       Errored.

--------------------------------------------------------------------------------------------------------------

 Wave_TestResourceMetrics/test_environmental_contour                   X         X       Errored.

--------------------------------------------------------------------------------------------------------------

 Wave_TestResourceMetrics/test_plot_environmental_contour              X         X       Errored.

--------------------------------------------------------------------------------------------------------------

 Wave_TestResourceMetrics/test_plot_environmental_contour_multiyear    X         X       Errored.
ssolson commented 3 years ago

Hey Rebecca, we are working to MATLAB Travis and having some issues. I will reach out later this week to see about setting up a meeting about this.

rpauly18 commented 3 years ago

Sounds good and thank you for continuing to work on this. Out of curiosity, when you try to run the tests on your local machine (not CI) do they pass for you?

kmruehl commented 3 years ago

@rpauly18 when we run the tests locally we are each getting different results, likely due to the fact that we are all running different versions of MATLAB, Python, etc. That's part of the reason we wanted to meet and discuss. :)

@mfaltas-sandia can you please add the location of the your Travis-CI build into the draft PR text above? Thanks!

mfaltas-sandia commented 3 years ago

@kmruehl Links added! Please let me know if you need anything else.

kmruehl commented 3 years ago

@rpauly18 and @ssolson do you have any thoughts on what could be causing these 7 tests to fail?

rpauly18 commented 3 years ago

Can you remind me what version of Matlab you are running for the tests?

kmruehl commented 3 years ago

@rpauly18 TravisCI currently runs MATLAB 2020a and later, https://docs.travis-ci.com/user/languages/matlab/. If a release is not specified in the https://github.com/mfaltas-sandia/MHKiT-MATLAB/blob/master/.travis.yml file, then Travis defaults to the latest release, in this case that should be 2020b. Let me know if we should specify 2020a instead.

mfaltas-sandia commented 3 years ago

@rpauly18 The configured Travis CI build is running on 2020b

rpauly18 commented 3 years ago

Can you look at your scipy and sklearn installations? The errors are coming from those packages.

mfaltas-sandia commented 3 years ago

@rpauly18 I upgraded both the scipy and sklearn libraries but was still receiving same errors. All libraries have been updated to the latest version. If you have any more suggestions on what I can do, please let me know.

Now, however, we are receiving a segmentation fault after the "making plots not pup up on screen" commit. I am not sure if you saw that. I just thought I would bring it to your attention just in case.

image

image

rpauly18 commented 3 years ago

@mfaltas-sandia thanks for looking into the packages. I am looking into it further and will let you know if I think of anything.

rpauly18 commented 3 years ago

Great to see this passing! @mfaltas-sandia what, if any steps are needed to port over the Travis build to the main repo from your fork? Also, can you go ahead and remove tests for python 3.6? New functionality will be coming into MHKiT soon which will lead to 3.6 no longer being supported. Thanks!

mfaltas-sandia commented 3 years ago

@rpauly18 I have removed the tests for python 3.6 and I am working on adding 3.9. Porting to the main repo should only require the addition of the travis.yml file. This can be accomplished by merging the master branch of my fork to the main repo. One additional thing to note is that I have only made changes to the travis.yml file but I see you have made several commits to the "examples", "mhkit", and "mhkit.mltbx" folders. If none of the changes you made to these folders would create a conflict with the main repo then I think there are no additional steps we need to take before merging. Please let me know what you think.

H0R5E commented 3 years ago

@mfaltas-sandia MATLAB isn't compatible with Python 3.9, as yet. See here.

rpauly18 commented 3 years ago

@H0R5E is correct, so do not worry about Python 3.9 for now. I would pull in the latest changes from master into your fork, make sure everything still works, and then open this PR up for final review. Thanks, @mfaltas-sandia !

kmruehl commented 3 years ago

@rpauly18 we migrated the work @mfaltas-sandia and @H0R5E did configuring Travis into a feature brnach: https://github.com/MHKiT-Software/MHKiT-MATLAB/tree/feature_travisci. This is so that we can set up and run tests on Travis from the MHKiT-MATLAB repository. @mfaltas-sandia please amend this PR to be from MHKiT-Software:feature_travis to MHKiT-Software:master. Thank you

kmruehl commented 3 years ago

@rpauly18 this build is now passing: https://travis-ci.org/github/MHKiT-Software/MHKiT-MATLAB, so once @mfaltas-sandia amends the PR we should be ready to merge!

mfaltas-sandia commented 3 years ago

@kmruehl I have created a new PR at https://github.com/MHKiT-Software/MHKiT-MATLAB/pull/45 The new pull request is from MHKiT-Software:feature_travis to MHKiT-Software:master. I had to create a new PR because the source of a PR cannot be changed once a PR has been created. The PR is ready to merge.

Let me know if you have any questions.

rpauly18 commented 3 years ago

@mfaltas-sandia can this PR be closed?

kmruehl commented 3 years ago

Yes, this has been replaced by #45