Skip to content

uenv image inspect is more flexible#127

Merged
bcumming merged 10 commits intoeth-cscs:mainfrom
bcumming:neo-inspect
Dec 19, 2025
Merged

uenv image inspect is more flexible#127
bcumming merged 10 commits intoeth-cscs:mainfrom
bcumming:neo-inspect

Conversation

@bcumming
Copy link
Member

This adds support for the most requested user-convenience feature

Namely "how do I see which views are in a uenv before starting it?"

The default output for uenv image inspect now shows the mount point and views of a uenv:

$ uenv image inspect namde/3.0:v1
namd/3.0:v1@eiger%zen2 mount at /user-environment
views:
  spack: configure spack upstream
  namd:
  modules: activate modules
  develop:

The --format option is still supported, but now it has more options:

$ uenv image inspect --format='{name}/{version} with metadata {meta}' namd/3.0:v1
namd/3.0 with metadata /home/bcumming/.uenv/repo/images/cd8d842d108f2eb1b69ca24402d69734f4ad9164f248cda804a5a78305be6f96/meta

And a new --json option will dump everything we know in JSON format for easier integration with scripts:

$ uenv image inspect --json namd/3.0:v1
{
  "date": "2025-05-21 15:31:07",
  "description": "NAMD: Scalable Molecular Dynamics",
  "digest": "cd8d842d108f2eb1b69ca24402d69734f4ad9164f248cda804a5a78305be6f96",
  "id": "cd8d842d108f2eb1",
  "meta": "/home/bcumming/.uenv/repo/images/cd8d842d108f2eb1b69ca24402d69734f4ad9164f248cda804a5a78305be6f96/meta",
  "mount": "/user-environment",
  "name": "namd",
  "path": "/home/bcumming/.uenv/repo/images/cd8d842d108f2eb1b69ca24402d69734f4ad9164f248cda804a5a78305be6f96",
  "sqfs": "/home/bcumming/.uenv/repo/images/cd8d842d108f2eb1b69ca24402d69734f4ad9164f248cda804a5a78305be6f96/store.squashfs",
  "system": "eiger",
  "tag": "v1",
  "uarch": "zen2",
  "version": "3.0",
  "views": [
    {
      "description": "configure spack upstream",
      "name": "spack"
    },
    {
      "description": "",
      "name": "namd"
    },
    {
      "description": "activate modules",
      "name": "modules"
    },
    {
      "description": "",
      "name": "develop"
    }
  ]
}

Note that this "simple" feature required some long-overdue refactoring, hence the number of files touched to implement it.

@bcumming bcumming requested a review from RMeli December 17, 2025 16:20
@bcumming bcumming merged commit dfb34d8 into eth-cscs:main Dec 19, 2025
10 checks passed
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.

1 participant