-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
spack list: format version_json #11652
Conversation
f5ed0a4
to
d525120
Compare
lib/spack/spack/cmd/list.py
Outdated
' "file": "{3}"' | ||
'}}'.format( | ||
pkg.name, | ||
VersionList(pkg.versions).highest(), |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
ba6a08a
to
402932d
Compare
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.
Just a couple of minor comments
lib/spack/spack/version.py
Outdated
@@ -643,6 +643,19 @@ def highest(self): | |||
else: | |||
return self[-1].highest() | |||
|
|||
def highest_numeric(self, fallback_all=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.
Should we return the highest numeric or the preferred version?
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.
Good idea, actually highest_numeric(True)
is hopefully the preferred one in default settings... Any idea how to adjust this?
Alternatively it's probably ok for a first implementation.
d9226ab
to
20f58a4
Compare
List the latest version of each package in JSON encoding. Preparation for consumption for a "spack badge" service.
20f58a4
to
7b81df5
Compare
) for pkg in pkgs | ||
]) | ||
out.write(pkg_latest) | ||
# important: no trailing comma in JSON arrays |
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.
so irritating
List the latest version of each package in JSON encoding. Preparation for consumption for a "spack badge" service.
List the latest version of each package in JSON encoding. Preparation for consumption for a "spack badge" service.
List the latest version of each package in JSON encoding.
Preparation for consumption for a "spack badge" service.
Generating a package index suitable for RESTful consumption in a static HTML service: