crim-ca / weaver

Weaver: Workflow Execution Management Service (EMS); Application, Deployment and Execution Service (ADES); OGC API - Processes; WPS; CWL Application Package
https://pavics-weaver.readthedocs.io
Apache License 2.0
23 stars 6 forks source link

Provide rendering utilities to `OperationResult` #629

Open fmigneault opened 1 month ago

fmigneault commented 1 month ago

Description

When an OperationResult is obtained from weaver.cli.WeaverClient, the __str__ representation simply returns Operationresult, which is not intuitive for users. One must do print(repr(result)) to obtain the better representation implemented by __repr__.

The __str__ should probably do something similar to what __repr__ does, but could also potentially add more details, such as the returned JSON/XML/HTML/text body if applicable. Currently, a text-form representation of that body is defined in text property.