Skip to content

Commit dfb5946

Browse files
authored
Training highlight ours (#808)
* Highlighting our modules: First try * Mark a couple more events as HSF events * Do not enumerate training schools * Refactor list_of_*_schools.md * Training school -> training event * Add page with HSF training events only * Add tooltip and link to badges
1 parent c1e091b commit dfb5946

9 files changed

+66
-46
lines changed

Schools/events.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
---
22
layout: plain
3-
title: Schools for HEP Software Training
3+
title: HEP Software Training Events
44
---
55

6-
{% include list_of_schools.md %}
6+
## Current and Upcoming Training Events
7+
8+
{% include list_of_upcoming_schools.md %}
9+
10+
## Past Events
11+
12+
{% include list_of_past_schools.md %}
13+
14+
## HSF supported/organized training events
15+
16+
The following events were directly organized by HSF or supported by HSF.
17+
18+
{% include list_of_hsf_schools.md %}

_data/training-schools.yml

+7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
source: http://codas-hep.org/
6161
title: CoDaS-HEP School (Computational and Data Science Training for High Energy
6262
Physics) at Princeton University
63+
tags: HSF
6364
- author: Guillermo Fidalgo
6465
date: 2019-08-26
6566
deadline: ''
@@ -120,6 +121,7 @@
120121
end_date: 2020-02-25
121122
source: https://indico.cern.ch/event/875393/
122123
title: CSU Summer Student Computing/Analysis Training 2020
124+
tags: HSF
123125
- author: Guillermo Fidalgo
124126
date: 2020-02-10
125127
deadline: 2020-02-09
@@ -158,24 +160,28 @@
158160
end_date: 2020-03-27
159161
source: https://indico.cern.ch/event/882660/
160162
title: Software Carpentry at CERN [**POSTPONED/CANCELLED**]
163+
tags: HSF
161164
- author: Kilian Lieret
162165
date: 2020-04-27
163166
deadline: ''
164167
end_date: 2020-04-27
165168
source: https://indico.cern.ch/event/858758/
166169
title: Alpaka Parallel Programming - Taster Session and Basic Tutorial
170+
tags: HSF
167171
- author: Kilian Lieret
168172
date: 2020-04-28
169173
deadline: ''
170174
end_date: 2020-04-30
171175
source: https://indico.cern.ch/event/867700/
172176
title: Alpaka Parallel Programming - Advanced Training Hackathon
177+
tags: HSF
173178
- author: Kilian Lieret
174179
date: 2020-06-02
175180
deadline: ''
176181
end_date: 2020-06-04
177182
source: https://indico.cern.ch/event/904759/
178183
title: Virtual Pipelines Training
184+
tags: HSF
179185
- author: Guillermo Fidalgo
180186
date: 2020-06-07
181187
deadline: 2020-02-27
@@ -200,6 +206,7 @@
200206
end_date: 2020-07-10
201207
source: https://opensciencegrid.org/user-school-2020/
202208
title: OSG User School 2020
209+
tags: HSF
203210
- author: Guillermo Fidalgo
204211
date: 2020-07-13
205212
deadline: ''

_includes/list_of_hsf_schools.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% assign schools = site.data.training-schools | sort:"date" %}
2+
{% capture now %}{{'now' | date: '%s' }}{% endcapture %}
3+
{% for post in schools reversed %}
4+
{% capture date %}{{post.end_date | date: '%s' | plus: 0 }}{% endcapture %}
5+
{% if date < now %}
6+
{% if post.tags contains "HSF" %}
7+
* [**{{post.date | date: "%-d %b"}} - {{post.end_date | date: "%-d %b %Y"}}** - {{post.title}} ]({{post.source}}){% if post.url_proof_ignore %}{:data-proofer-ignore=""}{% endif %}
8+
{% endif %}
9+
{% endif %}
10+
{% endfor %}

_includes/list_of_past_schools.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% assign schools = site.data.training-schools | sort:"date" %}
2+
{% capture now %}{{'now' | date: '%s' }}{% endcapture %}
3+
{% for post in schools reversed %}
4+
{% capture date %}{{post.end_date | date: '%s' | plus: 0 }}{% endcapture %}
5+
{% if date < now %}
6+
* [**{{post.date | date: "%-d %b"}} - {{post.end_date | date: "%-d %b %Y"}}** - {{post.title}} ]({{post.source}}){% if post.url_proof_ignore %}{:data-proofer-ignore=""}{% endif %} {% for tag in post.tags %} <a href="/training/our-events.html" title="Organized/supported by HSF"><span class="badge badge-success">{{ tag }}</span></a> {% endfor %}
7+
{% endif %}
8+
{% endfor %}

_includes/list_of_schools.md

-25
This file was deleted.

_includes/list_of_upcoming_schools.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% assign schools = site.data.training-schools | sort:"date" %}
2+
{% capture now %}{{'now' | date: '%s' }}{% endcapture %}
3+
{% for post in schools %}
4+
{% capture date %}{{post.end_date | date: '%s' }}{% endcapture %}
5+
{% if date > now %}
6+
{% if post.deadline != blank %}
7+
* [**{{post.date | date: "%-d %b"}} - {{post.end_date | date: "%-d %b %Y"}}** - {{post.title}} - **Deadline:** {{post.deadline | date: "%-d %b %Y"}} ]({{post.source}}){% if post.url_proof_ignore %}{:data-proofer-ignore=""}{% endif %} {% for tag in post.tags %} <a href="/training/our-events.html" title="Organized/supported by HSF"><span class="badge badge-success">{{ tag }}</span></a> {% endfor %}
8+
{% else %}
9+
* [**{{post.date | date: "%-d %b"}} - {{post.end_date | date: "%-d %b %Y"}}** - {{post.title}} ]({{post.source}}){% if post.url_proof_ignore %}{:data-proofer-ignore=""}{% endif %} {% for tag in post.tags %} <a href="/training/our-events.html" title="Organized/supported by HSF"><span class="badge badge-success">{{ tag }}</span></a> {% endfor %}
10+
{% endif %}
11+
{% endif %}
12+
{% endfor %}

_training/our-events.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "HSF Training Events"
3+
layout: plain
4+
---
5+
6+
The following events were directly organized by HSF or supported by HSF:
7+
8+
{% include list_of_hsf_schools.md %}

_workinggroups/training.md

+2-19
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,9 @@ The [HSF-Training GitHub Organization](https://github.com/hsf-training) hosts th
4949

5050
The HSF training group relies on a growing list of proactive and dedicated educators that help us with our mission. Head to [this page](/training/community.html) to meet them!
5151

52-
## Current and Upcoming Training Schools
52+
## Current and Upcoming Training Events
5353

54-
{% assign schools = site.data.training-schools | sort:"date" %}
55-
56-
{% capture now %}{{'now' | date: '%s' }}{% endcapture %}
57-
58-
{% for post in schools %}
59-
{% capture date %}{{post.end_date | date: '%s' }}{% endcapture %}
60-
{% if date > now %}
61-
{% if post.deadline != blank %}
62-
1. [**{{post.date | date: "%-d %b"}} - {{post.end_date | date: "%-d %b %Y"}}** - {{post.title}} - **Deadline:** {{post.deadline| date: "%-d %b %Y"}} ]({{post.source}}){% if post.url_proof_ignore %}{:data-proofer-ignore=""}{% endif %}
63-
64-
{% else %}
65-
1. [**{{post.date | date: "%-d %b"}} - {{post.end_date | date: "%-d %b %Y"}}** - {{post.title}} ]({{post.source}}){% if post.url_proof_ignore %}{:data-proofer-ignore=""}{% endif %}
66-
67-
{% endif %}
68-
{% endif %}
69-
{% endfor %}
70-
71-
[**Full list of Upcoming and Past Schools**](/Schools/events.html)
54+
{% include list_of_upcoming_schools.md %}
7255

7356
## Convenors
7457

scripts/add_training_event.py

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def __init__(
2424
source: str, author: str,
2525
deadline: Union[str, datetime.date] = "",
2626
url_proof_ignore=False,
27+
tags=None,
2728
):
2829
self.title = title
2930
self.date = self._interpret_date(date)
@@ -32,6 +33,9 @@ def __init__(
3233
self.source = source
3334
self.author = author
3435
self.url_proof_ignore = url_proof_ignore
36+
if tags is None:
37+
tags = []
38+
self.tags = tags
3539

3640
if not self.end_date >= self.date:
3741
raise ValueError(
@@ -64,6 +68,7 @@ def input(cls):
6468
deadline=input("Deadline [YYYY-MM-DD or ''] ").strip(),
6569
source=input("Url ").strip(),
6670
author=input("Author ").strip(),
71+
tags=input("Tags (comma separated)").strip()
6772
)
6873
return tmp_event
6974

0 commit comments

Comments
 (0)