jozu-ai / kitops

Tools for easing the handoff between AI/ML and App/SRE teams.
https://KitOps.ml
Apache License 2.0
261 stars 24 forks source link

Add more info to output of `kit inspect` #277

Closed amisevsk closed 1 month ago

amisevsk commented 1 month ago

Description

Add additional information to the output of kit inspect:

{
  "digest": "<modelkit-digest>",
  "cliVersion": "<cli-version>",
  "kitfile": {
    // Kitfile
  },
  "manifest": {
    // Manifest  
  }
}

Note this change does mean that both kit inspect and kit info produce the Kitfile for the modelkit. I've left both commands intact because kit info outputs the Kitfile in YAML format (easier to read) whereas inspect outputs JSON. We can't yet produce yaml output for inspect since the OCI manifest struct does not have yaml tags and gopkg.in/yaml.v3 does not respect json tags.

Note: to test version labelling, you will need to build kit with the version fields set:

go build -o kit -ldflags "-s -w -X kitops/pkg/cmd/version.Version=v0.0.1+test"

Linked issues

Closes #271

amisevsk commented 1 month ago

Applied fixes suggested above