ganga
ganga copied to clipboard
Job outputfiles cannot be extended
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]: []
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?
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?
This will require a bit more research into what current behaviour is, and how we want to change it.