-
Notifications
You must be signed in to change notification settings - Fork 203
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
add support for --list-software #1883
Conversation
…ntation of all easyconfig files rather than a full EasyConfig instance
@wpoely86 do you mind giving this a review before I add tests? Rendered result of |
@boegel for generating local documentation, would it make sense to add an option to only list installed software, or somehow highlight the ones that are already installed? Of course, there's |
@migueldiascosta that's a good idea, but maybe that should be a separate option like I think it's best to tackle that in a follow-up PR. |
@@ -924,7 +924,9 @@ def _generate_template_values(self, ignore=None, skip_lower=True): | |||
# (eg the run_setp code in EasyBlock) | |||
|
|||
# step 1-3 work with easyconfig.templates constants | |||
template_values = template_constant_dict(self._config, ignore=ignore, skip_lower=skip_lower) | |||
self.enable_templating = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment why you do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -514,6 +522,160 @@ def add_class(classes, cls): | |||
return '\n'.join(txt) | |||
|
|||
|
|||
def list_software(output_format=FORMAT_TXT, detailed=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc args 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
|
||
def list_software_rst(software, detailed=False): | ||
"""Return overview of supported software in RST format""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Thanks for the review @wpoely86! |
TODO:
options:speed up parsing of easyconfigs significantly (involves profiling current codebase in detail)do not createEasyConfig
instances at all, and only parse what we really need (name
,version
andtoolchain
lines)implement support for cachingEasyConfig
instances into a file on disk (which also involves support for updating the cache, etc.)EasyConfig
instancessupport different levels of detail: only software names, also incl. versions, also incl. toolchains--list-software
(equivalent with--list-software=simple
) vs--list-software=detailed
rst
output formatversionsuffix