Description
Problem Statement
If a user needs metadata and/or summary metrics for a large number of runs, the default response from a GET to /api/runs
will contain a huge amount of completely unnecessary data. This is inefficient and slow.
Solution
The client method get_runs
should have an attributes option where you can specify what to include in the output:
- Required metadata attributes,
- Required summary metrics attributes.
This needs to be passed to the attributes
query parameter for a GET to /api/runs
. This needs to be a list, e.g.
["metadata.droplet_diameter", "metrics.HRR.last"]
It might be best for there to be two options to get_runs
, one for metadata and one for metrics, then the client can construct the single list with metadata
and metrics
prepended as needed.
Note that the parallel coordinates plots in the web UI makes use of this functionality.
Alternatives Considered
The alternative solution is to use the Python requests
module and avoid the Simvue Python API completely.
Additional Context
Ideally all of this would be handled via a GraphQL API (and it would be simpler), but until we have that the above is being used.