aekiss / run_summary

Summarise ACCESS-OM2 runs
Apache License 2.0
1 stars 1 forks source link

PBS log parsing is returning keys with equal signs #31

Open aidanheerdegen opened 1 year ago

aidanheerdegen commented 1 year ago

The full yaml dumps the PBS parsing returns payu environment variables from the command string that have = signs in the keys

e.g python run_summary.py -d --no_stats /home/157/amh157/payu/01deg_jra55v13_ryf9091 has this:

    PAYU_CURRENT_RUN=: 732
    PAYU_MODULENAME=: null
    PAYU_MODULEPATH=: null
    PAYU_N_RUNS=: null
    PAYU_PATH=: /g/data3/hh5/public/apps/miniconda3/envs/analysis3-21.07/bin

The relevant code seems to be

https://github.com/aekiss/run_summary/blob/master/run_summary.py#L154-L161

One solution would be to specify the key without the = sign and either use regex with an optional = or strip leading = from the strings returned from splitting on the key.