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

review hooks page #186

Open
boegel opened this issue Jul 4, 2023 · 2 comments
Open

review hooks page #186

boegel opened this issue Jul 4, 2023 · 2 comments
Assignees
Labels

Comments

@boegel
Copy link
Member

boegel commented Jul 4, 2023

https://docs.easybuild.io/hooks/

@jkwmoore
Copy link

jkwmoore commented Jul 4, 2023

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:

  • A reminder that certain methods (e.g. .append .update) should be used with type of configuration objects (lists dicts).
  • A highlight where 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:

  • Adding log output to describe hook operations with self.log.info
  • Setting license files or license servers.
  • Enable SLURM / PSM2 / OFI / verbs etc... OpenMPI options.
  • Adding additional buildopts
  • Adding additional environment variables with modextravars
  • Amending directory permissions for restricted software installations (or module files?) with post_permissions_hook and adjust_permissions()
  • An example to set 32/64 bit for installations using the parse_hook and toolchainopts

@boegel boegel moved this to Assigned in Review docs (2023) Jul 5, 2023
@boegel boegel self-assigned this Sep 14, 2023
@boegel
Copy link
Member Author

boegel commented Sep 14, 2023

I'll take a look at @jkwmoore's suggestions, some are not relevant anymore, but there's some great feedback in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Assigned
Development

No branches or pull requests

3 participants