Skip to content

add support for --list-software#1883

Merged
boegel merged 16 commits intoeasybuilders:developfrom
boegel:list_software
Sep 15, 2016
Merged

add support for --list-software#1883
boegel merged 16 commits intoeasybuilders:developfrom
boegel:list_software

Conversation

@boegel
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

# 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
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread easybuild/tools/docs.py
return '\n'.join(txt)


def list_software(output_format=FORMAT_TXT, detailed=False):
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread easybuild/tools/docs.py Outdated


def list_software_rst(software, detailed=False):
"""Return overview of supported software in RST format"""
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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