Skip to content

deprecate useless 'skip_lower' named argument in template_constant_dict, always define *lower templates#2856

Merged
akesandgren merged 2 commits intoeasybuilders:developfrom
boegel:templates_skip_lower_drop_useless
May 6, 2019
Merged

deprecate useless 'skip_lower' named argument in template_constant_dict, always define *lower templates#2856
akesandgren merged 2 commits intoeasybuilders:developfrom
boegel:templates_skip_lower_drop_useless

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented May 3, 2019

For some reason unclear to me the template values are generated in two passes: once without %(namelower)s, and then again with %(namelower)s (where the set of template values is mostly the same, except for %(namelower)s and %(nameletterlower)s).

This was introduced a long time ago as a part of a big refactor in #526, but I don't see a reason (anymore) for this.

Besides the double work being done without good reason, having the skip_lower named argument that is enabled by default in the template_constant_dict function is confusing, it leads to bugs where template_constant_dict is called without skip_lower=False which results in the %(namelower)s template not getting resolved (cfr. #2852 (comment))

ocaisa
ocaisa previously approved these changes May 3, 2019
@boegel boegel changed the title deprecate useless 'skip_lower' named argument in template_constant_di… deprecate useless 'skip_lower' named argument in template_constant_dict, always define *lower templates May 4, 2019
@boegel boegel requested a review from akesandgren May 6, 2019 08:13
Comment thread easybuild/framework/easyconfig/templates.py Outdated
Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akesandgren
Copy link
Copy Markdown
Contributor

Going in, thanks @boegel!

@akesandgren akesandgren merged commit bc34c9b into easybuilders:develop May 6, 2019
@boegel boegel deleted the templates_skip_lower_drop_useless branch May 6, 2019 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants