Skip to content

Commit

Permalink
Merge branch 'main' into nomadscientist-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
bgruening authored Oct 11, 2024
2 parents b171b1c + b5a82ab commit b8bcae3
Show file tree
Hide file tree
Showing 48 changed files with 6,807 additions and 128 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ jobs:
${{ runner.os }}-gems-
- name: Install dependencies
run: |
sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev pkg-config # for node
sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev pkg-config graphviz # for node
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
npm install
rm -f package.json package-lock.json yarn.lock
npm install markdown-yaml-metadata-parser lunr
bundle pristine ffi
# END Dependencies

Expand All @@ -68,7 +69,6 @@ jobs:
make annotate ACTIVATE_ENV=pwd
curl -L https://docs.google.com/spreadsheets/d/1NfZhi5Jav7kl9zFCkeb7rIC2F8xW1isruv1TeO4WpNI/export\?format\=tsv | ruby bin/prepare_feedback.rb
curl -L https://hexylena.github.io/toolshed-version-database/tool-meta.json > metadata/tool-meta.json
npm install
make rebuild-search-index ACTIVATE_ENV=pwd
cat metadata/swagger.yaml | python bin/yaml2json.py > api/swagger.json
rdoc bin _plugins/ --output gtn_rdoc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/monthly-release-backfill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
pip install pyyaml
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
npm install
rm -f package.json package-lock.json yarn.lock
npm install markdown-yaml-metadata-parser lunr
bundle pristine ffi
# END Dependencies

Expand All @@ -68,7 +69,6 @@ jobs:
sed -i s"|^github_repository_branch: .*|github_repository_branch: '${SOURCE_TAG}'|g" _config.yml
sed -i s"|^title: .*|title: 'GTN Archive ${SOURCE_TAG}'|g" _config.yml
curl -L https://hexylena.github.io/toolshed-version-database/tool-meta.json > metadata/tool-meta.json
npm install
make rebuild-search-index ACTIVATE_ENV=pwd
cat metadata/swagger.yaml | python bin/yaml2json.py > api/swagger.json
JEKYLL_ENV=production bundle exec jekyll build --strict_front_matter -d _site/training-material
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/monthly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ jobs:
pip install pyyaml
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
npm install
rm -f package.json package-lock.json yarn.lock
npm install markdown-yaml-metadata-parser lunr
bundle pristine ffi
# END Dependencies

Expand All @@ -70,7 +71,6 @@ jobs:
sed -i s"|^github_repository_branch: .*|github_repository_branch: '${SOURCE_TAG}'|g" _config.yml
sed -i s"|^title: .*|title: 'GTN Archive ${SOURCE_TAG}'|g" _config.yml
curl -L https://hexylena.github.io/toolshed-version-database/tool-meta.json > metadata/tool-meta.json
npm install
make rebuild-search-index ACTIVATE_ENV=pwd
cat metadata/swagger.yaml | ruby bin/yaml2json.rb > api/swagger.json
JEKYLL_ENV=production bundle exec jekyll build --strict_front_matter -d _site/training-material
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/social.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "[Social] Autogenerate missing social media cards"

on:
schedule:
# * is a special character in YAML so you have to quote this string
# We'll run this daily at noon.
- cron: '0 12 * * *'
workflow_dispatch:
inputs:
all_old:
type: string
description: If you want to re-generate ALL images set to a non-empty value

jobs:
runner-job:
if: github.repository_owner == 'galaxyproject'
runs-on: ubuntu-latest
steps:
# Shallow should be fine for video
- uses: actions/checkout@v4
with:
fetch-depth: 500

# BEGIN Dependencies
- uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Install dependencies
run: |
sudo apt-get install -y imagemagick
mkdir -p ~/.fonts/
wget https://galaxy-training.s3.amazonaws.com/social/recursive.ttf -O ~/.fonts/recursive.ttf
fc-cache -rv
# END Dependencies


# We get the previous build ID to know how many videos were changed since
# then.
#
# We *could* fetch the diff in the past N days but if a build fails for
# any reason, we'd lose those changes permanently and things would never
# get built.
#
# So instead we just track the last successfully built timestamp
- name: Previous build ID
id: build_id
run: |
echo "timestamp=$(curl https://galaxy-training.s3.amazonaws.com/social/timestamp.txt -f 2>/dev/null || echo none)" >> $GITHUB_ENV
# Support regenerating all
if [[ "${{ github.event.inputs.selected_tag }}" != "" ]]; then
echo "timestamp=0" >> $GITHUB_ENV
fi
# The actual compilation process deposits everything in the ./social/ folder.
# And requires fetching metadata from the live website (api/social-meta.json)
- name: Build Social Media Cards
run: |
mkdir -p social/
python bin/social-cards.py $PREVIOUS_TIMESTAMP
env:
PREVIOUS_TIMESTAMP: ${{ env.timestamp }}

# Deploy step, scary.
- uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: galaxy-training
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: './social/'
DEST_DIR: 'social/'
2 changes: 1 addition & 1 deletion .github/workflows/video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
runner-job:
if: github.repository_owner == 'galaxyproject'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
# Label used to access the service container
mozillatts:
Expand Down
33 changes: 23 additions & 10 deletions CONTRIBUTORS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ angiolini:
joined: 2024-05
elixir_node: uk
orcid: 0000-0002-0814-8830

emmaleith:
name: Emma Leith
email: leith023@umn.edu
Expand Down Expand Up @@ -840,7 +840,7 @@ GabrielaLopez:
orcid: 0000-0002-0814-8830
joined: 2023-01
elixir_node: uk

gallardoalba:
name: Cristóbal Gallardo
joined: 2020-11
Expand Down Expand Up @@ -950,6 +950,13 @@ hexylena:
lat: 51.91
lon: 4.46

hfraser:
name: Heather Fraser
joined: 2024-09
email: heather.fraser@open.ac.uk
elixir_node: uk
github: false

hmenager:
name: Hervé Ménager
joined: 2017-09
Expand Down Expand Up @@ -998,7 +1005,7 @@ hujambo-dunia:
igcbioinformatics:
name: IGC Bioinformatics Unit
joined: 2018-12

igormakunin:
name: Igor Makunin
joined: 2024-09
Expand Down Expand Up @@ -1361,7 +1368,7 @@ LonsBio:
loraine-gueguen:
name: Loraine Guéguen
joined: 2017-09

lybCNU:
name: Yongbin Li
joined: 2024-08
Expand Down Expand Up @@ -1551,7 +1558,7 @@ Melkeb:
melpetera:
name: Mélanie Petera
joined: 2019-06

meltemktn:
name: Meltem Kutnu
joined: 2024-09
Expand All @@ -1562,6 +1569,12 @@ mgramm1:
orcid: 0000-0002-4217-5277
joined: 2021-03

mhintze:
name: Mark Hintze
email: mark.hintze@open.ac.uk
joined: 2024-09
github: false

miaomiaozhou88:
name: Miaomiao Zhou
email: m.zhou1@avans.nl
Expand Down Expand Up @@ -1674,7 +1687,7 @@ nakucher:
name: Natalie Kucher
email: nkucher3@jhu.edu
joined: 2023-06

natalie-wa:
name: Natalie Whitaker-Allen
email: nwhitak5@jh.edu
Expand Down Expand Up @@ -1884,7 +1897,7 @@ paulzierep:

pavanvidem:
name: Pavankumar Videm
orcid: 0000-0002-5192-126X
orcid: 0000-0002-5192-126X
joined: 2017-09
affiliations:
- uni-freiburg
Expand Down Expand Up @@ -2150,7 +2163,7 @@ shwdey:
name: Shweta Pandey
email: shwphd@gmail.com
joined: 2024-06

simonbray:
name: Simon Bray
joined: 2019-05
Expand Down Expand Up @@ -2344,7 +2357,7 @@ timonschlegel:
name: Timon Schlegel
orcid: 0009-0001-3228-105X
joined: 2024-05

timothygriffin:
name: Timothy J. Griffin
email: tgriffin@umn.edu
Expand Down Expand Up @@ -2399,7 +2412,7 @@ tsenapathi:

trungN:
name: Nguyen Vo Minh Trung
joined: 2024-09
joined: 2024-09

TKlingstrom:
name: Tomas Klingström
Expand Down
6 changes: 6 additions & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@
{%- elsif page.tags contains "gat" %}{% assign coverimage = "assets/images/gat.png" %}
{%- else %}{% assign coverimage = "assets/images/GTNLogo1000.png" %}{% endif %}
{% assign og_image = page.og_image | default: page['cover-image'] | default: topic.og_image | default: coverimage | default: "assets/images/GTNLogo1000.png" %}
{%- if page.layout == "tutorial_hands_on" or page.layout == "tutorial_slides" or page.layout == "event" or page.layout == "workflow" or page.layout == "faq" or page.layout == "introduction_slides" or page.layout == "learning-pathway" -%}
<meta property="og:image" content="https://galaxy-training.s3.amazonaws.com/social{{ page.url | replace: ".html", ".png" }}">
{% elsif page.layout == "topic" or page.layout == "recordings" %}
<meta property="og:image" content="https://galaxy-training.s3.amazonaws.com/social{{ page.url }}index.png">
{%- else -%}
<meta property="og:image" content="{% if og_image contains 'https://' %}{{ og_image }}{% else %}{{ site.url }}{{ site.baseurl }}/{{ og_image }}{% endif %}">
{%- endif -%}

{%- if page.layout == "tutorial_hands_on" -%}
<script type="application/ld+json">
Expand Down
4 changes: 4 additions & 0 deletions _layouts/base_slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
{%- elsif page.tags contains "gat" %}{% assign coverimage = "/assets/images/gat.png" %}
{%- else %}{% assign coverimage = "/assets/images/GTNLogo1000.png" %}{% endif %}
{% assign og_image = page.og_image | default: page['cover-image'] | default: topic.og_image | default: coverimage | default: "assets/images/GTNLogo1000.png" %}
{%- if page.layout == "tutorial_slides" or page.layout == "introduction_slides" -%}
<meta property="og:image" content="https://galaxy-training.s3.amazonaws.com/social{{ page.url | replace: ".html", ".png" }}">
{%- else -%}
<meta property="og:image" content="{% if og_image contains 'https://' %}{{ og_image }}{% else %}{{ site.url }}{{ site.baseurl }}/{{ og_image }}{% endif %}">
{% endif %}

<script type="application/ld+json">
{% include _includes/material.jsonld material=page topic=topic site=site %}
Expand Down
9 changes: 3 additions & 6 deletions _layouts/contributor_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<h1>
{{ entity.name | default: page.contributor }}
</h1>
{% if entity.funder_name %}
<p>Funded by {{ entity.funder_name }}</p>
{% endif %}
{% if entity.funder%}
<p>The activities listed below were partially funded by this project.</p>
{% endif %}
</hgroup>

{% if entity.bio %}
Expand All @@ -34,9 +34,6 @@ <h1>
</p>
{% endif %}

{% if entity.funder %}
<div class="label label-default label-large" style="{{ 'GTN Funder' | colour_tag }}">GTN Funder</div>
{% endif %}
{% if entity.in_memoriam %}
<div class="alert alert-dark" role="alert">
<h2 class="alert-heading">In Memoriam</h2>
Expand Down
18 changes: 13 additions & 5 deletions _layouts/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ <h1>{{ event.title }}</h1>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-toggle="tab" data-target="#overview" type="button" role="tab" aria-controls="overview" aria-selected="true">Course Overview</button>
</li>
{% if event.program %}
<li class="nav-item" role="presentation">
<button class="nav-link" id="program-tab" data-toggle="tab" data-target="#program" type="button" role="tab" aria-controls="program" aria-selected="false">Program</button>
</li>
{% endif %}
{% if event.infrastructure %}
<li class="nav-item" role="presentation">
<button class="nav-link" id="setup-tab" data-toggle="tab" data-target="#setup" type="button" role="tab" aria-controls="setup" aria-selected="false" >Setup</button>
Expand All @@ -61,8 +63,10 @@ <h1>{{ event.title }}</h1>
<p>{{ event.description | markdownify }}</p>
<p>{{ content | markdownify }}</p>

{% if event.audience %}
<h3>Who is this course for?</h3>
{{ event.audience }}
{% endif %}

{% if event.requirements %}
<h3 id="requirements">Requirements</h3>
Expand Down Expand Up @@ -424,10 +428,12 @@ <h3>Promote the Event</h3>
{% elsif event.registration.open == false %}
<a href="#" class="btn btn-primary btn-lg btn-block">Registration opens soon!</a>
{% else %}
<a href="{{ event.registration.link }}" class="btn btn-primary btn-lg btn-block">Register Now!</a>
{% if event.registration.deadline %}
<p style="margin-top:1em"><b>Deadline:</b> {{event.registration.deadline | date: "%-d %B %Y" }}</p>
{% endif %}
{% if event.registration.link %}
<a href="{{ event.registration.link }}" class="btn btn-primary btn-lg btn-block">Register Now!</a>
{% if event.registration.deadline %}
<p style="margin-top:1em"><b>Deadline:</b> {{event.registration.deadline | date: "%-d %B %Y" }}</p>
{% endif %}
{%endif %}
{% endif %}
{% endif %}
{% endunless %}
Expand All @@ -436,8 +442,10 @@ <h3>Promote the Event</h3>
<b> Event details </b>
<table>
<tr><td style="min-width: 2rem">{% icon event-date %}</td><td>{{ event | collapse_date_pretty }}</td></tr>
<tr><td>{% icon event-location %}</td><td>{% if event.location %}{{ event.location | format_location }}{% else %}Please set a location{% endif %}</td></tr>
<tr><td>{% icon event-location %}</td><td>{% if event.location %}{{ event.location | format_location }}{% elsif event.mode == "online" %}Online{% else %}Please set a location{% endif %}</td></tr>
{% if event.cost %}
<tr><td>{% icon event-cost %}</td><td>{{ event.cost }}</td></tr>
{% endif %}
{% if event.contact_email %}
<tr><td>{% icon email %}</td><td><a href="mailto:{{ event.contact_email }}?subject={{ event.title | uri_escape }}">{{event.contact_email}}</a></td></tr>
{% endif %}
Expand Down
11 changes: 7 additions & 4 deletions _layouts/tutorial_hands_on.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,14 @@ <h3>You've Finished the Tutorial</h3>
<p style="display: none" id="tutorial-finish-text">Please also consider filling out the <a href="#gtn-feedback">Feedback Form</a> as well!</p>
<script>
function tutorial_finish() {
if(plausible !== undefined){
plausible('TutorialComplete', {callback: tutorial_finish_finish, props: {path: document.location.pathname}})
} else {
tutorial_finish_finish();
if(typeof plausible !== 'undefined'){
// Plausible may be undefined (script blocked)
// or it may be defined, but opted-out (select box/DNT),
// which means `plausible()` will work but not send data, *nor* execute the callback.
plausible('TutorialComplete', {props: {path: document.location.pathname}})
}
// since the callback is completely cosmetic, we'll just issue it optimistically.
tutorial_finish_finish();
}
function tutorial_finish_finish() {
document.getElementById("tutorial-finish-button").innerText = 'Congrats! Thanks for letting us know! 🎉'
Expand Down
1 change: 1 addition & 0 deletions _plugins/generator-recordings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def generate(site)
page2.data['topic_name'] = material['topic_name']
page2.data['tutorial_name'] = material['tutorial_name']
page2.data['material'] = material
page2.data['title'] = 'Recordings for ' + material['title']
site.pages << page2
end
end
Expand Down
Loading

0 comments on commit b8bcae3

Please sign in to comment.