These are chat archives for astropy/astropy

17th
Nov 2015
Thomas Robitaille
@astrofrog
Nov 17 2015 10:58
@bsipocz - let me know when you are around, I have an idea for making all the testing stuff easier
(for ci-helpers)
Brigitta Sipocz
@bsipocz
Nov 17 2015 12:53
@astrofrog - I'm here for an hour or so, and also will be back later, after 4pm (UT)
Thomas Robitaille
@astrofrog
Nov 17 2015 12:56
Ok - I have a telecon in 5 min but will be quick
basically was thinking we could do the testing from a Python script
(preparing example)
Brigitta Sipocz
@bsipocz
Nov 17 2015 12:56
and put it down in a tempfile?
Thomas Robitaille
@astrofrog
Nov 17 2015 12:57
No it could just live in the repo
Brigitta Sipocz
@bsipocz
Nov 17 2015 12:57
(also it's annoying, the online powershell terminal I found has none of the problems, so appveyor's parser must be the culprit )
Thomas Robitaille
@astrofrog
Nov 17 2015 12:57
def test_numpy():
    if os.environ.get("NUMPY_VERSION", None) is not None:
        import numpy
        # can also check version
if we have tests like that
and then just do
py.test test_env.py
then it would work for both appveyor and travis
Brigitta Sipocz
@bsipocz
Nov 17 2015 12:58
clever :)
Thomas Robitaille
@astrofrog
Nov 17 2015 12:58
we could have one test per env variable
rather than per set-up
only exception is for egg_info builds
since py.test won't be (and shouldn't be) installed
two options: for those builds we don't run the tests
second option: we use unittest instead of py.test
Brigitta Sipocz
@bsipocz
Nov 17 2015 12:59
or keep the current stuff for them
Thomas Robitaille
@astrofrog
Nov 17 2015 12:59
yes
ah yes, and for the others, TEST_CMD would be py.test test_env.py
TEST_CMD could have a default global of py.test test_env.py
I have to join a telecon, but feel free to try the above approach if you are interested and have time
what we can do is then xfail the tests that fail on windows and fix them progressively
Brigitta Sipocz
@bsipocz
Nov 17 2015 13:02
OK. I don't think much will fail with these kind of tests, the installs worked (np 1.10, py 3.5, etc, astropy dev) as expected only the command parsing was problematic.
I can give it a try and then off for a seminar
Thomas Robitaille
@astrofrog
Nov 17 2015 13:33
@bsipocz - ok, thanks!
I think we'll be able to have more thorough tests with the script, so that will be an added bonus
Brigitta Sipocz
@bsipocz
Nov 17 2015 13:51
I'm off now, but will be back and upload the branch/open a PR at the end of the day
Thomas Robitaille
@astrofrog
Nov 17 2015 14:00
Great, thanks!
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:00
@astrofrog - I've changed the travis settings for ci-helpers to opt in not running it when .travis.yml is missing. Hope that's OK
Thomas Robitaille
@astrofrog
Nov 17 2015 17:01
Yep, perfect!
I think appveyor has a similar setting btw
(just for info)
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:02
somehow my fork is not picking up the new branches on travis, thus I have to do the testing with in a PR :(
Thomas Robitaille
@astrofrog
Nov 17 2015 17:11
hmm that's annoying
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:12
also looks like the PR isn't picked up either, but there was a travis issue earlier, so it may be related to that (or related to the settings change, but that is unlikely).
Should I cherry-pick the relevant commits from astropy/ci-helpers#12 to the new PR, or keep them separate?
Thomas Robitaille
@astrofrog
Nov 17 2015 17:18
I think it's fine to combine
I had issues with Travis yesterday
had to email them to get them to unblock it
they replied fast
Thomas Robitaille
@astrofrog
Nov 17 2015 17:28
@bsipocz - ah wait you mean appveyor isn't picking it up? (not Travis)
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:29
nop, travis didn't picked up the new PR, appveyor works fine
this is the new one astropy/ci-helpers#14
travis run a few hours ago when I merged your PR, and also for the cleanup run of my other PR
Thomas Robitaille
@astrofrog
Nov 17 2015 17:32
Ok - wonder if it's related to the setting you changed? Maybe it's buggy?
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:32
Anyway I just sent them an e-mail
maybe yes, but the local fork should have picked up the new branch in either case
(It also didn't pick up my previous branch...)
I wait a bit for their answer and then change back to settings to try it again
Thomas Robitaille
@astrofrog
Nov 17 2015 17:34
Ok - you can also try and just push another commit to the branch
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:44
weird, not the previous merge restarted... https://travis-ci.org/astropy/ci-helpers/builds
Thomas Robitaille
@astrofrog
Nov 17 2015 17:44
that was my fault
I went to github settings and got it to send a test payload to travis
to see if it would trigger stuff
it just triggered a re-build of latest master commit
but that's why I'm thinking a new commit to the PR might do the trick now
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:48
2 new commit, but they're not picked up yet either
Thomas Robitaille
@astrofrog
Nov 17 2015 17:56
weird
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:57
I've just changed back the seetings as they were, and try to repush a commit
Thomas Robitaille
@astrofrog
Nov 17 2015 17:57
Any luck?
Brigitta Sipocz
@bsipocz
Nov 17 2015 17:58
yes
Thomas Robitaille
@astrofrog
Nov 17 2015 17:59
Great!
so their setting is buggy somehow
Brigitta Sipocz
@bsipocz
Nov 17 2015 18:04
yeap, sorry for the extra rounds :S
Thomas Robitaille
@astrofrog
Nov 17 2015 18:05
not your fault :) and thank you for working on this!
Travis runs nice and fast with this project, a nice change from astropy core ;)
Brigitta Sipocz
@bsipocz
Nov 17 2015 18:08
but it does only mock tests, so better run faster :)
Thomas Robitaille
@astrofrog
Nov 17 2015 18:08
indeed :)
Brigitta Sipocz
@bsipocz
Nov 17 2015 18:26
are package names in conda case sensitive?
Thomas Robitaille
@astrofrog
Nov 17 2015 18:29
normally no
I don't think so
ah but in Python yes
so need to import PyQt5
Brigitta Sipocz
@bsipocz
Nov 17 2015 18:30
ok, but then I can call it PyQt5 in when installing it?
but it will be an issue for any packages that cannot be imported with their names
Thomas Robitaille
@astrofrog
Nov 17 2015 18:32
well there's also the issue that some packages just have a different name (e.g. conda: pyqt, Python: PyQt4)
maybe the easiest is to define a dictionary with special cases
I mean this is just for our internal testing
so could have a dictionary with
MODULE_NAME['pyqt'] = 'PyQt4'
MODULE_NAME['pyqt5'] = 'PyQt5'
and any others that are needed
Brigitta Sipocz
@bsipocz
Nov 17 2015 18:39
ok
or just choose one for channel testing that is trvial with the spelling
Thomas Robitaille
@astrofrog
Nov 17 2015 19:00
pyqt5 was the only python package in my channel, so you might need to use another
(if you want to change package)
actually it turns out that conda is not case sensitive
so you can include PyQt5 in CONDA_DEPENDENCIES