From 36cdaf529ead1ec7fd1d43489e2e10228687b094 Mon Sep 17 00:00:00 2001 From: tmaeno Date: Thu, 29 Feb 2024 18:37:49 +0100 Subject: [PATCH] added support for D2AODs in pathena --- ChangeLog.txt | 3 +++ pandaclient/PandaToolsPkgInfo.py | 2 +- pandaclient/PathenaScript.py | 17 +++++++++-------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 419a749..896322d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,8 @@ ** Release Notes +1.5.74 + * added support for D2AODs in pathena + 1.5.73 * fixed module of JobSpec and FileSpec * to allow main in --useAthenaTag diff --git a/pandaclient/PandaToolsPkgInfo.py b/pandaclient/PandaToolsPkgInfo.py index fb73b2c..cb41935 100644 --- a/pandaclient/PandaToolsPkgInfo.py +++ b/pandaclient/PandaToolsPkgInfo.py @@ -1 +1 @@ -release_version = "1.5.73" +release_version = "1.5.74" diff --git a/pandaclient/PathenaScript.py b/pandaclient/PathenaScript.py index 1676988..d6e3970 100644 --- a/pandaclient/PathenaScript.py +++ b/pandaclient/PathenaScript.py @@ -1993,17 +1993,18 @@ def _onExit(dir, files, del_command): oneOut = False # replace ; for job sequence tmpString = re.sub(";", " ", jobO) - # look for --outputDAODFile and --reductionConf - match = re.search("--outputDAODFile[ =\"']+([^ \"',]+)", tmpString) - outputDAODFile = None + # look for --outputDAODFile/--outputD2AODFile and --reductionConf/formats + match = re.search(r"(--outputDAODFile|--outputD2AODFile)[ =\"']+([^ \"',]+)", tmpString) + dxaod_output_filename = None if match is not None: - outputDAODFile = match.group(1) + dxaod_output_format = match.group(1)[8:][:-4] + dxaod_output_filename = match.group(2) # remove %OUT - outputDAODFile = re.sub(r"%OUT\.", "", outputDAODFile) + dxaod_output_filename = re.sub(r"%OUT\.", "", dxaod_output_filename) match = re.search(r"(--reductionConf|--formats)[ =\"\']+([^ \"\']+)", tmpString) if match is not None: # remove %OUT from outputDAODFile - jobO = jobO.replace("%OUT." + outputDAODFile, outputDAODFile) + jobO = jobO.replace("%OUT." + dxaod_output_filename, dxaod_output_filename) # loop over all configs reductionConf = match.group(2) for reductionItem in reductionConf.split(","): @@ -2011,7 +2012,7 @@ def _onExit(dir, files, del_command): if reductionItem == "": continue # make actual output names for derivation - tmpOutName = "DAOD_{0}.{1}".format(reductionItem, outputDAODFile) + tmpOutName = "{0}_{1}.{2}".format(dxaod_output_format, reductionItem, dxaod_output_filename) if tmpOutName not in options.extOutFile: options.extOutFile.append(tmpOutName) oneOut = True @@ -2022,7 +2023,7 @@ def _onExit(dir, files, del_command): # append basenames to extOutFile tmpOutName = match.group(1) # skip basename of derivation - if outputDAODFile is not None and outputDAODFile == tmpOutName: + if dxaod_output_filename is not None and dxaod_output_filename == tmpOutName: continue if tmpOutName not in options.extOutFile: options.extOutFile.append(tmpOutName)