ganga icon indicating copy to clipboard operation
ganga copied to clipboard

Job outputfiles cannot be extended

Open mesmith75 opened this issue 1 year ago • 3 comments

It seems that one cannot add files to an existing list of outputfiles, only define a completely new list. This does not seem right to me:

Ganga In [6]: type(jobs(997).outputfiles)
Ganga Out [6]: GangaCore.GPIDev.Base.Proxy.GangaList

[21:02:04]
Ganga In [7]: jobs(997).outputfiles = []

[21:02:10]
Ganga In [8]: jobs(997).outputfiles
Ganga Out [8]: []

[21:02:12]
Ganga In [9]: jobs(997).outputfiles.append(LocalFile('model.root'))

[21:02:17]
Ganga In [10]: jobs(997).outputfiles
Ganga Out [10]: []

mesmith75 avatar Aug 16 '23 20:08 mesmith75

This works fine for inputfiles - so somewhere we are treating outputfiles as special. It could be around here: https://github.com/ganga-devs/ganga/blob/da620e6914e59de3dd76adcb0c53ea03a7411ffc/ganga/GangaCore/GPIDev/Lib/Job/Job.py#L583C1-L583C1 If I change that to return self.outputfiles then the new files are appended as expected. However I assume there is a reason this extra complication is there?

mesmith75 avatar Aug 16 '23 22:08 mesmith75

To fix this will require to change the way that the GangaList object works. It should instead be inside the GangaList object that the expansion of the wildcards. But the GangaList is used for things that are not files, so how should this be solved?

egede avatar Aug 21 '23 08:08 egede

This will require a bit more research into what current behaviour is, and how we want to change it.

egede avatar Aug 21 '23 08:08 egede