First SAMPy code inclusion within astropy.vo.samp package#972
Conversation
|
Thanks! While I think of it, it might make sense to think about is to split up the main |
|
Another quick (minor) note - I think the script should be renamed to |
|
I though to split the code in 3 modules:
|
|
I would avoid to change the script name for two reasons:
|
|
@lpaioro - I agree with the structure for the splitting. For the script name, I don't feel strongly about it, so we can leave it as such :) |
|
Here's a small pull request: lpaioro#2 @lpaioro and @astrofrog At least for me
|
|
@cdeil - FWIW, the test passes for me with Anaconda. |
|
@cdeil - small detail - I noticed you added the BSD license line at the top, but the GPL license still needs to be removed from |
|
Probably best if @lpaioro does it, I shouldn't have touched the license because I didn't trace back who contributed to that code and ask their permission. |
|
I am going to remove the license. By the way, I had some automatic keywords added to the file after an |
|
@lpaioro - it's not really common to do that in Git, but if you really need it, then Git supports post-commit hooks but I haven't used them before. Is there a reason why you need to continue updating these? GitHub makes it clear when the commit was made, and who made it, so maybe it's not necessary? |
|
No, as a matter of fact it is not necessary. I think to remove them. |
|
Currently there are these errors with Python 3 on travis-ci: https://travis-ci.org/astropy/astropy/jobs/6385306#L652 : https://travis-ci.org/astropy/astropy/jobs/6385306#L1035 : And locally I still get this error I mentioned before (full log here): @lpaioro @astrofrog Any idea how to resolve these issues? |
|
I think that this issue: https://travis-ci.org/astropy/astropy/jobs/6385306#L652 is not really important, since it refers to some docstring parsing errors which will probably disappear once the documentation is rewritten in the proper Astropy compliant format. |
|
This issue: https://travis-ci.org/astropy/astropy/jobs/6385306#L1035 looks to be more complicated. When started I writing SAMPy, Python 3 was at the very beginning and the only way to provide secure http services was extending the normal HTTP classes provided by Python 2.6. Therefore I had to write |
|
@keflavich is the main astroquery dev and knows a lot about HTTP in Python. @keflavich, maybe you can give advice or help re-writing |
|
My experience with python 3 is pretty slim, but it may may sense to switch to using the |
|
@keflavich requests would probably be very nice to use here and possibly in any other web-related code. If someone is considering bundling
|
|
I always consider adding another dependency cautiously, but |
|
I've made a separate issue #1035 to discuss whether we should use requests or not. |
|
Whilst at a glance requests looks to be very nice, I think that it doesn't give enough answers to the problems related with SAMP and its porting to Python 3.x. This because requests provides a very nice API client side for the normal HTTP request, but SAMP is more about XMLRPC, both client and server side. |
|
Finally I modified the code in order to support Python 3 as well, but for the moment I don't use requests. I have added some tests also, but the testing code is a little rough. |
|
@lpaioro When I have Is it possible to make them succeed even if another SAMP hub is already running on the user machine? |
|
I had a look at the travis-ci error and I'm pretty sure some of them are random / old issues. It would be nice if this PR makes it into the 0.3 release, which is set for ~ mid September. From the tasks listed above I can do the polishing (code style, docs) in a PR against this one ... but first all tests should pass so that I know I'm not screwing up anything ... |
|
OK @cdeil , if my personal conflict with git it's all water under the bridge, I rebased on trunk. I would be really happy to make |
|
travis-ci is having a bad day (timeouts when trying to install dependencies). But this looks like a real failure with @lpaioro Do you understand what the problem is from the test output? |
|
It looks like the hub is not able to open a socket on the Travis host: https://travis-ci.org/astropy/astropy/jobs/9977929#L2903 . Do I have to specify the |
|
@lpaioro - I think it would make sense indeed to disable this test by adding the @remote_data decorator. I think those tests will still run on the Jenkins instances, just not the Travis instances. |
Subclass SAMPProxyError from xmlrpc.Fault
|
@astrofrog - I made a command decision and pushed this to 0.4, as I suspect this won't be done in a few days. IF I'm proven wrong it can be switched back. |
|
@eteq - sensible move, I don't think this can be finished and fully tested in just 2-3 days. |
|
@astrofrog I don't think there's any major difficulties other than the fact that @lpaioro and I didn't have time to finish this up. I completely agree this should be ready soon and get into master to get some testing / usage. I don't have time right now, but I've put this in my calendar for next weekend. |
|
@lpaioro - could you rebase this? It looks like there is a conflict due to the re-arranging of the docs for |
|
Sorry for being so slow answering, but actually I'm no more working for the astronomical community, I've been hired by a private industry and therefore I have very little time to dedicate to this project. However I'll try to do my best to follow the evolution of Astropy and contribute to it as a personal initiative to an open source project. I'm going to rebase |
|
Yesterday night I rebased |
|
It still looks like it needs rebasing here - are you rebasing onto the latest upstream master? |
|
@cdeil - do you want to try and open a new pull request with a rebased version of this branch? |
|
Sorry @astrofrog , but I tried to rebase on upstream and I got a lot of conflicts. Unfortunately I don't have a good developing environment for Astropy at the moment, so it is not easy to me solve all conflicts in the proper way. Is it really necessary that I do the rebase or even @cdeil can do it? |
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
|
@cdeil - I've rebased the SAMP branch here: https://github.com/astrofrog/astropy-samp I thought I could open a PR from that new repo but I can't because it's not a real fork. So just copy the branch from there, push it to your fork, and open a new pull request. I'll remove that repository once you've pushed it to your fork. It makes sense for you to open the PR since you will likely be the main person working on this. @lpaioro - just in case you don't have time to help much over the next few months, could you send me and @cdeil an email confirming that you give us permission to use the SAMPy code under a BSD license? Thanks! |
|
@cdeil - I have a little time now so I will open the new pull request and work on it a bit. For any changes, open a pull request to my branch. |
|
This is continued in #1907 |
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
This was discussed and agreed on in GH astropy#972. In addition to the structure suggested there by @lpaioro, I put the constants and errors in separate files.
This is a preliminary work addressed to add IVOA SAMP messaging capabilities to
Astropypackage, through the inclusion (and adaptation) of SAMPy module (see https://pypi.python.org/pypi/sampy/). It includes a Python package derived fromsampy.pymodule, and a script for the SAMP Hub execution.Presently the code is rather close to the original SAMPy code, therefore it needs some work on it. Here the TODO list:
Many thanks to Thomas Robitaille and Christoph Deil for their help. Any other contribution is greatly appreciated.