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

feat: nsf prior support now built as part of grantreport. initial commit #1229

Merged
merged 4 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/prior-support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* Ability to print a prior-support statement as part of the grant-report.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
5 changes: 4 additions & 1 deletion src/regolith/builders/grantreportbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@ def latex(self):
# since=rp_start_date,
# before=rp_end_date)
publications = [publ for publ in self.gtx["citations"] if grant_id in publ.get("grant", "")]

publ_ids = []
for publ in publications:
publ_ids.append(publ.get("_id"))
formatted_authors = [f" {HumanName(name).full_name}" for name in publ.get("authors", [])]
publ["authors"] = formatted_authors
# Participants/Organizations
publication_id_string = ", ".join(publ_ids)
participants = []
for person in self.gtx["people"]:
months_on_grant, months_left = self.months_on(grant_id, person, rp_start_date, rp_end_date)
Expand Down Expand Up @@ -217,6 +219,7 @@ def latex(self):
grantPeople=grant_people,
participants=participants,
collaborators=collaborators,
publication_id_string=publication_id_string,
hline="------------------------------------------------------------------------------",
)

Expand Down
6 changes: 6 additions & 0 deletions src/regolith/exemplars.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@
{"date": "2020-07-21", "funds_available": 2600.00}
],
"narrative": "https://docs.google.com/document/d/1nZxqoL-Ucni_aXLWmXtRDd3IWqW0mZBO65CEvDrsXZM/edit?usp=sharing",
"prior_support": {
"introduction": "A general overview of the project",
"intellectual_merit": "Open source software got much better",
"broader_impact": "all of science became higher quality",
"products": "all of science became higher quality"
},
"program": "Small Development Grants",
"team": [
{
Expand Down
28 changes: 28 additions & 0 deletions src/regolith/schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,34 @@
"required": false,
"anyof_type": ["integer", "float"]
},
"prior_support": {
"description": "everything we need to generate a prior support section in the proposal",
"required": false,
"type": "dict",
"schema": {
"introduction": {
"description": "text for the intellectual merit section",
"type": "string",
"required": false
},
"intellectual_merit": {
"description": "text for the intellectual merit section",
"type": "string",
"required": false
},
"broader_impact": {
"description": "text for the broader impacts section",
"type": "string",
"required": false
},
"products": {
"description": "text describing non-publication products",
"type": "string",
"required": false
}
}
},

"program": {
"description": "the program the work was funded under",
"required": false,
Expand Down
29 changes: 29 additions & 0 deletions src/regolith/templates/grantreport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,32 @@ Significant changes in use or care of human subjects
Significant changes in use or care of vertebrate animals

Significant changes in use or care of biohazards{{ newline }}


Prior Support:
{{ grant.get('awardnr','') }}, ${{- grant.get('amount','') -}}, {{ begin_date }} to {{ end_date -}}.
{{ grant.get('title', '') }}

the work resulted in {{ len(products) }} publications:
\cite{ {{- publication_id_string -}} }

{% if grant.get('prior_support',{}).get('introduction','') | length > 0 %}
Introduction: {{ grant.get('prior_support',{}).get('introduction','') }}
{% endif -%}
{% if grant.get('prior_support',{}).get('intellectual_merit','') | length > 0 %}
Intellectual Merit: {{ grant.get('prior_support',{}).get('intellectual_merit','') }}
{% endif -%}
{% if grant.get('prior_support',{}).get('broader_impact','') | length > 0 %}
Broader Impact: {{ grant.get('prior_support',{}).get('broader_impact','') }}
{% endif -%}
{% if grant.get('prior_support',{}).get('products','') | length > 0 %}
Products: {{ grant.get('prior_support',{}).get('products','') }}
{% endif %}
{%- for publ in products %}
- {{ publ.get('title') }}
{{ publ.get('_id') }}
{% for person in publ.get('author') %}{{ person }}, {% endfor %}
{{ publ.get('journal') }}, {{ publ.get('volume') }}, pp. {{ publ.get('pages') }}
{{ publ.get('month') }}/{{ publ.get('year') }}
{{ publ.get('doi') }}
{% endfor %}
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,21 @@ Significant changes in use or care of human subjects
Significant changes in use or care of vertebrate animals

Significant changes in use or care of biohazards



Prior Support:
NF-1234, $3000.0, 2017-04-01 to 2018-03-31.
SymPy 1.1 Release Support

the work resulted in 0 publications:
\cite{}


Introduction: A general overview of the project

Intellectual Merit: Open source software got much better

Broader Impact: all of science became higher quality

Products: all of science became higher quality
Loading