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

add support for --list-software #1883

Merged
merged 16 commits into from
Sep 15, 2016
Merged

Conversation

boegel
Copy link
Member

@boegel boegel commented Aug 19, 2016

TODO:

  • figure out a way to speed this up significantly
    • ~~currently takes ~4m to print the full list of software because it involves parsing all 6.5k easyconfigs~~
    • options:
      • speed up parsing of easyconfigs significantly (involves profiling current codebase in detail)
      • do not create EasyConfig instances at all, and only parse what we really need (name, version and toolchain lines)
      • implement support for caching EasyConfig instances into a file on disk (which also involves support for updating the cache, etc.)
    • now takes only about 10s with 6.5k easyconfigs by avoiding to create full EasyConfig instances
  • support different levels of detail: only software names, also incl. versions, also incl. toolchains
    • see --list-software (equivalent with --list-software=simple) vs --list-software=detailed
  • also support rst output format
  • also take into account versionsuffix
  • add test(s)
  • update documentation

@boegel boegel added this to the v2.9.0 milestone Aug 19, 2016
@boegel
Copy link
Member Author

boegel commented Sep 13, 2016

@wpoely86 do you mind giving this a review before I add tests?

Rendered result of --list-software=detailed --output-format=rst is available at http://boegel-eb.readthedocs.io/en/list_software/version-specific/Supported_software.html

@migueldiascosta
Copy link
Member

@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 module avail :), but it would be nice to have it in rst format (ok, one can always post-process the full list)

@boegel
Copy link
Member Author

boegel commented Sep 15, 2016

@migueldiascosta that's a good idea, but maybe that should be a separate option like --list-installed-software that hooks into the functionality implemented here?

I think it's best to tackle that in a follow-up PR.

@boegel boegel changed the title add support for --list-software (WIP) add support for --list-software Sep 15, 2016
@@ -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
Copy link
Member

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?

Copy link
Member Author

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):
Copy link
Member

Choose a reason for hiding this comment

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

doc args 😉

Copy link
Member Author

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"""
Copy link
Member

Choose a reason for hiding this comment

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

doc args

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@boegel
Copy link
Member Author

boegel commented Sep 15, 2016

Thanks for the review @wpoely86!

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

Successfully merging this pull request may close these issues.

3 participants