-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add facility reviews #4
Conversation
cf2ce60
to
a27772a
Compare
a27772a
to
296d578
Compare
29d1264
to
bf86932
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool work! (See comment about overly shortened variable names. To me they make those parts of the code less readable than it ought to be)
I think we can do aggregation a bit more nuanced, either in it's own PR or before this one merges. How we would aggregate wasn't specified, and I like this first stab at it for it's simplicity - but think it might be better to aggregate based on a % of positive reviews, and not just on the binary existence of a single negative review.
Aggregation as % of positive reviews
In my mind it was handled something like this, but that might add more complexity than it's worth?
We take the last 10 reviews.
Out of those, how many were positive?
If the ratio is above 80%, set it as likely.
If the ratio is below 30% set it as unlikely.
Anything else, set it as maybe.
If no reviews, it is unknown (obv.)
They don't have this at all
Then there's the special case of "They don't have this at all", or was_not_available
in your code.
That's not merely a negative result, but more like a "you won't ever be allowed, as this facility does not even exist".
It should probably have it's own aggregation state beside unknown, unlikely, maybe and likely. Something like impossible
. I've added code to reflect that in my PR #3 . If enough people say it doesn't exist (over 50%?), then it should be marked as impossible
- not only not allowed to use
.
Does that make sense?
RE: Aggregation as % of positive reviews RE: They don't have this at all |
Sounds like a good solution! 👍 |
208922d
to
df1d0f3
Compare
df1d0f3
to
13a770b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now!
Add the FacilityReview model
This model holds a review for a specific facility in a space.
This PR also contains a first stab at implementing a system for aggregating facility reviews.