Skip to content
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

Handle empty candidate list for guide and test for get_aca_catalog #94

Merged
merged 4 commits into from
Sep 17, 2018

Conversation

jeanconn
Copy link
Contributor

Handle empty candidate list for guide and add empty cand test for get_aca_catalog

@@ -134,6 +134,9 @@ def run_search_stages(self):
"""
cand_guides = self.meta['cand_guides']
self.log("Starting search stages")
if len(cand_guides) == 0:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@taldcroft I looked at adding similar tweaks to what you used in proseco.acq, but for the empty candidate list, it seemed just as reasonable to stop running the checks and return the empty table of candidates. Does this make sense?

As far as I could tell, not selecting any stars later through the search stages resulted in just the all-False mask within cand_guides, which returned a 0-list table with an 'id' column defined... which seemed all good.

@jeanconn jeanconn requested a review from taldcroft September 17, 2018 20:21
Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks good!

@taldcroft
Copy link
Member

With this can we close #90?

@taldcroft taldcroft added the bug Something isn't working label Sep 17, 2018
@taldcroft
Copy link
Member

And maybe cut 1.0.2 after this? I'm going to say this is a bug fix.

@jeanconn
Copy link
Contributor Author

Yes, I have a couple of edits here but then this + #92 + #93 supercede #90 and will make 1.0.2.

proseco/guide.py Outdated
@@ -134,6 +134,9 @@ def run_search_stages(self):
"""
cand_guides = self.meta['cand_guides']
self.log("Starting search stages")
if len(cand_guides) == 0:
self.log("There are no candidates to check in stages. Exiting")
return cand_guides
Copy link
Contributor Author

@jeanconn jeanconn Sep 17, 2018

Choose a reason for hiding this comment

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

One edit. I just should have a better comment here before returning the empty cand_guides as the empty 'selected' set. Could also bump this if statement back up one level and have a conditional on bothering to get here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants