Skip to content

Commit

Permalink
Merge branch 'galaxyproject:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
paulocilasjr authored Sep 27, 2024
2 parents d033608 + d14fd5e commit 180f483
Show file tree
Hide file tree
Showing 46 changed files with 584 additions and 341 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
- name: Check Tutorial Formatting
run: |
find topics/ -name tutorial.md | xargs -n 1 python bin/check-broken-boxes.py | reviewdog -efm="%f:%l: %m" -filter-mode=file -reporter=github-pr-review
bundle exec ruby bin/lint.rb --format rdjson | reviewdog -filter-mode=file -reporter=github-pr-review -f=rdjsonl -fail-on-error
find topics/ -name tutorial.md | xargs -n 1 python bin/check-broken-boxes.py | reviewdog -efm="%f:%l: %m" -filter-mode=file -reporter=github-pr-review -fail-level=any
bundle exec ruby bin/lint.rb --format rdjson | reviewdog -filter-mode=file -reporter=github-pr-review -f=rdjsonl -fail-level=any
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ GEM
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
webrick (1.8.2)
yell (2.2.2)
zeitwerk (2.6.12)

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ icon-tag:
galaxy-toggle: fas fa-toggle-on
galaxy-upload: fas fa-upload
galaxy-download: fas fa-download
galaxy-wf-best-practices: fas fa-wand-magic-sparkles
galaxy-wf-connection: fas fa-arrows-alt-h
galaxy-wf-edit: fa fa-edit
galaxy-wf-new: fas fa-plus
Expand Down
9 changes: 8 additions & 1 deletion _layouts/event-track.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@

<section class="event-track">
<h1>{{track.title}}</h1>
<p>{{track.description}}</p>
<p>{{track.description | markdownify }}</p>
{% if page.contributions %}
{% include _includes/contributor-list2.html contributors=page.contributions badge=true %}
{% endif %}

{% if track.slack_channel %}
<div>
<h4> Need help with these tutorials?</h4>
Open Slack support channel for this track: <a href="https://gtnsmrgsbord.slack.com/channels/{{track.slack_channel}}" class="btn btn-success"> {% icon comment %} &nbsp; #{{track.slack_channel}}</a>
</div>
{% endif %}

<div>
{% for section in track.program %}
{% if section.subsection %}
Expand Down
17 changes: 9 additions & 8 deletions _layouts/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,15 @@ <h3>Promote the Event</h3>

// on load of the page: switch to the currently selected tab
var hash = window.location.hash;

var potential_tab = $('#myTab button[data-target="' + hash + '"]')
if (potential_tab.length != 0) {
potential_tab.tab('show');
} else {
var target_tab = '#' + $(`${hash}`).closest(".tab-pane").attr("id")
$('#myTab button[data-target="' + target_tab + '"]').tab('show');
$(hash).get(0).scrollIntoView();
if (hash){
var potential_tab = $('#myTab button[data-target="' + hash + '"]')
if (potential_tab.length != 0) {
potential_tab.tab('show');
} else {
var target_tab = '#' + $(`${hash}`).closest(".tab-pane").attr("id")
$('#myTab button[data-target="' + target_tab + '"]').tab('show');
$(hash).get(0).scrollIntoView();
}
}
});
})(window, document);
Expand Down
84 changes: 68 additions & 16 deletions _plugins/jekyll-jsonld.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'json'
require './_plugins/gtn'
require './_plugins/gtn/git'
require './_plugins/util'

module Jekyll
# Generate JSON-LD metadata for the GTN.
Expand Down Expand Up @@ -794,12 +795,35 @@ def generate_material_jsonld(material, topic, site)

data['isPartOf'] = topic_desc

data['abstract'] = material
.fetch('content', '')
.strip
.split("\n")
.first

if ! data['abstract'].nil?
data['abstract'] = data['abstract']
.gsub(/\{\{\s*site.baseurl\s*\}\}/, url_prefix(site))
.gsub(/\[{{\s*site.url\s*}}/, '[' + url_prefix(site))
.gsub(/{% link (topics[^%]*).md %}/, url_prefix(site) + '\1.html')
.gsub(/{% link (topics[^%]*).html %}/, url_prefix(site) + '\1.html')
.gsub(/\s*\(?{%\s*cite [^}]+\s*%}\)?/, '')
.gsub('{{ site.github_repository }}', safe_site_config(site, 'github_repository', 'https://example.com'))
.gsub(/{% snippet ([^%]*) %}/, '')
.gsub(/{% include ([^%]*) %}/, '')
end

description.push("## Abstract\n\n#{data['abstract']}\n\n")

if (material['name'] == 'tutorial.md') || (material['name'] == 'slides.html')
data['learningResourceType'] = if material['name'] == 'tutorial.md'
'hands-on tutorial'
else
'slides'
end

if material['name'] == 'tutorial.md'
data['learningResourceType'] = 'e-learning'
description.push("## About This Material\n\nThis is a Hands-on Tutorial from the GTN which is usable either for individual self-study, or as a teaching material in a classroom.\n\n")
else
data['learningResourceType'] = 'slides'
end

data['name'] = material['title']
data['url'] = "#{site['url']}#{site['baseurl']}#{material['url']}"

Expand All @@ -817,8 +841,8 @@ def generate_material_jsonld(material, topic, site)
description.push("## Questions this #{material['type']} will address\n\n - #{questions}\n\n")
end
if material.key?('objectives') && !material['objectives'].nil? && material['objectives'].length.positive?
objectives = material['objectives'].join("\n - ")
description.push("## Learning Objectives\n\n - #{objectives}\n\n")
objectives = material['objectives'].map{|x| "- #{x}"}.join("\n")
description.push("## Learning Objectives\n\n#{objectives}\n\n")
data['teaches'] = objectives
end
if material.key?('keypoints') && !material['keypoints'].nil? && material['keypoints'].length.positive?
Expand All @@ -844,12 +868,41 @@ def generate_material_jsonld(material, topic, site)
name: "Associated Workflows"
})
end
if actual_material.key?('zenodo_link')
mentions.push({
'@type': 'Thing',
url: (actual_material['zenodo_link']).to_s,
name: "Associated Training Datasets"
})

# Notebooks
if actual_material.key?('notebook')
if actual_material['notebook']['language'] != 'r'
# Python, Bash, SQL (all via jupyter)
url = "#{site['url']}#{site['baseurl']}#{material['dir']}#{material['topic_name']}-#{material['tutorial_name']}.ipynb"
mentions.push({
'@type': 'Thing',
url: url,
name: "Jupyter Notebook (with Solutions)"
})
mentions.push({
'@type': 'Thing',
url: url.gsub(/\.ipynb$/, '-course.ipynb'),
name: "Jupyter Notebook (without Solutions)"
})
elsif actual_material['notebook']['language'] == 'r' # Actual R
url = "#{site['url']}#{site['baseurl']}#{material['dir']}#{material['topic_name']}-#{material['tutorial_name']}.Rmd"
mentions.push({
'@type': 'Thing',
url: url,
name: "Quarto/RMarkdown Notebook"
})
end
end

# Zenodo link out
if actual_material.key?('zenodo_link') && ! actual_material['zenodo_link'].nil?
if actual_material['zenodo_link'].length.positive?
mentions.push({
'@type': 'Thing',
url: (actual_material['zenodo_link']).to_s,
name: "Associated Training Datasets"
})
end
end

if description.empty?
Expand Down Expand Up @@ -905,7 +958,7 @@ def generate_material_jsonld(material, topic, site)
'@context': 'http://schema.org',
'@type': 'LearningResource',
url: (page['hands_on_url']).to_s,
learningResourceType: 'hands-on tutorial',
learningResourceType: 'e-learning',
interactivityType: 'expositive',
}
)
Expand All @@ -921,7 +974,7 @@ def generate_material_jsonld(material, topic, site)
"/#{tuto}/tutorial.html",
name: (page['title']).to_s,
description: "Hands-on for '#{page['title']}' tutorial",
learningResourceType: 'hands-on tutorial',
learningResourceType: 'e-learning',
interactivityType: 'expositive',
provider: GTN
}
Expand Down Expand Up @@ -991,7 +1044,6 @@ def generate_material_jsonld(material, topic, site)

data['educationalLevel'] = material.key?('level') ? eduLevel[material['level']] : 'Beginner'
data['mentions'] = mentions
data['abstract'] = material.fetch('content', '').strip.split("\n").first

data
end
Expand Down
23 changes: 23 additions & 0 deletions _plugins/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,26 @@ def collapse_event_date_pretty(event)
"#{s.strftime('%B')} #{s.day}, #{s.year}#{dash}#{e.strftime('%B')} #{e.day}, #{e.year}"
end
end

def safe_site_config(site, key, default)
if !site.config.nil? && site.config.key?(key)
site.config[key]
else
default
end
end


def url_prefix(site)
if !site.config.nil? && site.config.key?('url')
"#{site.config['url']}#{site.config['baseurl']}"
else
'http://localhost:4000/training-material/'
end
end

def markdownify(site, text)
site.find_converter_instance(
Jekyll::Converters::Markdown
).convert(text.to_s)
end
12 changes: 7 additions & 5 deletions bin/lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,12 @@ def self.bib_missing_mandatory_fields(bib)

def self.fix_ga_wf(contents)
results = []
if !contents.key?('tags')
topic = @path.split('/')[1]
if !contents.key?('tags') or contents['tags'].empty?
path_parts = @path.split('/')
topic = path_parts[path_parts.index('topics') + 1]

results.push(ReviewDogEmitter.file_error(
path: @path, message: "This workflow is missing tags. Please add `\"tags\": [\"#{topic}\"]`",
path: @path, message: "This workflow is missing required tags. Please add `\"tags\": [\"#{topic}\"]`",
code: 'GTN:015'
))
end
Expand Down Expand Up @@ -988,7 +990,7 @@ def self.enable_auto_fix
def self.format_reviewdog_output(message)
return if !@LIMIT_EMITTED_CODES.nil? && !@LIMIT_EMITTED_CODES.include?(message['code']['value'])

if !message.nil? && (message != [])
if !message.nil? && (message != []) && message.is_a?(Hash)
if @PLAIN_OUTPUT # $stdout.tty? or
parts = [
message['location']['path'],
Expand Down Expand Up @@ -1051,7 +1053,7 @@ def self.filter_results(results, ignores)
# Remove any empty lists
results = results.select { |x| !x.nil? && x.length.positive? }.flatten
# Before ignoring anything matching GTN:IGNORE:###
return results if ignores.nil?
return results if ignores.nil? or ignores.empty?

results = results.select { |x| ignores.index(x['code']['value']).nil? } if results.length.positive?
return results
Expand Down
10 changes: 5 additions & 5 deletions bin/news.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ def send_news(output, options, channel: 'default')
end
end

output, newsworthy = build_news(data)
if newsworthy
channel = options[:useTestRoom] ? 'test' : 'default'
send_news(output, options, channel: channel)
end
#output, newsworthy = build_news(data)
#if newsworthy
# channel = options[:useTestRoom] ? 'test' : 'default'
# send_news(output, options, channel: channel)
#end

# Single Cell
output, newsworthy = build_news(data, filter: 'single-cell', updates: false)
Expand Down
6 changes: 4 additions & 2 deletions events/galaxy-academy-2024.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: event

title: Galaxy Academy 2024
title: Galaxy Training Academy 2024
description: |
The Galaxy Academy is a online training event for Beginners as well as learners who would like to improve their Galaxy data analysis skills. Over the course of one week, we will have a different topic and focus every day.
Expand Down Expand Up @@ -107,7 +107,8 @@ infrastructure:
program:
- section: "Monday: Galaxy introduction"
description: |
Kick off the week with a hands-on introduction to Galaxy, covering everything from basic navigation and data manipulation to reproducing published analyses, quality control, and mapping sequences to a reference genome. Whether you're new to Galaxy or looking to strengthen your skills, today's sessions will equip you with the foundational knowledge needed for more advanced topics.
Kick off the week with a hands-on introduction to Galaxy, covering everything from basic navigation and data manipulation to reproducing published analyses, quality control, and mapping sequences to a reference genome. Whether you're new to Galaxy or looking to strengthen your skills, today's sessions will equip you with the foundational knowledge needed for more advanced topics.
In the morning you can take part in the Icebreaker by joining us in the [Slack introduction channel](https://gtnsmrgsbord.slack.com/archives/C07NKAJ8THA). Or you can directly start with the tutorials. If you need support contact us via the [Slack introduction channel](https://gtnsmrgsbord.slack.com/archives/C07NKAJ8THA).
- section: Start to get to know Galaxy
subsection: true
tutorials:
Expand Down Expand Up @@ -160,6 +161,7 @@ program:
- section: "Friday: Grab bag"
description: |
Can't get enough? Then please pick one of our FAIR tutorials or any of the tutorials of the GTN. Please be aware that only trainings that are part of the introduction day or a learning track have been tested on all instances for the event. The trainers present on Slack will do their best to help you if you have a problem and answer questions, but they may not be expert in the topic you selected.
You can directly start with you prefered tutorial. If you need support contact us via the Slack Channel [#gta_friday-grab-bag](https://gtnsmrgsbord.slack.com/archives/C07N2A4HQ15).
- section: Fair training
subsection: true
tutorials:
Expand Down
14 changes: 8 additions & 6 deletions events/tracks/gta2024-assembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
layout: event-track

title: Assembly
description: Learn all about Genome assembly.
description: Learn all about Genome assembly. Start with the tutorial at your own pace. If you need support contact us via the Slack Channel [gta_assembly](https://gtnsmrgsbord.slack.com/archives/C07NGNT0DB5).

slack_channel: gta_assembly

contributions:
organisers:
- delphine-l
instructors:
- delphine-l
- SaimMomin12
- annasyme
- bgruening
- clsiguret
- mschatz
- delphine-l
- GarethPrice-Aus
- annasyme
- trungN
- igormakunin
- mschatz
- SaimMomin12
- trungN


program:
Expand Down
10 changes: 8 additions & 2 deletions events/tracks/gta2024-bacterial-genomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ redirect_from:
- /events/tracks/gta2024-bacterial-genomeics

title: Bacterial genomics and AMR detection
description: This track explains the basic steps to (1) process, assemble, annotate a bacterial genome and (2) detect Antimicrobial resistance (AMR) genes in bacterial genomes using Galaxy.
description: This track explains the basic steps to (1) process, assemble, annotate a bacterial genome and (2) detect Antimicrobial resistance (AMR) genes in bacterial genomes using Galaxy. Start with the tutorial at your own pace. If you need support contact us via the Slack Channel [#gta_bacterial_genomics](https://gtnsmrgsbord.slack.com/archives/C07NE0FHM6H).

slack_channel: gta_bacterial_genomics

contributions:
organisers:
- bebatut
- clsiguret
instructors:
- annasyme
- bebatut
- clsiguret
- SaimMomin12
- EngyNasr
- GarethPrice-Aus
- igormakunin
- meltemktn
- paulzierep
- SaimMomin12



program:
Expand Down
Loading

0 comments on commit 180f483

Please sign in to comment.