Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job outputfiles cannot be extended #2190

Open
mesmith75 opened this issue Aug 16, 2023 · 3 comments
Open

Job outputfiles cannot be extended #2190

mesmith75 opened this issue Aug 16, 2023 · 3 comments

Comments

@mesmith75
Copy link
Contributor

mesmith75 commented Aug 16, 2023

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 mesmith75 changed the title GangaList not working Job outputfiles cannot be extended Aug 16, 2023
@mesmith75
Copy link
Contributor Author

mesmith75 commented Aug 16, 2023

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?

@egede
Copy link
Member

egede commented Aug 21, 2023

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
Copy link
Member

egede commented Aug 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants