LOl my pleasure - I guess we should have a link in the doc string of add_requirements
to set_packages
, I will tell the guys
Geez, I have been looking for this for a while, thanks for saving my day...again.
Hi @<1569858449813016576:profile|JumpyRaven4>
task.add_requirements()
This is the problem, if you look closely this is a class method, meant for helping the Task.init better capture python packages, it does Not change the task requirements.
To do that, use " task.set_packages
"
Yeah we should definitely have get_requirements 🙂
was allow_archived
removed from Task.query_tasks?
I think it is only in get_task
(and by default it is true)
I think query task does not filter the
"erasing" all the packages that had been set in the base task I'm cloning from. I
Set is not add, if you are calling set_packages, you are overwriting all of them with this single call.
You can however do:
task_data = task.export_task()
requirements = task_data["script"]["requirements"]["pip"]
requirements += "new packages"
task.set_packages(requirements)
I guess we should have get_requirements
?!
I'm assuming that task.data.script.requirements is not the right way to do this...
tx that's what I was doing more or less 😆
This being said, now I'm running into another issue that this seems to be "erasing" all the packages that had been set in the base task I'm cloning from. I can't find a method that would return these packages so that I could add to it?