-
Notifications
You must be signed in to change notification settings - Fork 1
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
Integration with Travis-CI #1
Comments
I've never tried that before, but I think it should be possible. Looks like the profile is being created at |
Nevermind, |
I think the problem is, pytest has to be invoked within the built docker image. The
If I remove the crc32 section from |
Aaaand, here's the source of the Looks like librmn 16.3 and onward will no longer have a |
Just opened a new issue for the missing I added a try/except block to work around this problem (neishm/python-rpn@2c6a6e5), and now more than half the tests are passing (so, progress?) The remaining failures are mainly from:
Build log is at https://api.travis-ci.org/v3/job/463976070/log.txt |
The The majority of the remaining failures are due to:
There are a few failures which might be genuine problems. The following tests have AssertionErrors:
Latest log is at https://api.travis-ci.org/v3/job/466197770/log.txt |
Please try to clone https://github.com/jeixav/python-rpn.git on a system with git-lfs installed: git clone https://github.com/jeixav/python-rpn.git
git checkout feat/travis That should provide the file cmcgridf/prog/regeta/2019033000_048 to help the tests that reference $CMCGRIDF. The file seems excessively large (764M). Maybe @toutoumeteo could help craft a smaller file. The Travis build failed. It may be due to the way Docker and OpenMPI interact, see: https://stackoverflow.com/a/46163274. |
Travis-CI builds should already be within an Ubuntu container, so you might be able to transform the Dockerfile rules into the equivalent lines for the before_script:
- apt-get update && apt-get install -y git make libssl-dev ksh gfortran libopenmpi-dev python liburi-perl - wget libncurses5-dev libc6-dev-i386 openmpi-bin
- git clone https://github.com/jeixav/rmnlib-install.git
- cd rmnlib-install
- git fetch && git checkout 92f256dae42c27ba37ea1f91dbbac97b079728d9
# Add gem-data as a package to install.
# Copy and adapt the lines in the Makefile from the 'afsisio' package.
- sed -i '/afsisio.* \\$/{p;s/afsisio_1.0u/gem-data_4.2.0/}' Makefile
- sed -i '/afsisio.*:/,/^$/H;${p;s/.*//;x;s/afsisio_1.0u/gem-data_4.2.0/g}' Makefile
- make auto-install VGRID_RELEASE=6.4
# Auto-load profile for interactive sessions.
- echo . $HOME/.profile_armnlib >> $HOME/.bashrc
- echo . r.load.dot dev/gfortran >> $HOME/.bashrc
# Extra packages needed for python-rpn tests
- apt-get update && apt-get install -y python-pytest python-numpy python-tz python-scipy then the Or better yet, the commands could go into a standalone script (like |
Just tried building the |
The git clone command that fails with https://github.com/neishm/python-rpn.git works if I replace it with https://github.com/jeixav/python-rpn.git. I think you need to clone my Python-RPN Git repository, grab the binary files stored with git-lfs and add them to your Python-RPN repository. |
I was able to get the LFS file working by manually cloning into a "new" repository (not using the I'm partway through getting a native travis-ci version working without Docker layer to avoid that OpenMPI problem (https://github.com/neishm/python-rpn-unforked/tree/local-ssm-files). Unfortunately it's still crashing for me because it's looking for an RPN file with today's date (https://api.travis-ci.org/v3/job/533924289/log.txt)... trying to figure out where that's coming from. Also testing out pushing the gem-data and other SSM files to git-lfs since the collaboration site can become too slow to work with travis-ci sometimes. |
Is today's date is produced by calls to datetime.date.today() in the tests? For example: |
…x container. This is cobbled together from python-rpn continuous integration tests that are being developed by Kristjan Onu. See discussion at neishm/rmnlib-install-docker#1 Note: Unlike the CI tests, the correctness of python-rpn is not being checked here. The purpose of this test suite is to make sure the wheel is properly packaged, with no missing modules / shared library symbols / etc. This is currently only tested for a 64-bit Linux environment. So far there are multiple failures (25 failures, 13 errors to be exact). Still need to determine which errors may be due to the wheel creation, and which ones are upstream errors with python-rpn or the tests themselves.
Yes, that was the problem. If I link to CMCGRIDF file to another filename with today's date, then it's happy. Now getting an AssertionError with |
Can you check if the AssertionError is reproducible on a Science network supercomputer? If yes, @meteokid may be able to help. |
I can reproduce on the science network (specifically eccc-ppp1), by running:
This gives the following AssertionErrors:
It's giving the same error on the science network when testing against the latest master branch. |
I was able to resolve some of the test failures (including the Also, libburpc tests are still disabled since we don't yet have a libburpc package within rmnlib-install. |
Mike,
Is there other vgrid errors than the following?
André
=================================== FAILURES ===================================
[1m[31m________________________ VGDBaseTests.testGetPutOptInt _________________________[0m
self = <test_vgd_base.VGDBaseTests testMethod=testGetPutOptInt>
[1m def testGetPutOptInt(self):[0m
[1m v1 = vgd.vgd_get_opt('ALLOW_SIGMA')[0m
[1m> self.assertEqual(v1,vgd.VGD_DISALLOW_SIGMA)[0m
[1m[31mE AssertionError: 1 != 0[0m
[1m[31mshare/tests/test_vgd_base.py[0m:33: AssertionError
[1m[31m________________________ VGDProtoTests.testGetPutOptInt ________________________[0m
self = <test_vgd_proto.VGDProtoTests testMethod=testGetPutOptInt>
[1m def testGetPutOptInt(self):[0m
[1m quiet = ct.c_int(0)[0m
[1m v1 = ct.c_int(0)[0m
[1m ok = vgd.c_vgd_getopt_int(_C_WCHAR2CHAR('ALLOW_SIGMA'), ct.byref(v1), quiet)[0m
[1m self.assertEqual(ok,vgd.VGD_OK)[0m
[1m> self.assertEqual(v1.value,vgd.VGD_DISALLOW_SIGMA)[0m
[1m[31mE AssertionError: 1 != 0[0m
[1m[31mshare/tests/test_vgd_proto.py[0m:43: AssertionError
… Le 7 juin 2019 à 13:13, Mike Neish ***@***.***> a écrit :
I was able to resolve some of the test failures (including the test_ll2rll_rot and test_ll2rll_rot2 failures). Now it's stuck on some vgd tests (https://api.travis-ci.org/v3/job/542846145/log.txt <https://api.travis-ci.org/v3/job/542846145/log.txt>). Those same tests seem to pass when running on the science network, so not sure why they're failing in the Travis-CI environment.
Also, libburpc tests are still disabled since we don't yet have a libburpc package within rmnlib-install.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=ABXYIS6ACAEFFY56C73FJUDPZKJMNA5CNFSM4GHWHB2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXGOBLQ#issuecomment-499966126>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABXYIS4OIU7ECJY67C3KDHTPZKJMNANCNFSM4GHWHB2A>.
|
Looks like those are the only two errors. Re-ran to allow arbitrary number of test failures: Still just those two tests are failing. It's using the vgrid from Strangely, testing from a similar version of vgrid (6.4.b2) in the python-rpn-wheels package seems to work, so not sure if it's actually a problem in the vgrid source or not... |
Is https://github.com/neishm/python-rpn branch fix_tests the right repo and branch to investigate the vgrid problem you’ve reperted? André P.S. Sorry for the previous empty email |
Hi André, |
Mike,
As a debugging strategy, I am trying to run the vgrid tests from 6.4.b2 (not the python tests but the vgrid ones) on CI to see if I can trap similar errors in this simplified context. I’ve added a new test that gets and puts ALLOW_SIGMA option to make sure I do a similar test as rpnpy does.
I was able to test it on gitlab since I have some experience with their CI. All tests were OK after minor compiler errors (target attribute missing on pres and hgts and same character length in string array, all this in the Fortran grid_descriptor.F90 code).
Now I will try to run the same on travis to see what happens there.
On gitlab, I have a saved image of rmnlib-install-docker that I can use in my CI file (.gitlab-ci.yml) like so
image: registry.gitlab.com/toutoumeteo/rmnlib-install-docker:latest
This saves the time of redoing all the rmnlib-install-docker stuff. I load the images and then compile vgrid and run the vgrid tests. I take only 2.5 minutes to run.
Do you have such an image for travis?
André
… Le 9 juin 2019 à 14:55, Mike Neish ***@***.***> a écrit :
Hi André,
The latest Travis-CI test was done from https://github.com/neishm/python-rpn-unforked <https://github.com/neishm/python-rpn-unforked>, on the local-ssm-files branch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=ABXYIS7QMG4WWYIXNP2XWNDPZVGY3A5CNFSM4GHWHB2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXIP7PQ#issuecomment-500236222>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABXYIS2ZNFKB4BI4CN4RRNLPZVGY3ANCNFSM4GHWHB2A>.
|
I was able to run the vgrid tests, including the new one for ALLOW_SIGMA, on travis and they all run fine. To make it faster, I commented out the gem-data part of the .travis.yml file, it took only 7.5 minutes. My repo is https://github.com/toutoumeteo/python-rpn-unforked.git branch feat/travis There is nothing there to add to your repo. I put the info here only to document the work that was done. |
Thanks, André. So if I understand correctly, there was no problem with To answer your question about images, no I don't think we have that. I'm new to this whole CI thing, so I'm still trying to figure out all these features. I know @jeixav was playing around with git-lfs to get some speedups with the CI tests, but this sounds like another option we could try? For what it's worth, I'm able to trigger the vgrid "error" locally with the latest |
Mike, This is correct, there was no problem when I ran the vgrid tests on GitHub CI (travis) and gitlab CI. I will start to look at the rpnpy code and make some tests with the python wheel that I've installed on my server and eventually with travis. |
How do I get the ATM_MODEL_DFILES to run the rpnpy tests locally on my server? I looked in the travis log but could not figure out where it gets it. Thanks |
The ATM_MODEL_DFILES are being installed from the file The package can also be downloaded from http://collaboration.cmc.ec.gc.ca/science/ssm/gem-data_4.2.0_all.ssm. It's just a gzipped tarball, so you should be able to untar it and set ATM_MODEL_DFILES to <extraction point>/gem-data_4.2.0_all/share/data/dfiles. |
I just got a notice from GitHub that I've exceeded my limit for LFS data, so the current approach isn't sustainable in the long-term. I'm going to look into options for reducing the file size - maybe add some hooks in the unit tests to snoop on which records / files are actually read, and create test files with only those records? Hopefully the size can be brought down significantly from the 1.48 GB that the ATM_MODEL_DFILES and CMCGRIDF data is using... |
Actually, since GitLab CI is already working for André's tests (with super speed), and there appears to be no size limit on the images there, would it make sense to just move the CI branch to GitLab? Or would that complicate the workflow too much? |
Mike,
The speed was due to the fact that I did not load gem-data to do the native grid tests. The native vgrid test data is included.
A
… Le 17 juin 2019 à 22:29, Mike Neish ***@***.***> a écrit :
Actually, since GitLab CI is already working for André's tests (with super speed), and there appears to be no size limit on the images there, would it make sense to just move the CI branch to GitLab? Or would that complicate the workflow too much?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=ABXYIS5IZBNE4T6HADDELPLP3BCBXA5CNFSM4GHWHB2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX47MWI#issuecomment-502920793>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABXYISYT5VTTGC7ZAFKES4DP3BCBXANCNFSM4GHWHB2A>.
|
I've identified the issue I was having with the vgrid tests. The tests themselves are fine when run individually, but some of them have side-effects on the |
Congratulations Mike! I looked at your code and it look fine to me. I see now that one has to set ALLOW_SIGMA to it default state (false) so the other tests can run OK. Sometimes it is the tests that have a bug... |
travis-ci tests are passing with this latest update. Log: https://travis-ci.org/neishm/python-rpn-unforked/builds/548868850 Updates are in https://github.com/neishm/python-rpn-unforked/tree/feat/travis Note that this is still skipping the libburpc tests, since I don't think that library is available in |
For doing quick tests, the A basic interactive test environment can be set up by running |
Is it possible to use this Dockerfile with Travis-CI?
I am interested in testing Python-RPN with Travis-CI, but have not managed to make it work yet.
The Dockerfile and .travis.yml files I setup are:
My last Travis build is here: https://travis-ci.com/jeixav/python-rpn/builds/93263102
The text was updated successfully, but these errors were encountered: