Skip to content

Commit

Permalink
Merge pull request #1046 from sbillinge/fix_annual_activity_tests
Browse files Browse the repository at this point in the history
fixing builder tests for annual activity
  • Loading branch information
sbillinge authored Nov 2, 2023
2 parents 152d686 + 3f12f04 commit 825e4ec
Show file tree
Hide file tree
Showing 7 changed files with 528 additions and 30 deletions.
4 changes: 2 additions & 2 deletions regolith/builders/activitylogbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def latex(self):
# current and pending
#########
pi = fuzzy_retrieval(
self.gtx["people"], ["aka", "name"], group["pi_name"]
self.gtx["people"], ["_id", "aka", "name"], build_target
)
pinames = pi["name"].split()
piinitialslist = [i[0] for i in pinames]
Expand Down Expand Up @@ -477,4 +477,4 @@ def latex(self):
licenses=licenses,
hindex=hindex,
)
self.pdf("billinge-ann-report")
self.pdf(f"{pi['_id']}-ann-report.tex")
4 changes: 2 additions & 2 deletions regolith/builders/appraisalbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ def latex(self):
#########################
# render
#########################
# "C:/Users/simon/scratch/billinge-ann-report.tex",
# "C:/Users/simon/scratch/sbillinge-ann-report.tex",
self.render(
"columbia_annual_report.tex",
"billinge-ann-report.tex",
"sbillinge-ann-report.tex",
pi=pi,
p=me,
projects=projs,
Expand Down
20 changes: 3 additions & 17 deletions regolith/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@
"teaching": [
{
"course": 'MSAE-3010: Introduction to Materials Science',
"courseid": "f17-3010",
"courseid": "f16-3010",
"description": "This course is an introduction to nuclear " "physics.",
"enrollment": 18,
"evaluation": {
Expand Down Expand Up @@ -1431,7 +1431,7 @@
},
{
"course": 'MSAE-3010: Introduction to Materials Science',
"courseid": "s17-3010",
"courseid": "s18-3010",
"description": "This course is an introduction to nuclear " "physics.",
"enrollment": 18,
"evaluation": {
Expand Down Expand Up @@ -1485,7 +1485,7 @@
},
{
"course": 'MSAE-3010: Introduction to Materials Science',
"courseid": "s17-3010",
"courseid": "s19-3010",
"description": "This course is an introduction to nuclear " "physics.",
"enrollment": 18,
"month": "Jan",
Expand All @@ -1501,20 +1501,6 @@
"courseid": "f18-3010",
"description": "This course is an introduction to nuclear " "physics.",
"enrollment": 18,
"evaluation": {
"response_rate": 58.33,
"amount_learned": 4.57,
"appropriateness_workload": 4.29,
"fairness_grading": 4.57,
"course_overall": 4.43,
"organization": 4.0,
"classroom_delivery": 4.29,
"approachability": 4.86,
"instructor_overall": 4.43,
"comments": [
"Great teacher but disorganized",
"Wears pink pants. Why?",
]},
"month": "August",
"organization": "Columbia University",
"position": "professor",
Expand Down
14 changes: 6 additions & 8 deletions regolith/templates/columbia_annual_report.tex
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,11 @@ \subsection*{Spring {{p["begin_period"][-4:]}} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Courses taught in {{ p["begin_period"][-4:] }} - {{ p["end_period"][-4:]}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Fall {{p["begin_period"][-4:]}} }
\begin{itemize}[label=$-$]
{% for c in p['teaching'] %}
{% if c['year'] >= p["begin_period"][-4:]|int and c['semester'] == 'Fall' %}
\item {\bf Fall {{c["year"]}}: {{latex_safe(c['course'])-}} }\\
{% if c['year'] == p["begin_period"][-4:]|int and c['semester'] == 'Fall' %}
\item {\bf {{latex_safe(c['course'])-}} }\\
{% if 'none' not in c['courseid'] %}
Enrollment: {{ latex_safe(c['enrollment']|string) }} \\
{% if c.get('evaluation')%}
Expand All @@ -525,12 +526,11 @@ \subsection*{Spring {{p["begin_period"][-4:]}} }
{% endif %}
{%endfor%}
\end{itemize}
\subsection*{Spring {{p["end_period"][-4:]}} }
\begin{itemize}[label=$-$]
{% set itemcount = 0 %}
{% for c in p['teaching'] %}
{% if c['year'] <= p["end_period"][4:]|int and c['semester'] == 'Spring' %}
{% set itemcount = itemcount + 1 %}
\item {\bf Spring {{c["year"]}}: {{latex_safe(c['course'])-}} }\\
{% if c['year'] == p["end_period"][-4:]|int and c['semester'] == 'Spring' %}
\item {\bf {{latex_safe(c['course'])-}} }\\
{%- if 'none' not in c['courseid'] -%}
Enrollment: {{ latex_safe(c['enrollment']|string) }} \\
{%- if c.get('evaluation')-%}
Expand All @@ -541,8 +541,6 @@ \subsection*{Spring {{p["begin_period"][-4:]}} }
{%- endif-%}{%-endif-%}
{%- endif -%}
{%endfor%}
{%-if itemcount == 0-%}
\item See Below {%- endif %}
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{ Courses expected to teach in {{ p["end_period"][-4:] }} to {{ p["post_end_period"][-4:]}}}
Expand Down
Loading

0 comments on commit 825e4ec

Please sign in to comment.