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

showing module category with module spider command #382

Open
mpiercy opened this issue Sep 14, 2018 · 4 comments
Open

showing module category with module spider command #382

mpiercy opened this issue Sep 14, 2018 · 4 comments

Comments

@mpiercy
Copy link

mpiercy commented Sep 14, 2018

Hi,
It would be very helpful for our users if module spider would output the category of the matches also-

so if I ran-
module spider matplotlib

The output would be-
Versions:
py-matplotlib/2.1.2_py27 (viz)
py-matplotlib/2.1.2_py36 (viz)
py-matplotlib/2.2.2_py27 (some_other_cat)
py-matplotlib/2.2.2_py36 (viz)

Thanks,
Mark

rtmclay pushed a commit that referenced this issue May 10, 2019
@rtmclay
Copy link
Member

rtmclay commented May 10, 2019

This feature is not something that all sites are going to want. So I have added a hook to allow sites to "decorate" this output. See rt/uitSitePkg/mf/site-script/SitePackage.lua in the source tree for a complete example.

Please see Lmod 8.1.2 to see if it works for you.

@kcgthb
Copy link
Contributor

kcgthb commented Jan 20, 2022

Hi @rtmclay

Just wanted to say that it does actually work for us and that we successfully implemented your example, based on the category information provided in each module file.

Now, as far as I understand things, the spider_decoration hook has access to FullVT, which contains a module's fullName, Category, and propT. Do you think it would be possible to extend this to also expose the parentAA property?

We organize our modules in separate, field-based directories, that can be added to the user's $MODULEPATH by loading a specific module. So for instance, all our biology-related modules are in a /biology directory, and can be accessed by first loading the biology "category" module. Having that information available directly in the Spider output would be very useful for users, so they can know which "category" module to load first.

Hope this makes sense.
Thanks!

rtmclay pushed a commit that referenced this issue Jan 21, 2022
@rtmclay
Copy link
Member

rtmclay commented Jan 21, 2022

I have added parentAA to fullVT and it is now passed to the spider decoration hook. Please test Lmod 8.6.6 to see if it works for you.

@kcgthb
Copy link
Contributor

kcgthb commented Jan 25, 2022

Thanks @rtmclay! It works perfectly, we successfully implemented a spider decorator using the parentAA information with 8.6.6.
Good to close #382.

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

3 participants