Skip to content

Commit

Permalink
Add some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Aug 21, 2024
1 parent d29ddbc commit b33dfcc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ class Allocation < ApplicationRecord
has_many :project_allocations

def calculate_funded_projects
# TODO only calculate if the fund has over a certain amount of money

# get a list of all possible projects for this fund
projects = find_possible_projects

Expand Down Expand Up @@ -43,6 +45,7 @@ def calculate_funded_projects
# save the project allocations
# TODO insert all allocations in a single transaction
# TODO do we both to save allocations with a score of 0?
# TODO there should be a minimum allocation amount
allocations.each do |allocation|
ProjectAllocation.create!(
project_id: allocation[:project_id],
Expand Down Expand Up @@ -96,6 +99,8 @@ def normalize_metrics(metrics)
def find_possible_projects
# TODO include aliases
Project.keyword(fund.primary_topic)
# TODO project must have a license
# TODO project should not be archived or deleted
end

def export_to_csv
Expand Down

0 comments on commit b33dfcc

Please sign in to comment.