Skip to content

Commit

Permalink
1.5.52
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaeno committed May 24, 2023
1 parent 713bb90 commit b5de482
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 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.53
* regex in outputs of prun

1.5.52
* added pyproject.toml
* introduced panda-client-light
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.52"
release_version = "1.5.53"
38 changes: 23 additions & 15 deletions pandaclient/PrunScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,30 +1491,38 @@ def _onExit(dir, files, del_command):
if options.outputs != '':
outMap = {}
dsSuffix = []
dsIndex = 0
for tmpLFN in options.outputs.split(','):
tmpDsSuffix = ''
if ':' in tmpLFN:
tmpDsSuffix,tmpLFN = tmpLFN.split(':')
tmpDsSuffix, tmpLFN = tmpLFN.split(':')
if tmpDsSuffix in dsSuffix:
tmpErrMsg = "dataset name suffix '%s' is used for multiple files in --outputs. " % tmpDsSuffix
tmpErrMsg = "dataset name suffix '%s' is used for multiple files in --outputs. " % tmpDsSuffix
tmpErrMsg += 'each output must have a unique suffix.'
tmpLog.error(tmpErrMsg)
sys.exit(EC_Config)
dsSuffix.append(tmpDsSuffix)
tmpNewLFN = tmpLFN
# change * to XYZ and add .tgz
if '*' in tmpNewLFN:
tmpNewLFN = tmpNewLFN.replace('*','XYZ')
tmpNewLFN += '.tgz'
if len(outDatasetName.split('.')) > 2:
lfn = '{0}.{1}'.format(*outDatasetName.split('.')[:2])
if tmpLFN.startswith('regex|'):
# regex
lfn = tmpLFN
if not tmpDsSuffix:
tmpDsSuffix = dsIndex
dsIndex += 1
else:
lfn = outDatasetName[:-1]
if options.addNthFieldOfInDSToLFN != '' or options.addNthFieldOfInFileToLFN != '':
lfn += '${MIDDLENAME}'
lfn += '.$JEDITASKID._${{SN/P}}.{0}'.format(tmpNewLFN)
if tmpDsSuffix == '':
tmpDsSuffix = tmpNewLFN
tmpNewLFN = tmpLFN
# change * to XYZ and add .tgz
if '*' in tmpNewLFN:
tmpNewLFN = tmpNewLFN.replace('*','XYZ')
tmpNewLFN += '.tgz'
if len(outDatasetName.split('.')) > 2:
lfn = '{0}.{1}'.format(*outDatasetName.split('.')[:2])
else:
lfn = outDatasetName[:-1]
if options.addNthFieldOfInDSToLFN != '' or options.addNthFieldOfInFileToLFN != '':
lfn += '${MIDDLENAME}'
lfn += '.$JEDITASKID._${{SN/P}}.{0}'.format(tmpNewLFN)
if tmpDsSuffix == '':
tmpDsSuffix = tmpNewLFN
dataset = '{0}_{1}/'.format(outDatasetName[:-1],tmpDsSuffix)
taskParamMap['jobParameters'] += MiscUtils.makeJediJobParam(lfn,dataset,'output',hidden=True,
destination=options.destSE,
Expand Down

0 comments on commit b5de482

Please sign in to comment.