Skip to content

Commit

Permalink
aesthetic improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Jun 23, 2024
1 parent e969800 commit d2b8ff7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions _plugins/jekyll-topic-filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -473,22 +473,25 @@ def self.graph_dot(wf)
# 8[shape=box,label="Busco"]
# 5 -> 8 [label="out_fa"]

statements = []
statements = [
'node [fontname="Atkinson Hyperlegible", shape=box, color=white,style=filled,color=peachpuff,margin="0.2,0.2"];',
'edge [fontname="Atkinson Hyperlegible"];',
]
wf['steps'].each_key do |id|
step = wf['steps'][id]
chosen_label = mermaid_safe_label(step['label'] || step['name'])

case step['type']
when 'data_collection_input'
statements.append "#{id}[shape=box,style=filled,color=lightblue,label=\"ℹ️ Input Collection\\n#{chosen_label}\"]"
statements.append "#{id}[color=lightblue,label=\"ℹ️ Input Collection\\n#{chosen_label}\"]"
when 'data_input'
statements.append "#{id}[shape=box,style=filled,color=lightblue,label=\"ℹ️ Input Dataset\\n#{chosen_label}\"]"
statements.append "#{id}[color=lightblue,label=\"ℹ️ Input Dataset\\n#{chosen_label}\"]"
when 'parameter_input'
statements.append "#{id}[shape=box,style=filled,color=lightgreen,label=\"ℹ️ Input Parameter\\n#{chosen_label}\"]"
statements.append "#{id}[color=lightgreen,label=\"ℹ️ Input Parameter\\n#{chosen_label}\"]"
when 'subworkflow'
statements.append "#{id}[shape=box,style=filled,color=lightcoral,label=\"🛠️ Subworkflow\\n#{chosen_label}\"]"
statements.append "#{id}[color=lightcoral,label=\"🛠️ Subworkflow\\n#{chosen_label}\"]"
else
statements.append "#{id}[shape=box,label=\"#{chosen_label}\"]"
statements.append "#{id}[label=\"#{chosen_label}\"]"
end

step = wf['steps'][id]
Expand All @@ -510,11 +513,14 @@ def self.graph_dot(wf)
wo
end
.each do |wo|
statements.append "k#{wo['uuid'].gsub('-', '')}[style=filled,color=lightseagreen,label=\"Output\\n#{wo['label']}\"]"
statements.append "#{id} -> k#{wo['uuid'].gsub('-', '')}"
end
statements.append "k#{wo['uuid'].gsub('-', '')}[color=lightseagreen,label=\"Output\\n#{wo['label']}\"]"
statements.append "#{id} -> k#{wo['uuid'].gsub('-', '')}"
statements.append "k#{wo['uuid'].gsub('-', '')} -> logo"
end
end

statements.append 'logo[image="assets/branding/gtn-workflows.png", label="", color="white"];'

"digraph main {\n" + statements.map { |q| " #{q}" }.join("\n") + "\n}"
end

Expand Down
Binary file modified assets/branding/gtn-heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/branding/gtn-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/branding/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/gtn-workflows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d2b8ff7

Please sign in to comment.