Skip to content

add 'parse' hook to add support for tweaking 'raw' easyconfig (REVIEW)#2562

Merged
vanzod merged 9 commits intoeasybuilders:developfrom
boegel:parse_hook
Sep 5, 2018
Merged

add 'parse' hook to add support for tweaking 'raw' easyconfig (REVIEW)#2562
vanzod merged 9 commits intoeasybuilders:developfrom
boegel:parse_hook

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Sep 4, 2018

Comment thread easybuild/tools/hooks.py Outdated
except ImportError as err:
raise EasyBuildError("Failed to import hooks implementation from %s: %s", hooks_path, err)
else:
raise EasyBuildError("Provided path for hooks implementation should be location of a Python file (*.py)")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (121 > 120 characters)

Comment thread easybuild/tools/hooks.py Outdated
except ImportError as err:
raise EasyBuildError("Failed to import hooks implementation from %s: %s", hooks_path, err)
else:
raise EasyBuildError("Provided path for hooks implementation should be location of a Python file (*.py)")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (121 > 120 characters)

Comment thread easybuild/framework/easyconfig/easyconfig.py
@boegel boegel changed the title add 'parse' hook to add support for tweaking 'raw' easyconfig (WIP) add 'parse' hook to add support for tweaking 'raw' easyconfig (REVIEW) Sep 5, 2018
@boegel boegel modified the milestones: next release, 3.7.0 Sep 5, 2018
@easybuilders easybuilders deleted a comment from boegelbot Sep 5, 2018
Comment thread easybuild/framework/easyconfig/easyconfig.py Outdated
akesandgren
akesandgren previously approved these changes Sep 5, 2018
@easybuilders easybuilders deleted a comment from boegelbot Sep 5, 2018
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 5, 2018

@akesandgren Good to go?

@akesandgren
Copy link
Copy Markdown
Contributor

Yeah i think so, can't find any problems with it.

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, have tested with our hook for OpenMPI.

@akesandgren
Copy link
Copy Markdown
Contributor

@vanzod Any thoughts on this?

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 5, 2018

@ocaisa To answer the issue you raised during today's conf call: any changes made to the EasyConfig object in parse_hook are (currently) not included in the dumped easyconfig file in the installation directory or the easyconfigs archive (i.e. --repositorypath).

So, unless you make sure you have the hooks active every time, picking up a dumped easyconfig file later may result in surprises...

We can look into fixing that, but maybe some people wouldn't expect things to trickle down, I'm not quite sure (I can see problems with both approaches), and I'm not sure how easy it would be either to make things trickle down (the classic "there be dragons here" probably applies...).

@akesandgren
Copy link
Copy Markdown
Contributor

akesandgren commented Sep 5, 2018

I for one would expect it NOT to end up in the dumped one, but it might be good to have a comment added that hooks where changing stuff and whether the dumped result is with or without the changes done by hooks.

But if someone wants the changes to end up in the dump, this should probably be configurable.

@vanzod vanzod merged commit 14e7b91 into easybuilders:develop Sep 5, 2018
@boegel boegel deleted the parse_hook branch September 6, 2018 07:08
@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Sep 6, 2018

@boegel I wouldn't have a problem with the archived easyconfig not including the changes but I think I would expect to see them in the reprod directory

@akesandgren
Copy link
Copy Markdown
Contributor

Yes, that would be good, didn't think of that one.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 6, 2018

follow-up on what @ocaisa mentioned in #2565

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants