Skip to content

Commit

Permalink
Add xrefs with bio.tools to XMLs
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed May 17, 2024
1 parent a124fa1 commit d18d401
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion q2galaxy/core/templaters/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from q2galaxy.core.util import XMLNode, galaxy_ui_var, rst_header
from q2galaxy.core.templaters.common import (
make_tool_id, make_tool_name, make_config, make_citations,
make_requirements)
make_requirements, make_xrefs)
from q2galaxy.core.templaters.helpers import signature_to_galaxy


Expand Down Expand Up @@ -76,6 +76,7 @@ def make_tool(conda_meta, plugin, action, test_dir):
tool.append(make_help(plugin, action, test_dir))
tool.append(make_citations(plugin, action))
tool.append(make_requirements(conda_meta, plugin.project_name))
tool.append(make_xrefs())
return tool


Expand Down
7 changes: 7 additions & 0 deletions q2galaxy/core/templaters/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,10 @@ def make_formats_help(formats):
help_ += f' - {format_.__name__}\n'

return help_


def make_xrefs():
xefs = XMLNode('xefs')
xefs.append(
XMLNode('xref', 'qiime2', type='bio.tools'))
return xefs
3 changes: 2 additions & 1 deletion q2galaxy/core/templaters/export_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from q2galaxy.core.util import XMLNode, galaxy_esc, pretty_fmt_name, rst_header
from q2galaxy.core.templaters.common import (
make_builtin_version, make_requirements, make_tool_name_from_id,
make_config, make_citations, make_formats_help)
make_config, make_citations, make_formats_help, make_xrefs)


def make_builtin_export(meta, tool_id):
Expand Down Expand Up @@ -170,6 +170,7 @@ def make_builtin_export(meta, tool_id):
tool.append(make_citations())
tool.append(make_requirements(meta, *[p.project_name for p in plugins]))
tool.append(_make_help(known_formats))
tool.append(make_xrefs())

return tool

Expand Down
4 changes: 3 additions & 1 deletion q2galaxy/core/templaters/import_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
make_tool_name_from_id,
make_requirements,
make_citations,
make_formats_help)
make_formats_help,
make_xrefs)


def make_builtin_import(meta, tool_id):
Expand Down Expand Up @@ -110,6 +111,7 @@ def make_builtin_import(meta, tool_id):
tool.append(make_citations())
tool.append(make_requirements(meta, *[p.project_name for p in plugins]))
tool.append(_make_help(known_formats))
tool.append(make_xrefs())
return tool


Expand Down
4 changes: 3 additions & 1 deletion q2galaxy/core/templaters/import_fastq_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from q2galaxy.core.templaters.common import (make_builtin_version,
make_tool_name_from_id,
make_requirements,
make_citations)
make_citations,
make_xrefs)


def make_builtin_import_fastq(meta, tool_id):
Expand All @@ -33,6 +34,7 @@ def make_builtin_import_fastq(meta, tool_id):
tool.append(_make_config())
tool.append(make_citations())
tool.append(make_requirements(meta, *[p.project_name for p in plugins]))
tool.append(make_xrefs())
return tool


Expand Down
2 changes: 1 addition & 1 deletion q2galaxy/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class OrderedTool(collections.OrderedDict):
order = ["description", "macros", "edam_topics", "edam_operations",
"parallelism", "requirements", "code", "stdio", "version_command",
"parallelism", "xrefs", "requirements", "code", "stdio", "version_command",
"command", "environment_variables", "configfiles", "inputs",
"request_param_translation", "outputs", "tests", "help",
"citations"]
Expand Down

0 comments on commit d18d401

Please sign in to comment.