Skip to content
Jason McIntosh edited this page Jun 30, 2020 · 6 revisions

The Colossal Fund is an annual fundraising drive in support of IFComp, launched by its parent organization IFTF in 2017. As such, this codebase contains code and other resources that support Colossal Fund.

How it works

The IFComp::ColossalFund library found within this repository reads some data files from disk to build a set of queryable Perl objects. The app's controllers make these objects available to templates as needed in order to display current Colossal Fund-related information.

Files of note

Colossal Fund data files are located in root/lib/data/colossal_fund, relative to the app's main directory.

Within that directory:

  • current_progress.json simply defines a JSON hash containing information about the current year's Colossal Fund drive. Keys it recognizes:

    • goal_dollars: The amount we're trying to raise this year.

      If set to a nonzero value, then the website will display, where apppropriate, a progress bar with appropriate text.

      If set to zero, then the website will display text stating that the annual fund will kick off later in the year.

    • collected_dollars: How much we've raised this year.

    • minimum_prize: The smallest potential prize that the fund will fund, in dollars. Usually constant.

    • minimum_prize: The largest potential prize that the fund will fund, in dollars. Calculated offline via a formula not specified on this wiki page, ahem.

    • estimated_entries: The number of entries assumed to exist this year in order for the value of "maximum_prize" to be what we say it is.

  • contributors is a directory containing one CSV file for every year that we want to present a "high score table" (donor wall) for. These files generate the pages found at the URI path /about/colossal/year.

    Each such file must be named year.csv. For example: 2017.csv.

    Each file contains one row for each donation submitted. Each row has three fields, in this order:

    1. The email address, if known, of the donor.
    2. The amount donated, in dollars.
    3. The name that the donor wishes to publicly use. If this value is "anonymous" (case-insensitive), empty, or 0, then the web app will treat this as an anonymous donation rather than a named-and-listed one.

Finding examples

For obvious reasons, we don't check actual donation data into version control. You can find some meaningful dummy data in t/colossal. The test script at t/colossal_fund.t puts it through its paces.