Open boegel opened 1 year ago
The example given in https://docs.easybuild.io/hooks/#manipulating-easyconfig-parameters looks suspect as self.cfg
manipulation in the parse_hook
shouldn't work.
Seems worth a correction with self.cfg.update('configopt', {'property': value})
Other thoughts about this page below:
Mostly as I am very rusty on Python but may also help people fairly new to Python, might be worth having this page include:
.append
.update
) should be used with type of configuration objects (lists dicts).self.cfg.update()
vs self.cfg["configobject"].update()
should will and won't work (in which hooks), and why you use them there.Various additional possibly generic but real world often used hook examples might also be a good shout for the page:
self.log.info
buildopts
modextravars
post_permissions_hook
and adjust_permissions()
parse_hook
and toolchainopts
I'll take a look at @jkwmoore's suggestions, some are not relevant anymore, but there's some great feedback in there.
https://docs.easybuild.io/hooks/