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

AFE eligibility logic #35192

Merged
merged 5 commits into from Jun 8, 2020
Merged

AFE eligibility logic #35192

merged 5 commits into from Jun 8, 2020

Conversation

bencodeorg
Copy link
Contributor

@bencodeorg bencodeorg commented Jun 6, 2020

Schools are eligible for AFE benefits if they meet any of the following criteria:

  • Title I school
  • Greater than or equal to 40% underrepresented minority students
  • Greater than or equal to 40% of students are eligible for free or reduced meals

Will be used in AFE eligibility flow -- skeleton of UI here.

Testing story

Added new unit tests in School model.

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@bencodeorg bencodeorg requested a review from a team June 6, 2020 00:44
if stats.nil? || stats.frl_eligible_total.nil? || stats.students_total.nil?
return false
end
stats.frl_eligible_total.to_f / stats.students_total.to_f >= 0.5
end

# determines if school meets Amazon Fugure Engineer criteria
# eligible if a) title I school, >40% URM, or >40% eligible for free and reduced meals
Copy link
Member

Choose a reason for hiding this comment

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

nit: is there supposed to be a b) etc.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry think I meant to put the different criteria on different lines, will fix.

return false if stats.nil?

# To align with maker_high_needs? definition above, returning false
# if we don't have all data for a given school
Copy link
Member

Choose a reason for hiding this comment

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

super nit: please end sentences with . as it makes it a lot easier to read than when newlines might or might not imply end of sentence. :)

@bencodeorg bencodeorg merged commit 324ff53 into staging Jun 8, 2020
@bencodeorg bencodeorg deleted the afe-school-stats-logic branch June 8, 2020 20:48
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