Skip to content

Commit

Permalink
added support for D2AODs in pathena
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaeno committed Feb 29, 2024
1 parent 1b4e4cd commit 36cdaf5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion pandaclient/PandaToolsPkgInfo.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release_version = "1.5.73"
release_version = "1.5.74"
17 changes: 9 additions & 8 deletions pandaclient/PathenaScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -1993,25 +1993,26 @@ 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(","):
reductionItem = reductionItem.strip()
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
Expand All @@ -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)
Expand Down

0 comments on commit 36cdaf5

Please sign in to comment.