Skip to content

Commit

Permalink
Merge pull request #4273 from galaxyproject/editorial-board
Browse files Browse the repository at this point in the history
Rename maintainers as editorial board
  • Loading branch information
shiltemann authored Jul 19, 2023
2 parents 83794dd + 8ca81ec commit 6c8602b
Show file tree
Hide file tree
Showing 51 changed files with 125 additions and 67 deletions.
15 changes: 15 additions & 0 deletions _layouts/contributor_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@ <h3> GitHub Activity</h4>
{% endunless %}
{% endunless %}
</p>
{% if page.editor_count > 0 %}
<h3>Editorial Roles</h3>
<p>This contributor has taken on additional responsibilities as an editor for the following topics. They are responsible for ensuring that the content is up to date, accurate, and follows GTN best practices.</p>
<ul>
{% for res in page.editors %}
<li>
{% if res.layout == 'learning-pathway' %}
<a href="{{ site.baseurl }}{{ res.url }}">{{ res.title }}</a>
{% else %}
<a href="{{ site.baseurl }}/topics/{{ res.name }}">{{ res.title }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}

{% if page.tutorials_count > 0 %}
<h3>Tutorials</h3>
Expand Down
8 changes: 4 additions & 4 deletions _layouts/learning-pathway.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ <h3 id="st-{{ section.section | slugify }}">{{ section.section }}</h3>
<hr style="margin-top: 6em"/>
<section>
<!-- Maintained by -->
<h2 id="maintainers">Maintained by</h2>
<p>This material is maintained by:</p>
{% assign maintainers = pathway.maintainers | sorted %}
{% include _includes/contributor-list.html contributors=maintainers badge=true %}
<h2 id="editorial-board">Editorial Board</h2>
<p>This material is reviewed by our Editorial Board:</p>
{% assign editorial_board = pathway.maintainers %}
{% include _includes/contributor-list.html contributors=editorial_board badge=true %}

<h2 id="funders">Funders</h2>
<p>This material was funded by:</p>
Expand Down
8 changes: 4 additions & 4 deletions _layouts/topic.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ <h2 id="topic-faq">Frequently Asked Questions</h2>
Common questions regarding this topic have been collected on a <a href="faqs/">dedicated FAQ page </a>. Common questions related to specific tutorials can be accessed from the tutorials themselves.
{% endunless %}

<h2 id="maintainers">Maintainers</h2>
<p>This material is maintained by:</p>
{% assign maintainers = topic.maintainers | sorted %}
{% include _includes/contributor-list.html contributors=maintainers badge=true %}
<h2 id="editorial-board">Editorial Board</h2>
<p>This material is reviewed by our Editorial Board:</p>
{% assign editorial_board = topic.editorial_board | sorted %}
{% include _includes/contributor-list.html contributors=editorial_board badge=true %}

<p>
<em>For any question related to this topic and the content, you can contact them or visit our <a href="https://gitter.im/Galaxy-Training-Network/Lobby">Gitter channel</a>.</em>
Expand Down
6 changes: 3 additions & 3 deletions _plugins/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def generate(site)

q
end
out['maintainers'] = out['maintainers'].map { |c| mapContributor(site, c) }
out['editorial_board'] = out['editorial_board'].map { |c| mapContributor(site, c) }

page2 = PageWithoutAFile.new(site, '', 'api/topics/', "#{topic}.json")
page2.content = JSON.pretty_generate(out)
Expand All @@ -233,14 +233,14 @@ def generate(site)
puts '[GTN/API] Topics'
# Individual Topic Indexes
site.data.each_pair do |k, v|
if v.is_a?(Hash) && v.key?('type') && v.key?('maintainers')
if v.is_a?(Hash) && v.key?('type') && v.key?('editorial_board')

topics[k] = {
'name' => v['name'],
'title' => v['title'],
'summary' => v['summary'],
'url' => site.config['url'] + site.config['baseurl'] + "/api/topics/#{k}.json",
'maintainers' => v['maintainers'].map { |c| mapContributor(site, c) }
'editorial_board' => v['editorial_board'].map { |c| mapContributor(site, c) }
}
end
end
Expand Down
9 changes: 9 additions & 0 deletions _plugins/author-page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ def generate(site)
page2.data['news_count'] = news_by_author[contributor].length
page2.data['learning_pathways_count'] = learning_pathways_by_author[contributor].length

page2.data['editors'] = TopicFilter.enumerate_topics(site).select do |t|
t.fetch('editorial_board', []).include?(contributor)
end
# Also their learning pathways
page2.data['editors'] += site.pages.select do |t|
t['layout'] == 'learning-pathway' && t.data.fetch('editorial_board', []).include?(contributor)
end
page2.data['editor_count'] = page2.data['editors'].length

page2.data['has_philosophy'] = has_philosophy[contributor]

site.pages << page2
Expand Down
2 changes: 1 addition & 1 deletion _plugins/jekyll-duration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def duration_to_human(duration)
hour = 'hour'
hours = 'hours'
minutes = 'minutes'
if @context.registers[:page]&.key?('lang') and @context.registers[:page]['lang'] != 'en'
if @context.registers[:page]&.key?('lang') && (@context.registers[:page]['lang'] != 'en')
lang = @context.registers[:page]['lang']
hour = @context.registers[:site].data['lang'][lang]['hour']
hours = @context.registers[:site].data['lang'][lang]['hours']
Expand Down
12 changes: 11 additions & 1 deletion _plugins/jekyll-topic-filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ module TopicFilter
# Returns:
# +Array+:: The list of topics
def self.list_topics(site)
site.data.select { |_k, v| v.is_a?(Hash) && v.key?('maintainers') }.map { |k, _v| k }
site.data.select { |_k, v| v.is_a?(Hash) && v.key?('editorial_board') }.map { |k, _v| k }
end

##
# This function returns a list of all the topics that are available.
# Params:
# +site+:: The +Jekyll::Site+ object
# Returns:
# +Array+:: The topic objects themselves
def self.enumerate_topics(site)
site.data.select { |_k, v| v.is_a?(Hash) && v.key?('editorial_board') }.map { |_k, v| v }
end

##
Expand Down
25 changes: 13 additions & 12 deletions bin/lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def self.message(path: '', idx: 0, match_start: 0, match_end: 1, replacement: ni
# Linting functions for the GTN
module GtnLinter
@BAD_TOOL_LINK = /{% tool (\[[^\]]*\])\(https?.*tool_id=([^)]*)\)\s*%}/i
@BAD_TOOL_LINK2 = /{% tool (\[[^\]]*\])\(https:\/\/toolshed.g2([^)]*)\)\s*%}/i
@BAD_TOOL_LINK2 = %r{{% tool (\[[^\]]*\])\(https://toolshed.g2([^)]*)\)\s*%}}i

def self.find_matching_texts(contents, query)
contents.map.with_index do |text, idx|
Expand Down Expand Up @@ -350,18 +350,19 @@ def self.non_existent_snippet(contents)
end

def self.bad_tool_links(contents)
find_matching_texts(contents, @BAD_TOOL_LINK) + find_matching_texts(contents, @BAD_TOOL_LINK2)
find_matching_texts(contents, @BAD_TOOL_LINK) + \
find_matching_texts(contents, @BAD_TOOL_LINK2)
.map do |idx, _text, selected|
ReviewDogEmitter.error(
path: @path,
idx: idx,
match_start: selected.begin(0),
match_end: selected.end(0) + 1,
replacement: "{% tool #{selected[1]}(#{selected[2]}) %}",
message: 'You have used the full tool URL to a specific server, here we only need the tool ID portion.',
code: 'GTN:009'
)
end
ReviewDogEmitter.error(
path: @path,
idx: idx,
match_start: selected.begin(0),
match_end: selected.end(0) + 1,
replacement: "{% tool #{selected[1]}(#{selected[2]}) %}",
message: 'You have used the full tool URL to a specific server, here we only need the tool ID portion.',
code: 'GTN:009'
)
end
end

def self.snippets_too_close_together(contents)
Expand Down
17 changes: 17 additions & 0 deletions bin/schema-learning-pathway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ mapping:
type: int
description: priority within learning path list

editorial_board:
type: seq
required: true
sequence:
- type: str
required: true
description: A contributor's ID in the CONTRIBUTORS.yaml file.
#enum:
#- CONTRIBUTORS

funding:
type: seq
description: These entities provided funding support for the development of this resource
sequence:
- type: str
#enum:
#- CONTRIBUTORS
tags:
type: seq
sequence:
Expand Down
2 changes: 1 addition & 1 deletion bin/schema-topic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ mapping:
description: |
`false` to hide your topic from the production GTN. This is useful if you need a topic for a workshop, but have not finished making it up to GTN standards.
maintainers:
editorial_board:
type: seq
required: true
sequence:
Expand Down
2 changes: 1 addition & 1 deletion bin/validate-frontmatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def self.run
.grep_v(/schema-*/)
.select do |x|
d = YAML.load_file(x)
d.key? 'maintainers' or d.key? 'summary' or d.key? 'type'
d.key? 'editorial_board' or d.key? 'summary' or d.key? 'type'
end

errors += materials.map { |x| [x, lint_topic(x)] }
Expand Down
4 changes: 4 additions & 0 deletions learning-pathways/admin-training.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ description: |
cover-image: assets/images/gat.png
cover-image-alt: GTN Logo on a spiral galaxy background with text galaxy admin training
editorial_board:
- hexylena
- natefoo
- slugger70

tags: [Galaxy administrators, 5-day course]

Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/genome-annotation-eukaryote.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags: [genome annotation, eukaryote]

cover-image: assets/images/gga.png
cover-image-alt: "Galaxy Genome Annotation logo"
maintainers:
editorial_board:
- abretaud
funding:
- erasmusplus
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/genome-annotation-prokaryote.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags: [genome annotation, prokaryote]

cover-image: assets/images/gga.png
cover-image-alt: "Galaxy Genome Annotation logo"
maintainers:
editorial_board:
- abretaud
funding:
- erasmusplus
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/intro-to-galaxy-and-ecology.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags: [beginner]
cover-image: assets/images/galaxy-e-logo.png
cover-image-alt: "Drawing of an Ecological System"

maintainers:
editorial_board:
- yvanlebras
funding:
- erasmusplus
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/intro-to-galaxy-and-genomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: learning-pathway
tags: [beginner]
type: use

maintainers:
editorial_board:
- shiltemann
funding:
- erasmusplus
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/intro-to-r-and-ml.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: learning-pathway
tags: [beginner]
type: use

maintainers:
editorial_board:
- fpsom
funding:
- erasmusplus
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/metagenomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: use
cover-image: assets/images/microgalaxy-logo.png
cover-image-alt: "microgalaxy logo"

maintainers:
editorial_board:
- bebatut
funding:
- erasmusplus
Expand Down
2 changes: 2 additions & 0 deletions learning-pathways/pathway-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: |
type: use # 'use' for science topics, or admin-dev or instructors
tags: [some, keywords, here ]
editorial_board:
- shiltemann

cover-image: assets/images/gat.png # optional, define your own cover image for the pathway index page, default is the GTN logo
cover-image-alt: alt text for this image
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/train-the-trainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |
This pathway introduces trainers to learning principles, training techniques, lesson, session, course, and material design as well as assessment and feedback. This is has been developed for by trainers in the bioinformatics but is suitable for all trainers and educators in higher education.
tags: [training, trainers]

maintainers:
editorial_board:
- bebatut
- fpsom
funding:
Expand Down
2 changes: 1 addition & 1 deletion metadata/covid19.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "SARS-CoV-2"
summary: "Tutorials covering analysis of SARS-CoV-2 (COVID 19)"
tag_based: true

maintainers:
editorial_board:
- wm75

gitter: galaxyproject/sars-cov-2
2 changes: 1 addition & 1 deletion metadata/one-health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ summary: |
tag_based: true

maintainers:
editorial_board:
- wm75
- pvanheus
- TKlingstrom
Expand Down
4 changes: 2 additions & 2 deletions metadata/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ components:
summary:
type: string
description: A human readable description of the topic's contents.
maintainers:
editorial_board:
$ref: '#/components/schemas/ArrayOfUsers'
TopicDetail:
type: object
Expand Down Expand Up @@ -383,7 +383,7 @@ components:
description:
type: string
description: A helpful subtopic description.
maintainers:
editorial_board:
$ref: '#/components/schemas/ArrayOfUsers'
materials:
type: array
Expand Down
2 changes: 1 addition & 1 deletion topics/admin/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ subtopics:
title: "Deprecated Tutorials"
description: "Please do not run these. They are outdated and for historical, archival purposes only."

maintainers:
editorial_board:
- hexylena
- natefoo
- slugger70
Expand Down
2 changes: 1 addition & 1 deletion topics/ai4life/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ summary: |
logo: /training-material/topics/ai4life/images/AI4Life-logo_neg_giraffe-solid.png
logo_alt: "Giraffe icon. AI 4 life"

maintainers:
editorial_board:
- beatrizserrano
edam_ontology: ["topic_3382"]

Expand Down
2 changes: 1 addition & 1 deletion topics/assembly/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ requirements:
tutorials:
- quality-control

maintainers:
editorial_board:
- slugger70
- nekrut
- delphine-l
Expand Down
2 changes: 1 addition & 1 deletion topics/climate/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ requirements:
- type: internal
topic_name: introduction
docker_image: ''
maintainers:
editorial_board:
- annefou
2 changes: 1 addition & 1 deletion topics/computational-chemistry/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requirements:
type: "internal"
topic_name: introduction

maintainers:
editorial_board:
- chrisbarnettster
- tsenapathi
- simonbray
Expand Down
2 changes: 1 addition & 1 deletion topics/contributing/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ subtopics:
title: "Contributing through GitHub"
description: "How to collaborate with the GTN"

maintainers:
editorial_board:
- bebatut
- bgruening
4 changes: 2 additions & 2 deletions topics/contributing/tutorials/create-new-topic/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ For tag based topics, first ensure that all of the relevant tutorials share a si

## Defining the topic

Compare with other topic level metadata files in the `metadata/` directory of the training material. Then create a file of your own naming the topic and providing maintainers and so on. We will use the Covid-19 synthetic topic as an example:
Compare with other topic level metadata files in the `metadata/` directory of the training material. Then create a file of your own naming the topic and providing editorial board members and so on. We will use the Covid-19 synthetic topic as an example:

```
---
Expand All @@ -216,7 +216,7 @@ title: "SARS-CoV-2"
summary: "Tutorials covering analysis of SARS-CoV-2 (COVID 19)"
tag_based: true
maintainers:
editorial_board:
- wm75
gitter: galaxyproject/sars-cov-2
Expand Down
Loading

0 comments on commit 6c8602b

Please sign in to comment.