Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
paulocilasjr authored Dec 2, 2024
2 parents d84a7b3 + 0362bc0 commit c479089
Show file tree
Hide file tree
Showing 61 changed files with 1,405 additions and 120 deletions.
30 changes: 29 additions & 1 deletion CONTRIBUTORS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ davebx:
name: Dave B.
joined: 2021-06

davelopez:
name: David López
joined: 2021-10

dbrites:
name: Daniela Brites
joined: 2022-03
Expand Down Expand Up @@ -1518,6 +1522,14 @@ marziacremona:
email: [email protected]
joined: 2018-02

matuskalas:
name: Matúš Kalaš
joined: 2024-06

mkuzak:
name: Mateusz Kuzak
joined: 2019-10

mateeullah905:
name: Matee Ullah
email: [email protected]
Expand Down Expand Up @@ -1624,7 +1636,7 @@ miaomiaozhou88:
joined: 2020-12
orcid: 0000-0003-4426-1758

michelemaroni89:
michelemaroni:
name: Michele Maroni
joined: 2019-07

Expand Down Expand Up @@ -1773,6 +1785,10 @@ NickSto:
twitter: NickStoler
joined: 2018-07

njall:
name: Niall Beard
joined: 2019-02

nomadscientist:
name: Wendi Bacon
email: [email protected]
Expand Down Expand Up @@ -1867,6 +1883,10 @@ otatadeabigail:
name: Otatade Abigail
joined: 2021-10

OlegZharkov:
name: Oleg Zharkov
joined: 2021-06

pajanne:
name: Anne Pajon
joined: 2017-09
Expand Down Expand Up @@ -2356,6 +2376,10 @@ sunyi000:
email: [email protected]
joined: 2021-03

Swathi266:
name: Swathi Nataraj
joined: 2024-12

sylviamahara:
name: Sylvia Mahara
github: false
Expand Down Expand Up @@ -2512,6 +2536,10 @@ twishigulati:
github: false
joined: 2021-11

tuncK:
name: Tunc Kayikcioglu
joined: 2023-10

valentinmarcon:
name: Valentin Marcon
joined: 2017-09
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ icon-tag:
trophy: fas fa-trophy
tutorial: fas fa-laptop
twitter: fab fa-twitter
upgrade_workflow: fas fa-recycle
warning: fas fa-exclamation-triangle
wf-input: fas fa-chevron-circle-right
workflow-runtime-toggle: far fa-caret-square-up
Expand Down
6 changes: 6 additions & 0 deletions _includes/contributor-badge.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
{%- else -%}
{%- assign contributor_badge_entity = site | fetch_contributor: include.id -%}
{%- assign name = contributor_badge_entity.short_name | default: contributor_badge_entity.name | default: include.id -%}
{% if include.small %}
<a href="{{ site.baseurl }}/hall-of-fame/{{ include.id }}/" class="contributor-badge contributor-{{ include.id }}">
{{ contributor_badge_entity | fetch_entity_avatar:include.id, 36 }}
</a>
{% else %}
<a href="{{ site.baseurl }}/hall-of-fame/{{ include.id }}/" class="contributor-badge contributor-{{ include.id }}">
{%- if contributor_badge_entity.orcid -%}<img src="{% link assets/images/orcid.png %}" alt="orcid logo" width="36" height="36"/>{%- endif -%}
{{ contributor_badge_entity | fetch_entity_avatar:include.id, 36 }}
Expand All @@ -11,4 +16,5 @@
{%- include _includes/contributor-human-icons.html activity=include.activity -%}
{%- endif -%}
</a>
{% endif %}
{%- endif -%}
2 changes: 2 additions & 0 deletions _includes/contributor-human-icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<abbr title="This person managed and provided infrastructure to the GTN or for training purposes">🖥</abbr>
{% elsif include.activity == "testing" %}
<abbr title="This person tested the tutorial to ensure it works correctly for students, or reported issues with the tutorial.">⚙️</abbr>
{% elsif include.activity == "reviewing" %}
<abbr title="This person reviewed this material for accuracy and correctness">🧐</abbr>
{% elsif include.activity == "ux" %}
<abbr title="This person contributed UX or Design improvements to this tutorial or the GTN as a whole"></abbr>
{% elsif include.activity == "funding" %}
Expand Down
9 changes: 9 additions & 0 deletions _includes/contributor-list2.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@
</tr>
{% endif %}

{% if include.contributors.reviewing %}
<tr class="reviewers">
<td><abbr title="These people reviewed this material for accuracy and correctness">Reviewers</abbr></td>
<td>
{% for id in include.contributors.reviewing %}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id=id small=true %}{% else %}{{ contributors[id].name | default: id }}{% endif %}{%- endfor -%}
</td>
</tr>
{% endif %}

{% if include.contributors.ux %}
<tr>
<td><abbr title="These people contributed UX or Design improvements to this tutorial or the GTN as a whole">UX/Designer(s)</abbr></td>
Expand Down
2 changes: 1 addition & 1 deletion _includes/contributors-line.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div markdown="0">
{% if include.page.contributors %}
<div class="contributors-line">
{% unless include.authorsonly %}{{ locale['authors'] | default: "Authors" }}: {% endunless %}{% include _includes/contributor-list.html contributors=include.page.contributors badge=true newcontributors=include.newcontributors %}
{% include _includes/contributor-list.html contributors=include.page.contributors badge=true newcontributors=include.newcontributors %}
</div>
{% elsif include.page.contributions %}
<div class="contributors-line">
Expand Down
4 changes: 2 additions & 2 deletions _layouts/tutorial_hands_on.html
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ <h1>{{locale['citing-tutorial'] | default: "Citing this Tutorial"}}</h1>
title = "{{ page.title }} (Galaxy Training Materials)",
year = "{{ page.last_modified_at | date: "%Y"}}",
month = "{{ page.last_modified_at | date: "%m"}}",
day = "{{ page.last_modified_at | date: "%d" }}"
day = "{{ page.last_modified_at | date: "%d" }}",
url = "{% raw %}\url{{% endraw %}{{ site.url }}{{ site.baseurl }}{{page.url}}{% raw %}}{% endraw %}",
note = "[Online; accessed TODAY]"
}
Expand All @@ -420,7 +420,7 @@ <h1>{{locale['citing-tutorial'] | default: "Citing this Tutorial"}}</h1>
author = {Saskia Hiltemann and Helena Rasche and Simon Gladman and Hans-Rudolf Hotz and Delphine Larivi{\`{e}}re and Daniel Blankenberg and Pratik D. Jagtap and Thomas Wollmann and Anthony Bretaudeau and Nadia Gou{\'{e}} and Timothy J. Griffin and Coline Royaux and Yvan Le Bras and Subina Mehta and Anna Syme and Frederik Coppens and Bert Droesbeke and Nicola Soranzo and Wendi Bacon and Fotis Psomopoulos and Crist{\'{o}}bal Gallardo-Alba and John Davis and Melanie Christine Föll and Matthias Fahrner and Maria A. Doyle and Beatriz Serrano-Solano and Anne Claire Fouilloux and Peter van Heusden and Wolfgang Maier and Dave Clements and Florian Heyl and Björn Grüning and B{\'{e}}r{\'{e}}nice Batut and},
editor = {Francis Ouellette},
title = {Galaxy Training: A powerful framework for teaching!},
journal = {PLoS Comput Biol} Computational Biology}
journal = {PLoS Comput Biol}
}
</code>
</pre></div></div>
Expand Down
97 changes: 35 additions & 62 deletions _layouts/workflow-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,44 @@

{% assign material = site | fetch_tutorial_material:page.topic_name,page.tutorial_name%}

<section class="tutorial">
<h1 data-toc-skip>Workflows</h1>
<p>These workflows are associated with <a href="../tutorial.html">{{ material.title }}</a></p>
<p>To use these workflows in Galaxy you can either click the links to download the workflows, or you can right-click and copy the link to the workflow which can be used in the Galaxy form to import workflows.</p>


<div class="row">
{% for workflow in material.workflows %}
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">{{ workflow.title }}</h5>
<h6 class="card-subtitle mb-2 text-muted">
{% for entity in workflow.creators %}
{{ entity.name }}{% if forloop.last == false %}, {% endif %}
{% endfor %}
</h6>

<p class="card-text">
<small class="text-muted">Last updated {{ workflow.path | gtn_mod_date | date: "%b %-d, %Y" }}</small>
</p>
<p class="card-text">
<span tabindex="0" role="button" class="workflow show-when-galaxy-proxy-active" data-workflow="{{ workflow.trs_endpoint }}">Launch in Tutorial Mode</span>
<a href="{% link faqs/galaxy/tutorial_mode.md %}" class="hide-when-galaxy-proxy-active">{% icon question %}</a>
<br/>


License:
<section>
<h1 data-toc-skip>Workflows</h1>
<p>These workflows are associated with <a href="../tutorial.html">{{ material.title }}</a></p>

<table class="table table-striped">
<thead>
<tr>
<th>Workflow</th>

<th>Updated</th>
<th>Version</th>
<th>License</th>

<th>Tests</th>
<th>Reports</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
{% for workflow in material.workflows %}
<tr>
<td><a href="{{ workflow.url_html }}">{{ workflow.title }}</a></td>

<td>{{ workflow.path | gtn_mod_date | date: "%b %-d, %Y" }}</td>
<td>{{ workflow.version }}</td>
<td>
{% if workflow.license %}
<a href="https://spdx.org/licenses/{{ workflow.license }}">{{ workflow.license }}</a>
{% else %}
None Specified, defaults to
<a href="https://spdx.org/licenses/CC-BY-4.0">CC-BY-4.0</a>
{% endif %}
<br/>
Tests: {% if workflow.tests %}✅{% else %}❌{% endif %}
Results: {% if workflow.test_results == nil %}Not yet automated{% endif %}
</p>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
Import or Download
</button>
<div class="dropdown-menu">
<a href="{{ site.url }}{{ site.baseurl }}/{{ workflow.path }}" class="dropdown-item">Download Galaxy Workflow.ga</a>
{% assign servers = nil | list_usegalaxy_servers_shuffle %}
{% for server in servers %}
<a href="{{ server.url }}/workflows/trs_import?run_form=true&trs_url={{ workflow.trs_endpoint }}" class="dropdown-item hide-when-galaxy-proxy-active">{{ server.human }}</a>
{% endfor %}
<a href="https://my.galaxy.training/?path=/workflows/trs_import%3Frun_form=true%26trs_url={{ workflow.trs_endpoint }}"
class="dropdown-item hide-when-galaxy-proxy-active">Import to another server (≥23.0+ only!)</a>
</div>
</div>

<pre class="mermaid">{{ workflow.mermaid }}
</pre>
</div><!-- card-body -->
</div><!-- card -->
</div><!-- col -->
{% endfor %}

</div>

<h1 style="margin-top:2em">Importing into Galaxy</h1>
Below are the instructions for importing these workflows directly into your Galaxy server of choice to start using them!

{% snippet faqs/galaxy/workflows_import.md box_type="hands_on" %}

</td>

<td>{% if workflow.tests %} ✅ {% else %} ❌ {% endif %}</td>
<td>{% if workflow.features.report %} ✅ {% else %} ❌ {% endif %}</td>
<td>{% if workflow.features.comments %} ✅ {% else %} ❌ {% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
2 changes: 1 addition & 1 deletion _layouts/workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h1 data-toc-skip>{{ workflow.title }}</h1>
{% endif %}

{% if workflow.workflowhub_id %}
<a style="margin-bottom: 0.2rem" href="https://workflowhub.eu/workflows/{{ workflow.workflowhub_id }}" class="btn btn-secondary"><img src="{% link assets/images/workflowhub-icon.svg %}" style="height: 32px" alt="Workflowhub cloud with gears logo"/> View on WorkflowHub</a>
<a style="margin-bottom: 0.2rem" href="https://dev.workflowhub.eu/workflows/{{ workflow.workflowhub_id }}" class="btn btn-secondary"><img src="{% link assets/images/workflowhub-icon.svg %}" style="height: 32px" alt="Workflowhub cloud with gears logo"/> View on (Dev) WorkflowHub</a>
{% endif %}

</div>
Expand Down
68 changes: 68 additions & 0 deletions _plugins/author-page.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

require './_plugins/gtn/mod'
require './_plugins/gtn'

module Jekyll
Expand Down Expand Up @@ -168,3 +169,70 @@ def generate(site)
end
end
end

Jekyll::Hooks.register :site, :post_read do |site|
if Jekyll.env == 'production'
Jekyll.logger.info "[GTN/Reviewers] Ingesting GitHub reviewer metadata"
start_time = Time.now
# Maps a lowercase version of their name to the potential mixed-case version
contribs_lower = site.data['contributors'].map{|k, v| [k.downcase, k]}.to_h

# Annotate the from github metadata
gh_reviewers_by_path = Hash.new { |hash, key| hash[key] = [] }
# Hash of PRs by path
site.data['github'].each do |num, pr|
# Within a PR we have some reviews, let's get that set organised:
reviewers = pr['reviews'].map do |review|
# Just "people"
contribs_lower.fetch(review['author']['login'].downcase, review['author']['login'])
end.uniq.reject{|x| x == 'github-actions'}

pr['files'].select{|p| p['path'] =~ /.(md|html)$/}.each do |file|
real_path = Gtn::PublicationTimes.chase_rename(file['path'])
gh_reviewers_by_path[real_path] += reviewers
gh_reviewers_by_path[real_path].uniq!
end
end

# For all of our pages, if the path is mentioned above, then, tag it.
site.pages.select{|t| gh_reviewers_by_path.key?(t.path)}.each do |t|
if t['layout'] == 'tutorial_hands_on' or !%w[base_slides introduction_slides tutorial_slides].index(t['layout']).nil?
if t.data.key?('contributors')
# Automatically 'upgrade' to new structure
t.data['contributions'] = {
'authorship' => t.data['contributors'],
'reviewing' => gh_reviewers_by_path[t.path]
}
t.data.delete('contributors')
elsif t.data.key?('contributions')
if t.data['contributions'].key?('reviewing')
t.data['contributions']['reviewing'] += gh_reviewers_by_path[t.path]
else
t.data['contributions']['reviewing'] = gh_reviewers_by_path[t.path]
end
t.data['contributions']['reviewing'].uniq!
end
end
end

site.posts.docs.select{|t| gh_reviewers_by_path.key?(t.path)}.each do |t|
if t['layout'] == 'news'
if t.data.key?('contributors')
t.data['contributions'] = {
'authorship' => t.data['contributors'],
'reviewing' => gh_reviewers_by_path[t.path]
}
t.data.delete('contributors')
elsif t.data.key?('contributions')
if t.data['contributions'].key?('reviewing')
t.data['contributions']['reviewing'] += gh_reviewers_by_path[t.path]
else
t.data['contributions']['reviewing'] = gh_reviewers_by_path[t.path]
end
t.data['contributions']['reviewing'].uniq!
end
end
end
Jekyll.logger.info "[GTN/Reviewers] Complete in #{Time.now - start_time} seconds"
end
end
7 changes: 6 additions & 1 deletion _plugins/gtn/contributors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
module Gtn
# Parse the git repo to get some facts
module Contributors
@HAS_WARNED_ON = []

##
# Returns contributors, regardless of whether they are 'contributor' or 'contributions' style
# Params:
Expand Down Expand Up @@ -150,7 +152,10 @@ def self.fetch(site, c, warn: false)
return ['grant', site.data['grants'][c]]
else
if ! warn
Jekyll.logger.warn "Contributor #{c} not found"
if ! @HAS_WARNED_ON.include?(c)
Jekyll.logger.warn "Contributor #{c} not found"
@HAS_WARNED_ON.push(c)
end
end
end

Expand Down
Loading

0 comments on commit c479089

Please sign in to comment.