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

add parameters.json to base cabs, add env section to parameters.json #598

Open
o-smirnov opened this issue May 6, 2020 · 0 comments
Open
Assignees

Comments

@o-smirnov
Copy link
Collaborator

o-smirnov commented May 6, 2020

Stuff like this: https://github.com/ratt-ru/Stimela/blob/respect-the-environment/stimela/recipe.py#L276

...is better expressed as an abstract "what environment variables does this cab need?" specification. I suggest adding an optional "env" dict to parameters.json. If present, the recipe code will set these variables in the environment of the cab (using the existing add_environ() functionality).

Furthermore, since this sort of thing (as is the "junk" setting, as are the output wranglers) tends to be the same for e.g. all CASA-based cabs, it would be cleaner, and less effort, to set it up at cargo/base level rather than cargo/cab level.

What you need then is a "parent" parameters.json dict at the base level. The child would inherit the parent's parameters.json dict, and override/augment it with its own. The recipe code then needs to read the dict from the parent first, then do an update() on it with the dict of the child.

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