Files
galaxy/test/functional/tools/markdown_report_simple_script.py
John ChiltonandClaude Opus 5 b56eb15a25 Fix 500 on the dataset tool-markdown report endpoint
ready_galaxy_markdown_for_export returns three values; report() unpacked
two, so GET /api/datasets/{id}/report raised before building a response.
Return the embed-expanded markdown, as pages.py does for display content.

The report fixture gained an embedded directive so the API test can tell
the expanded variant from the plain one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 11:40:36 -04:00

49 lines
912 B
Python

DOCUMENT = """
# Dynamically Generated Report
Here is a peek of the exciting stuff we did:
```galaxy
history_dataset_peek(output=output_text)
```
The tool produced the following image image:
```galaxy
history_dataset_as_image(output=output_image)
```
We produced a table that looks like this:
```galaxy
history_dataset_as_table(output=output_table, header="Table Header", footer="A description of the table", compact=true)
```
The same table as embedded and using the full dataset display:
(embed)
```galaxy
history_dataset_embedded(output=output_table)
```
(display)
```galaxy
history_dataset_display(output=output_table)
```
The standard output for this tool execution is:
```galaxy
tool_stdout()
```
This is my document and I have populated the title from a parameter.
Generated by Galaxy ${galaxy generate_galaxy_version()}.
"""
with open("output_report.md", "w") as f:
f.write(DOCUMENT)