ArchiveTeam / seesaw-kit

Making a reusable toolkit for writing seesaw scripts
Other
69 stars 30 forks source link

Support environment variables as input method for pipeline arguments #135

Open Tristan971 opened 1 year ago

Tristan971 commented 1 year ago

Title. Can't find another issue about it, so maybe it wasn't asked before? (seems unlikely but idk)

Especially when dealing with docker images it's significantly easier to work with environment variables than command arguments, due to how ENTRYPOINT + CMD + arguments work together being somewhat inconsistent from runtime to runtime.

Seems like argparse (which is the method used here afaik) doesn't natively handle environment variables for some reason; I do quite like this approach as a way to do it, although there are a few other methods.

I'd happily make a PR, but I figured I'd just suggest it first in case it's been asked and rejected before (but not on Github so I couldn't find it with a search). Worst case scenario if it's unwanted, the next person to think about this sees this issue and can directly know so.