Skip to content

Commit b9cd3a1

Browse files
committed
Expand structured output contracts
1 parent a0d765f commit b9cd3a1

29 files changed

Lines changed: 551 additions & 28 deletions

HISTORY.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ History
99
0.75.42.dev0
1010
---------------------
1111

12+
* Add structured CLI metadata and output schema exports, validate Planemo JSON
13+
outputs, and write full merged test reports.
1214

1315
---------------------
1416
0.75.41 (2026-03-19)

docs/_running_external.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,20 @@ You can specify a different location with the ``--output_directory`` option:
313313

314314
$ planemo invocation_download INVOCATION_ID --profile tutorial_profile --output_directory ./my_outputs
315315

316-
The command also supports ``--output_json`` to write a JSON file containing
317-
metadata about the downloaded outputs.
316+
The command also supports ``--output_json`` to write a JSON manifest containing
317+
metadata about the downloaded outputs:
318+
319+
::
320+
321+
$ planemo invocation_download INVOCATION_ID --profile tutorial_profile --output_directory ./my_outputs --output_json ./my_outputs/manifest.json
322+
323+
The manifest includes the invocation ID, output directory, downloaded outputs,
324+
and outputs that were not downloaded. Optional workflow outputs that are absent
325+
are reported as ``skipped``; required outputs that are absent while missing
326+
outputs are ignored are reported as ``missing``. Paths in the manifest are
327+
relative to ``--output_directory`` by default. Use
328+
``--output_json_path_type absolute`` when absolute paths are more useful for
329+
automation.
318330

319331

320332
Exporting invocations as archives

docs/_writing_test_reports.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@ in certain `continuous integration`_ environments. See ``planemo test --help`` f
55
more options, as well as the ``test_reports`` `command
66
<http://planemo.readthedocs.io/en/latest/commands.html#test-reports-command>`__.
77

8+
The machine-readable JSON report written by ``--test_output_json`` uses the
9+
Planemo test report shape: a top-level ``version``, ``tests``, optional
10+
``summary``, and optional ``exit_code``. ``test_reports`` validates this JSON
11+
before rendering derived reports. ``merge_test_reports`` also validates each
12+
input report and writes the same full report shape, including recalculated
13+
``summary`` and ``exit_code`` fields. Older reports without ``summary`` are
14+
still accepted and summarized during rendering.
15+
816
.. _continuous integration: https://en.wikipedia.org/wiki/Continuous_integration

docs/commands.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ documentation describes these commands.
1111
.. include:: commands/ci_find_repos.rst
1212
.. include:: commands/ci_find_tools.rst
1313
.. include:: commands/ci_setup.rst
14+
.. include:: commands/cli_metadata.rst
1415
.. include:: commands/clone.rst
1516
.. include:: commands/conda_build.rst
1617
.. include:: commands/conda_env.rst
@@ -41,6 +42,7 @@ documentation describes these commands.
4142
.. include:: commands/mulled_init.rst
4243
.. include:: commands/normalize.rst
4344
.. include:: commands/open.rst
45+
.. include:: commands/output_schema.rst
4446
.. include:: commands/profile_create.rst
4547
.. include:: commands/profile_delete.rst
4648
.. include:: commands/profile_job_config_init.rst

docs/commands/cli_metadata.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
``cli_metadata`` command
3+
========================================
4+
5+
This section is auto-generated from the help text for the planemo command
6+
``cli_metadata``. This help message can be generated with ``planemo cli_metadata
7+
--help``.
8+
9+
**Usage**::
10+
11+
planemo cli_metadata [OPTIONS]
12+
13+
**Help**
14+
15+
Export structured metadata for Planemo CLI commands.
16+
**Options**::
17+
18+
19+
--format [json] [default: json]
20+
--command TEXT Only export metadata for the selected command.
21+
--include-internal Include internal commands not documented as public API.
22+
--help Show this message and exit.
23+

docs/commands/invocation_download.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ through Galaxy's web interface or through planemo.
2828
Where to store outputs of a 'run' task.
2929
--output_json FILE Where to store JSON dictionary describing
3030
outputs of a 'run' task.
31+
--output_json_path_type [relative|absolute]
32+
Path style to use in the output JSON manifest.
33+
[default: relative]
3134
--profile TEXT Name of profile (created with the
3235
profile_create command) to use with this
3336
command.
3437
--galaxy_url TEXT Remote Galaxy URL to use with external Galaxy
3538
engine.
3639
--galaxy_user_key TEXT User key to use with external Galaxy engine.
37-
--ignore_missing_output Ignore missing output files
40+
--ignore_missing_output / --no_ignore_missing_output
41+
Ignore missing output files
3842
--help Show this message and exit.
3943

docs/commands/output_schema.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
``output_schema`` command
3+
========================================
4+
5+
This section is auto-generated from the help text for the planemo command
6+
``output_schema``. This help message can be generated with ``planemo output_schema
7+
--help``.
8+
9+
**Usage**::
10+
11+
planemo output_schema [OPTIONS]
12+
13+
**Help**
14+
15+
Export JSON Schemas for Planemo machine-readable outputs.
16+
**Options**::
17+
18+
19+
--format [json] [default: json]
20+
--schema [invocation-download-manifest|run-outputs|test-report]
21+
Only export one schema.
22+
--help Show this message and exit.
23+

docs/commands/test.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ please careful and do not try this against production Galaxy instances.
4848
produced with the same set of tool ids
4949
previously.
5050
--test_index INTEGER Index(es) of specific test(s) to run
51-
(0-based). Can be specified multiple times
52-
(e.g., --test_index 0 --test_index 2) to run
51+
(1-based). Can be specified multiple times
52+
(e.g., --test_index 1 --test_index 3) to run
5353
specific tests. If not specified, all tests
5454
are run.
5555
--polling_backoff INTEGER Poll resources with an increasing interval

docs/planemo.commands.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ planemo.commands.cmd\_ci\_setup module
3636
:show-inheritance:
3737
:undoc-members:
3838

39+
planemo.commands.cmd\_cli\_metadata module
40+
------------------------------------------
41+
42+
.. automodule:: planemo.commands.cmd_cli_metadata
43+
:members:
44+
:show-inheritance:
45+
:undoc-members:
46+
3947
planemo.commands.cmd\_clone module
4048
----------------------------------
4149

@@ -284,6 +292,14 @@ planemo.commands.cmd\_open module
284292
:show-inheritance:
285293
:undoc-members:
286294

295+
planemo.commands.cmd\_output\_schema module
296+
-------------------------------------------
297+
298+
.. automodule:: planemo.commands.cmd_output_schema
299+
:members:
300+
:show-inheritance:
301+
:undoc-members:
302+
287303
planemo.commands.cmd\_profile\_create module
288304
--------------------------------------------
289305

docs/planemo.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ planemo.cli module
4848
:show-inheritance:
4949
:undoc-members:
5050

51+
planemo.cli\_metadata module
52+
----------------------------
53+
54+
.. automodule:: planemo.cli_metadata
55+
:members:
56+
:show-inheritance:
57+
:undoc-members:
58+
5159
planemo.conda module
5260
--------------------
5361

@@ -160,6 +168,22 @@ planemo.options module
160168
:show-inheritance:
161169
:undoc-members:
162170

171+
planemo.output\_models module
172+
-----------------------------
173+
174+
.. automodule:: planemo.output_models
175+
:members:
176+
:show-inheritance:
177+
:undoc-members:
178+
179+
planemo.output\_schemas module
180+
------------------------------
181+
182+
.. automodule:: planemo.output_schemas
183+
:members:
184+
:show-inheritance:
185+
:undoc-members:
186+
163187
planemo.runnable module
164188
-----------------------
165189

0 commit comments

Comments
 (0)