rwth-i6 / sisyphus

A Workflow Manager in Python
Mozilla Public License 2.0
45 stars 25 forks source link

Job, possibility to update env vars #180

Closed albertz closed 9 months ago

albertz commented 9 months ago

As it was discussed in #178.

Fix #178

critias commented 9 months ago

It bothers me to introduce a new structure which changes the environment. How about always creating the EnvironmentModifier, but only clean the environment if gs.CLEANUP_ENVIRONMENT is True and set_env would just pass the envs to EnvironmentModifier.set.

That way you should be able to accomplish the same thing without updating the environment in two different places.

albertz commented 9 months ago

I really don't want the string.Template.substitute logic though, so in any case, I need another flag to enable or disable that, maybe per key, or globally. I think per key might be better, because I don't want to break any existing setups, or introduce the situation that you cannot mix it, thus have it incompatible with some setups where you both need this for some env vars, and where you don't want this for other env vars.

critias commented 9 months ago

Let's move the discussion to https://github.com/rwth-i6/sisyphus/issues/178 to avoid two parallel discussions about the same thing.