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

Only show people with a photo as a guess. Fixes #37. #50

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

blinry
Copy link
Collaborator

@blinry blinry commented Apr 26, 2019

No description provided.

Copy link
Owner

@jasonaowen jasonaowen left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this, @blinry ! I was able to test it locally by clicking "next" a bunch and not seeing any "no photo" pictures; just to make sure the random number generator wasn't messing with me, I also removed a NOT from the query and saw only "no photo" pictures. Looks good!

There's a small, optional suggestion below; if you'd rather not change it, let me know, and I'll happily merge it as-is.

faces.py Outdated Show resolved Hide resolved

hints = cursor.fetchall()

return person + hints
Copy link
Owner

Choose a reason for hiding this comment

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

Does... fetchall just return a list now? That's so much better! This is much clearer than the silly [x for x in cursor.fetchall()].

first_name,
middle_name,
last_name,
image_url
Copy link
Owner

Choose a reason for hiding this comment

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

We talked about this in person, and I don't think it makes sense to fix now, but I want to note it here so I/we don't forget later:

For the hints, the only information we care about is the first_name; everything else is unused.

faces.py Outdated
ON people.person_id = stints.person_id
INNER JOIN user_batch
ON stints.batch_id = user_batch.batch_id
WHERE people.person_id != %s AND people.person_id != %s
Copy link
Owner

Choose a reason for hiding this comment

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

We talked about this in person, too, and again it doesn't need to be fixed in this PR:

Now that we're doing two separate queries, and because these queries are each so long, I think it would make sense to extract a view. Possibly we'd also need to rename the existing batch_mates view, since that name might better describe this query.

Co-authored-by: Jaryn Colbert <jaryn.colbert@gmail.com>
@blinry
Copy link
Collaborator Author

blinry commented Apr 30, 2019

I like your formatting suggestion, and I like the care you seem to give to your projects in general! 💚

I made the changes you suggested and force-updated this branch. Is that a reasonable workflow, or is there any GitHub feature related to reviewing which makes it more transparent what's going on?

Copy link
Owner

@jasonaowen jasonaowen left a comment

Choose a reason for hiding this comment

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

I like your formatting suggestion, and I like the care you seem to give to your projects in general! 💚

Thank you so much! 💜

@jasonaowen
Copy link
Owner

I made the changes you suggested and force-updated this branch. Is that a reasonable workflow, or is there any GitHub feature related to reviewing which makes it more transparent what's going on?

That's perfect; it's precisely the workflow I prefer! It keeps the history clean, and GitHub has been improving the UI around it over time, adding features like the force-pushed event in the PR history and indicating comments on changed lines are outdated.

@jasonaowen
Copy link
Owner

@jaryncolbert , would you like to merge this PR today? 😃

@jaryncolbert
Copy link
Collaborator

@jaryncolbert , would you like to merge this PR today? 😃

I would love to! Congrats, @blinry, and great work! 💛

@jaryncolbert jaryncolbert merged commit da08935 into jasonaowen:master Apr 30, 2019
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.

None yet

3 participants