8000 VO Client and Server for Cone Search by pllim · Pull Request #552 · astropy/astropy · GitHub
[go: up one dir, main page]

Skip to content

VO Client and Server for Cone Search #552

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

Merged
merged 146 commits into from
Apr 30, 2013
Merged

VO Client and Server for Cone Search #552

merged 146 commits into from
Apr 30, 2013

Conversation

pllim
Copy link
Member
@pllim pllim commented Dec 11, 2012

As per #422

@pllim
Copy link
Member Author
pllim commented Dec 11, 2012

@mdboom might want to look at the votable stuff that I modified. They should not affect votable functionality itself. I needed to make those changes for them to work with my cone search stuff.

already been seen. Since we want to get every single
warning out of this, we have to delete all of them first.

"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring should be used to describe what the function does. This information is helpful, but should probably be in a comment following the docstring.

The docstring could be something like:

Resets all of the vo warning state so that warnings that have already been emitted will be emitted again.  This is used, for example, by `validate` which must emit all warnings each time it is called.

@mdboom
Copy link
Contributor
mdboom commented Dec 11, 2012

This is great -- my comments are mostly niggly details, but overall I think this is really good and a real improvement over what I had done years ago.

@mdboom
Copy link
Contributor
mdboom commented Dec 11, 2012

One other question: for the server-side code that checks the services and generates JSON files, is there a simple 8000 script that could be run to add it to a cron job? I think that's what most people would want who will be installing this on a server. Maybe we should add something to do this in scripts?

I'm also noticing that "server" is slightly the wrong name, since it's really just a tool that is run periodically to generate static files that are the served by a web server. I don't know if it matters enough to change the name, and it's certainly a clear separation -- just thought I'd point it out.

@embray
Copy link
Member
embray commented Dec 12, 2012

I agree with @mdboom on the naming issue. I don't have a better suggestion at the moment but I'll think on it; "server" is not too accurate though (unless we want to actually add a simple server too, which could be done with low effort).

@pllim
Copy link
Member Author
pllim commented Dec 12, 2012

"validator"? "utils"?

Original source codes obtained from
`this webpage <http://stackoverflow.com/questions/998674/make-my-code-handle-in-the-background-function-calls-that-take-a-long-time-to-fi>`_.

"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. But Python 3.2 has a concurrent.futures module (http://docs.python.org/dev/library/concurrent.futures.html) for this purpose. There is a very clean backport for >=2.5 available at http://pypi.python.org/pypi/futures (I'm not sure, but, I think this was the original version of the package before it was added to the stdlib). It might be worth adding to Astropy if we have a need for this sort of thing, now that there's a "standard" implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add, an additional advantage to this approach is that it supports thread and process-based executors with the same API; the cone search executor could optionally use either one of them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If AstroPy allows pypi/futures as optional dependency, I can replace Future class with that, no problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just something to consider; maybe I'll add an issue for it. For the purposes of this PR this implementation is perfectly fine. If/when we include concurrent.futures, we can go back to this and swap this out for it.

@pllim
Copy link
Member Author
pllim commented Dec 12, 2012

General question: What is the workflow to apply suggested changes to existing pull request? I am not very familiar with how GitHub works. Do I create a new branch? Or modify the same branch and re-submit Pull Request?



@remote_data
class TestConeSearchValidation():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here and below on the missing object base class. It really doesn't likely make a difference but it can't hurt either. Old-style classes do have some differences and I occasionally get confused when I encounter one in the wild.

pllim added 4 commits April 28, 2013 01:38
…urking in VAO registry. As the registry does change over time, there is no guarantee things will not break again if user decides to validate the *entire* VAO registry.
@pllim
Copy link
Member Author
pllim commented Apr 28, 2013

@mdboom , 77c0baf implements your feedback. I think I got the validator to work with all the services running wild in the STScI VAO registry, for now. If Travis passes (except for that one build with obscure no module named numpy error), this PR should be okay to merge.

@astrofrog
Copy link
Member

@pllim - to get the tests to pass, you need to move the Numpy import in astropy.utils.misc to be inside the function that uses it, because astropy should be importable from the source tree without Numpy installed (required for pip to work properly).

< 8000 div class="pr-1 flex-shrink-0" style="width: 16px;">
…ild failure
@pllim
Copy link
Member Author
pllim commented Apr 29, 2013

@astrofrog , thanks, Travis has passed!

@astrofrog
Copy link
Member

Great! So I think this can be merged now since I think @perrygreenfield gave the go-ahead.

@eteq - do you agree?

@mdboom
Copy link
Contributor
mdboom commented Apr 30, 2013

I think so! Let's get this in there. 😉

@pllim
Copy link
Member Author
pllim commented Apr 30, 2013

I think George Takei's happy dance is in order

http://www.youtube.com/watch?feature=player_detailpage&v=cSjO-rWMuJo#t=34s

@mdboom
Copy link
Contributor
mdboom commented Apr 30, 2013

@pllim: Where do you find this stuff?

@eteq
Copy link
Member
eteq commented Apr 30, 2013

I think George Takei's happy dance is in order

http://www.youtube.com/watch?feature=player_detailpage&v=cSjO-rWMuJo#t=34s

👍 (Also on the merge, but probably at least as much the dance...)

eteq added a commit that referenced this pull request Apr 30, 2013
VO Client and Server for Cone Search
@eteq eteq merged commit 33fb2ef into astropy:master Apr 30, 2013
@eteq
Copy link
Member
eteq commented Apr 30, 2013

Hooray!

@eteq
Copy link
Member
eteq commented Apr 30, 2013

Oh and @pllim or @iguananaut - I didn't want to delay the merge for this, but perhaps CHANGES.rst should be updated to mention this.

@astrofrog
Copy link
Member

@pllim - thank you for this great contribution! :)

@astrofrog astrofrog mentioned this pull request May 1, 2013
@embray
Copy link
Member
embray commented May 1, 2013

Yes, there needs to be documentation of this in CHANGES.rst and the New for version 3.0 page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0