These are chat archives for astropy/astropy

7th
Jun 2014
Pritish Chakraborty
@PritishC
Jun 07 2014 05:25
@taldcroft , haven't tests for different ways to initialize SkyCoord already been done?
Thomas Robitaille
@astrofrog
Jun 07 2014 14:00
@wkerzendorf - astropy 0.3.2 should be available in MacPorts within the coming hour. Let me know if it doesn't work! (remember to sudo port selfupdate
Stuart Mumford
@Cadair
Jun 07 2014 14:16
@astrofrog I don't seem to be able to access the astropy intersphinx mapping
Ghost
@ghost~53638049048862e761fa0380
Jun 07 2014 18:11
@VaticanCameos - only tests using the default representation have been done already.
Stuart Mumford
@Cadair
Jun 07 2014 18:15
hey @taldcroft :)
Wolfgang Kerzendorf
@wkerzendorf
Jun 07 2014 19:12
@astrofrog Great! Thanks.
Pritish Chakraborty
@PritishC
Jun 07 2014 19:33
@taldcroft, how do you envision the 'unit permutation' testing?
For SkyCoord that is
Stuart Mumford
@Cadair
Jun 07 2014 21:34
I don't suppose a astropy_helpers wizard is in here?
@eteq ??
Erik Tollerud
@eteq
Jun 07 2014 21:36
what’s up, @Cadair ? (I’m definitely not an astropy_helper wizard, if that’s what you’re thinking… but can try if need be)
Stuart Mumford
@Cadair
Jun 07 2014 21:36
@eteq you are closer to being qualified to wear the pointy hat than I am!!
In my travels around the magical lands of astropy_helpers today I have currently encountered this:
```
python setup.py test
running test
Traceback (most recent call last):
File "setup.py", line 122, in <module>
**package_info
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/stuart/GitHub/sunpy/astropy_helpers/astropy_helpers/test_helpers.py", line 137, in run
self._build_temp_install()
File "/home/stuart/GitHub/sunpy/astropy_helpers/astropy_helpers/test_helpers.py", line 184, in _build_temp_install
self.reinitialize_command('build', inplace=False)
TypeError: reinitialize_command() got an unexpected keyword argument 'inplace'
```
oh poo
python setup.py test                               
running test
Traceback (most recent call last):
  File "setup.py", line 122, in <module>
    **package_info
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/stuart/GitHub/sunpy/astropy_helpers/astropy_helpers/test_helpers.py", line 137, in run
    self._build_temp_install()
  File "/home/stuart/GitHub/sunpy/astropy_helpers/astropy_helpers/test_helpers.py", line 184, in _build_temp_install
    self.reinitialize_command('build', inplace=False)
TypeError: reinitialize_command() got an unexpected keyword argument 'inplace'
that's better
I am assuming this is being triggered because I am messing around with things
but I have no idea
That method is a member of the Command superclass though
Erik Tollerud
@eteq
Jun 07 2014 21:39
If you just use the current astropy_helpers master and try to just run self.reinitialize_command('build', inplace=False) somewhere, does it work?
Stuart Mumford
@Cadair
Jun 07 2014 21:40
well I don't know in SunPy because I can't test the 'test' parameter
but I am assuming it works in Astropy and affiliated packages or I think someone would have noticed by now!!
well now actually thinking about it, I think it does work in SunPy
because it must run that line of code before it fails
so why is it breaking when I subclass or write my own class?
OMG it's working!!
well not that
Stuart Mumford
@Cadair
Jun 07 2014 21:45
I kinda commented the inplace=True out
Erik Tollerud
@eteq
Jun 07 2014 21:47
I am also confused by this: it looks to me like self.reinitialize_command shouldn’t accept an inplace at all...
Stuart Mumford
@Cadair
Jun 07 2014 21:48
@eteq where did you discover this?
Erik Tollerud
@eteq
Jun 07 2014 21:50
AstropyTest doesn’t have a reinitialize_command, but it’s a subclass of distutils.cmd.Command, which has a reinitialize_command, which doesn’t seem to accept inplace
so I’m as confused as you why python setup.py test works at all in astropy...
Stuart Mumford
@Cadair
Jun 07 2014 21:50
ok...
good to know!!
lol
Stuart Mumford
@Cadair
Jun 07 2014 22:03
Ok this is weird
why is the new parameter I have specified not doing anything!
huh it just dosen't like the word online
sorry offline
Erik Tollerud
@eteq
Jun 07 2014 23:11
@Cadair - yeah, I noticed that --no-git is also not behaving - see astropy/astropy-helpers#40
Erik Tollerud
@eteq
Jun 07 2014 23:17
ok, @Cadair, I think I figured it out, and it’s a doozy
there is no inplace key word in distutils.cmd.Command. But there is a **kw in setuptools.Command. And if you use setuptools, it quasi-magically replaces the distutils Command with the setuptools Command.
so my suspicion is that somehow you’re running your reinitialize_command in a regular distutils situation, instead of in setuptools.
a way to check this is to go into ipython and do run setup.py test. Then when it dies, use debug to go into the debugger and check if self.__class__.__mro__ includes anything from setuptools