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 --output-format=json #4152

Merged
merged 10 commits into from
Dec 29, 2023

Conversation

APN-Pucky
Copy link
Contributor

@APN-Pucky APN-Pucky commented Dec 29, 2022

This could be a first step on getting easybuild on repology as described here:

Next steps would be:

  • handle name collisions
  • serving the json to repology on some server/page (since they don't want to run third party software).

Possibly related:

Please let me know, if the (estimated) effort to get easybuild on repology is worth it.
The json format might be useful either way.

Cheers,
APN

  • eb --avail-cfgfile-constants --output-format json
  • eb --avail-easyconfig-constants --output-format json
  • eb --avail-easyconfig-licenses --output-format json
  • eb --avail-easyconfig-params --output-format json
  • eb --avail-easyconfig-templates --output-format json
  • eb --avail-toolchain-opts ... --output-format json
  • eb --list-easyblocks --output-format json
  • eb --list-software --output-format json
  • eb --list-toolchains --output-format json
    - [ ] eb --help json
  • gen_easyblocks_overview_json

@APN-Pucky APN-Pucky force-pushed the develop branch 3 times, most recently from b792b58 to 4648367 Compare December 29, 2022 12:55
@boegel boegel added this to the 4.x milestone Jan 3, 2023
@boegel
Copy link
Member

boegel commented Jan 3, 2023

@APN-Pucky It would definitely be interesting to get EasyBuild into repology!

High-level, the changes being made here look like a good start, but:

  • tests should be enhanced as well to make sure that --list-software --output-format=json works (and keeps working) as intended;
  • add json as a supported output format makes sense, but implies that all other options that also take into account the selected output format should be updated to support producing JSON. add support for using --output-format=md (MarkDown) #4117 shows that this is no small effort, but maybe it makes sense to somehow only support --output-format=json for --list-software, without causing trouble for the other options;
  • merge conflicts will appear once add support for using --output-format=md (MarkDown) #4117 gets merged (although they'll likely be easy to resolve);

@boegel boegel changed the title Add list_software format as json add support for --list-software --output-format=json Jan 3, 2023
@APN-Pucky APN-Pucky marked this pull request as draft November 26, 2023 21:05
@APN-Pucky APN-Pucky changed the title add support for --list-software --output-format=json Draft: add support for --list-software --output-format=json Nov 26, 2023
@APN-Pucky APN-Pucky changed the title Draft: add support for --list-software --output-format=json add support for --list-software --output-format=json Nov 26, 2023
@APN-Pucky APN-Pucky marked this pull request as ready for review November 26, 2023 22:08
@APN-Pucky
Copy link
Contributor Author

  1. resolved conflict with md format
  2. added the other json format functions with NotImplementedError exceptions. They are also checked in the test, so that when I or someone else extends the json format one gets reminded of the tests.
  3. added --list-software --output-format=json tests

@APN-Pucky
Copy link
Contributor Author

Seems to be only some newlines. While it worked for me I'll just replace the failed newlines with those that worked in the CI.

@APN-Pucky
Copy link
Contributor Author

So finally, after sorting and tuning the json for compatibility across different python versions, my CI runs through too... (https://github.com/APN-Pucky/easybuild-framework/actions/runs/7114626894)

@boegel boegel added this to the release after 4.9.0 milestone Dec 26, 2023
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel merged commit 860e600 into easybuilders:develop Dec 29, 2023
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants