Mercurial > repos > shellac > sam_consensus_v3
view env/lib/python3.9/site-packages/planemo/commands/cmd_test_reports.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
line wrap: on
line source
"""Module describing the planemo ``test_reports`` command.""" import datetime import pathlib import click from planemo import io from planemo import options from planemo.cli import command_function from planemo.galaxy.test import handle_reports, StructuredData @click.command('test_reports') @options.tool_test_json() @options.test_report_options() @command_function def cli(ctx, path, **kwds): """Generate human readable tool test reports. Creates reports in various formats (HTML, text, markdown) from the structured test output (tool_test_output.json). """ fname = pathlib.Path(path) if not fname.exists(): io.error("Failed to tool test json file at %s" % path) return 1 test_data = StructuredData(path) test_data.calculate_summary_data_if_needed() file_modication_datatime = datetime.datetime.fromtimestamp(fname.stat().st_mtime) kwds["file_modication_datatime"] = file_modication_datatime handle_reports(ctx, test_data.structured_data, kwds)