qatrackplus / qcpump

QCPump is an extensible utility for extracting data from various sources (databases, filesystem etc) and moving it to other locations. The primary use of QCPump is currently for extracting data from SNC Daily QA3 databases (Firebird & Atlas) and uploading it to QATrack+ via QATrack+'s API.
MIT License
6 stars 3 forks source link

MPC - KVSCheckTemplate causing pump crash #13

Open livingag opened 9 months ago

livingag commented 9 months ago

There is an MPC test that must be service only called KVSCheckTemplate that causes the MPC pump to crash due to it breaking the regex. Moving these folders somewhere else while pumping fixes the problem, but is obviously not an ideal solution for the future.

I wasn't sure how you would want to handle this in the code so haven't done a pull request, but would just modifying the regex work? Adding ? flag to the energy and beam type at least gets to regex to work:

MPC_PATH_RE = re.compile(r"""
     .*                     # preamble like NDS-WKS
     -SN(?P<serial_no>\w+)  # serial number
     -(?P<date>\d\d\d\d\-\d\d\-\d\d\-\d\d\-\d\d\-\d\d)    # YYYY-MM-DD-HH-MM-SS
     -(?P<beam_num>\d\d\d\d)
     -(?P<template>[a-zA-Z]+)       # template e.g. BeamCheckTemplate
     (?P<energy>[\d\.]+)?        # energy like 6, 9, 12, 2.5
     (?P<beam_type>[xXeE]+)?  # beam type like x, e
     (?P<fff>[fF]+)?        # is FFF or not?
     (?P<hdtse>[HDTSE]+)?      # Whether an HDTSE beam
     (?P<mvkv>[MVkV]+)?
     (?P<enhanced>.*)?      # Whether enhanced test or not e.g. MVkVEnhancedCouch
 """, re.X)
livingag commented 9 months ago

NDS-WKS-SN9999-2023-09-28-17-08-16-0004-KVSCheckTemplate

is an example folder name

randlet commented 9 months ago

Thank you for reporting! I will check this out and release a new version soon.

ash-cullen commented 4 months ago

I've also encountered this. It's only an issue on TrueBeam v3.0+, and the service engineer needs a HASP key to add the check, so probably no point having the import of the check supported by QCPump, but as mentioned, it does break the import.