Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xrefs with bio.tools to XMLs #54

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
ebolyen marked this conversation as resolved.
Show resolved Hide resolved
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
8 changes: 4 additions & 4 deletions q2galaxy/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

class OrderedTool(collections.OrderedDict):
order = ["description", "macros", "edam_topics", "edam_operations",
"parallelism", "requirements", "code", "stdio", "version_command",
"command", "environment_variables", "configfiles", "inputs",
"request_param_translation", "outputs", "tests", "help",
"citations"]
"parallelism", "xrefs", "requirements", "code", "stdio",
"version_command", "command", "environment_variables",
"configfiles", "inputs", "request_param_translation",
"outputs", "tests", "help", "citations"]
order_attr = ['name', 'argument', 'type', 'format', 'min', 'truevalue',
'max', 'falsevalue', 'value', 'checked', 'optional', 'label',
'help']
Expand Down
Loading