grants.utils
Define the Grant utilities.
Copyright (C) 2021 Gitcoin Core
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
get_clr_rounds_metadata
get_clr_rounds_metadata()
Fetches default CLR round metadata for stats/marketing flows. This is configured when multiple rounds are running
is_grant_team_member
is_grant_team_member(grant, profile)
Checks to see if profile is a grant team member
Args: grant (grants.models.Grant): The grant in question. profile (dashboard.models.Profile): The current user's profile.
save_grant_to_notion
save_grant_to_notion(grant)
Post an insert to notions sybil-db table
toggle_user_sybil
toggle_user_sybil(sybil_users, non_sybil_users)
util function which marks users as sybil/not
bsci_script
bsci_script(csv: str) -> tuple
Generate records of sybil / non-sybil users based on the CSV output as provided by BSci detection pipeline.