Skip to content

Commit b57f88b

Browse files
authored
presentations (#1279)
* add presentation with fields to correctly build talks after recent change * news * feat: add hide option in presentations db to suppress printing a presentation in the list * fix: add wxpython to conda install as it is needed for gooey but won't build from pip * tests: add test for new presentation structure
1 parent 1b85599 commit b57f88b

7 files changed

Lines changed: 42 additions & 1 deletion

File tree

news/presentations.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* a_presentation helper now adds new fields needed for new way of building talks
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

requirements/conda.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ruamel.yaml
2+
ruamel.yaml.clib
23
bibtexparser
34
docutils
45
jinja2
@@ -14,4 +15,4 @@ matplotlib-base
1415
habanero
1516
google-api-python-client
1617
google-auth-oauthlib
17-
wxpython
18+
wxpython # needed for gooey but can't build from pip

src/regolith/exemplars.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,7 @@
15951595
"begin_month": 5,
15961596
"begin_day": 22,
15971597
"department": "apam",
1598+
"hide": false,
15981599
"institution": "columbiau",
15991600
"location": "Upton NY",
16001601
"meeting_name": "Meeting to check flexibility on dates",

src/regolith/helpers/a_presentationhelper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def subparser(subpi):
3939
)
4040
subpi.add_argument("begin_date", help="Input begin date for this presentation ", **date_kwargs)
4141
subpi.add_argument("end_date", help="Input end date for this presentation", **date_kwargs)
42+
subpi.add_argument(
43+
"--regolith-talk-id", help="the id of the talk in your regolith talks collection, if known", default="tbd"
44+
)
4245
subpi.add_argument("-t", "--title", help="the title of the presentation, default is tbd", default="tbd")
4346
subpi.add_argument("-a", "--abstract", help="abstract of the presentation, defaults to tbd", default="tbd")
4447
subpi.add_argument(
@@ -268,8 +271,10 @@ def db_updater(self):
268271
pdoc.update(
269272
{
270273
"project": ["all"],
274+
"presenter": rc.person,
271275
"status": rc.status,
272276
"title": rc.title,
277+
"talk_id": rc.regolith_talk_id,
273278
"type": rc.type,
274279
}
275280
)

src/regolith/schemas.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,11 @@
19511951
"anyof_type": ["string", "integer"]
19521952
},
19531953
"end_day": {"required": false, "type": "integer"},
1954+
"hide": {
1955+
"description": "Whether the presentation should be hidden in the presentation list",
1956+
"required": false,
1957+
"type": "boolean"
1958+
},
19541959
"institution": {
19551960
"description": "institution where thepresentation will be made, if applicable.",
19561961
"required": false,

src/regolith/tools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,9 @@ def filter_presentations(
602602
fourthclean = list()
603603
presclean = list()
604604

605+
# remove presentations that have hide: True
606+
presentations = [pres for pres in presentations if not pres.get("hide", False)]
607+
605608
# build the filtered collection
606609
# only list the talk if the group member is an author
607610
for pres in presentations:

tests/outputs/a_presentation/presentations.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
begin_month: 5
5252
begin_year: 2018
5353
department: apam
54+
hide: false
5455
institution: columbiau
5556
location: Upton NY
5657
meeting_name: Meeting to check flexibility on dates
@@ -77,8 +78,10 @@
7778
- This is to test Case C.2 where user wants an expense added and passed the
7879
force option without specifying an expense db when default is public
7980
presentation_url: http://drive.google.com/SEV356DV
81+
presenter: nasker
8082
project:
8183
- all
8284
status: in-prep
85+
talk_id: tbd
8386
title: Testing Case C.2
8487
type: contributed_oral

0 commit comments

Comments
 (0)