diff --git a/competitions/GFC2024/etl/compose-and-upload b/competitions/GFC2024/etl/compose-and-upload index dd68b1102352762acae9d4bdb40364d27abe5ae6..c17cb920e5e14846ea89918a50eddcba8c5230ef 100755 --- a/competitions/GFC2024/etl/compose-and-upload +++ b/competitions/GFC2024/etl/compose-and-upload @@ -221,6 +221,7 @@ def main(): "attachments-dir=", "tdc-config-dir=", "frozen-peer-scores=", + "lfc-analysis-pages=", "pare=", "collection-only", ], @@ -242,6 +243,8 @@ def main(): attachments_dir = a elif o == "--frozen-peer-scores": frozen_peer_scores_json = a + elif o == "--lfc-analysis-pages": + lfc_analysis_pages = a elif o == "--pare": pare = a elif o == "--collection-only": @@ -554,6 +557,24 @@ def main(): comp.add_supplemental_information(competition.ColumnDuplicator(competition.Proposal.ListColumnAccessor(["Panel Rank", "Raw"]), "Rank")) + lfc_analysis_fields = [ + "One Sentence Description", + "Project Location", + "The Challenge", + "The Solution", + "Implementation Plan", + "Partnerships", + "Alignment with the Three Futures", + "Strength of Approach", + "Potential Challenges", + "Reputational Risks", + "Science-Specific Feedback", + "Grantee Status", + "Alignment with GRP Grantmaking Approach", + ] + comp.add_supplemental_information(competition.LFCAnalysisAdder(lfc_analysis_fields)) + comp.add_supplemental_information(competition.StaticColumnAdder("LLM LFC Analysis", "")) + attachments = competition.RegexSpecifiedAttachments( comp.sorted_proposal_keys, attachments_dir ) @@ -713,7 +734,13 @@ def main(): my_wiki.upload_collection(comp, cache_videos=config.cache_videos) my_wiki.upload_attachments(attachments.attachments) + lfc_analysis_proposals = open(lfc_analysis_pages).read().splitlines() + for proposal in comp.proposals.values(): + tab_type = "PROPOSAL" + if proposal.key() in lfc_analysis_proposals: + tab_type = "FINALIST_CANDIDATE" + my_wiki.create_page( proposal.cell("MediaWiki Title"), """<!-- This page is generated by the ETL pipelines in the https://code.librehq.com/ots/torque-sites/. It is rendered based on the template in the Torque Configuration (TorqueConfig:MainConfig), and the '#tdcrender' line below is correct. Normally, this page should not be edited, as any edits you make here will not be stored in the Torque database and thus would be lost the next time the ETL process is run.--> @@ -723,18 +750,28 @@ def main(): {{ #rankedchoice: }} </div> -<!-- TABS: PROPOSAL -->""" - % proposal.key(), +<!-- TABS: %s -->""" + % (proposal.key(), tab_type), ) my_wiki.create_page( "Evaluations of " + proposal.cell("MediaWiki Title"), """<!-- This page is generated by the ETL pipelines in the https://code.librehq.com/ots/torque-sites/. It is rendered based on the template in the Torque Configuration (TorqueConfig:MainConfig), and the '#tdcrender' line below is correct. Normally, this page should not be edited, as any edits you make here will not be stored in the Torque database and thus would be lost the next time the ETL process is run.--> {{ #tdcrender:GFC2024/id/%s.mwiki|Evaluations }} -<!-- TABS: PROPOSAL -->""" - % proposal.key(), +<!-- TABS: %s -->""" + % (proposal.key(), tab_type), ) + if proposal.key() in lfc_analysis_proposals: + my_wiki.create_page( + "LFC Analysis of " + proposal.cell("MediaWiki Title"), + """<!-- This page is generated by the ETL pipelines in the https://code.librehq.com/ots/torque-sites/. It is rendered based on the template in the Torque Configuration (TorqueConfig:MainConfig), and the '#tdcrender' line below is correct. Normally, this page should not be edited, as any edits you make here will not be stored in the Torque database and thus would be lost the next time the ETL process is run.--> +{{ #tdcrender:GFC2024/id/%s.mwiki|GFCLFCAnalysis }} + +<!-- TABS: FINALIST_CANDIDATE -->""" + % proposal.key(), + ) + my_wiki.sanity_check_wiki() diff --git a/competitions/GFC2024/etl/deploy b/competitions/GFC2024/etl/deploy index a242b3e2e031022f52d9ce255b78b7de791be509..8f00938e494867445c4cd24fc028a37aa84bf59a 100755 --- a/competitions/GFC2024/etl/deploy +++ b/competitions/GFC2024/etl/deploy @@ -33,6 +33,7 @@ PROPOSALS_JSON="GFC2024_Application_Data.json" TMP_ATTACHMENTS_DIR="${DATA_DIR}/tmpattachments" ATTACHMENTS_DIR="${DATA_DIR}/attachments/" TDC_CONFIG_DIR="${DATA_DIR}/tdcconfig" +LFC_ANALYSIS_PAGES="lfc_analysis_proposals.dat" FROZEN_PEER_SCORES="${DATA_DIR}/FrozenPeerData.json" RUNNER="${LFC_DIR}"/compose-and-upload @@ -62,6 +63,7 @@ if [ ! -d "${DATA_DIR}" ] ; then echo "Decrypting..." decrypt "${DATA_DIR}/${PROPOSALS_JSON}" "${ENCRYPTED_DIR}/${PROPOSALS_JSON}.gpg" "${GPG_PASSPHRASE}" + decrypt "${DATA_DIR}/${LFC_ANALYSIS_PAGES}" "${ENCRYPTED_DIR}/${LFC_ANALYSIS_PAGES}.gpg" "${GPG_PASSPHRASE}" mkdir -p ${TDC_CONFIG_DIR} @@ -88,6 +90,7 @@ mkdir -p $TDC_CONFIG_DIR ${RUNNER} --proposals-json="${DATA_DIR}/${PROPOSALS_JSON}" \ --attachments-dir="${ATTACHMENTS_DIR}" \ --frozen-peer-scores="${FROZEN_PEER_SCORES}" \ + --lfc-analysis-pages="${DATA_DIR}/${LFC_ANALYSIS_PAGES}" \ $PARE \ $CSV_ONLY \ --tdc-config-dir="${TDC_CONFIG_DIR}"