Janus can receive post requests that contain a CollectQCRequest
(see janus/dto/collect_qc_request.py
).
Using the information within the request Janus fetches and parses files. Janus uses FileTag
to identify the model in which the data should be parsed, but more importantly the parsing function required to achieve that. Janus then constructs a final model that will contain all the parsed information and send back a CollectQCResponse
.
To add new parsing functionality to Janus:
- Check if the file tag is represented in
constants/FileTag.py
. - Check if the parsing functions can parse the metrics file. See in fixtures for currently available structures.
- Add a model to the
models/<metrics>
that will hold the parsed data. - Add or update a model in
modles/workflow
. - If a new workflow was added create a function
collect_{workflow}_metrics
in theCollectQCService
. See existing functions for guidance. - If a new workflow was added update the
get_case_info_for_workflow
with the workflow parsing function. - Add/Update tests to ensure the parsing can be successful.