ACCESS-NRI / experiment-metadb

Prototype metadata database and associated exploratory tools and web interfaces
https://experiment-metadb-seven.vercel.app
Apache License 2.0
0 stars 0 forks source link

Some model components Versions are the wrong part of the `spec` string #18

Open CodeGat opened 2 weeks ago

CodeGat commented 2 weeks ago

In the web interface of the build provenance DB, the model components of access-esm1p5 have an incorrect Version field of access-esm1.5. image

This is due to https://github.com/ACCESS-NRI/experiment-metadb/blob/6c78365816419a5bda8e5f1fa116456e53764e49/frontend/src/app/release-provenance/page.js#L33-L34 taking split("=")[1] of spec. This is usually okay (see other models), but in access-esm1.5 we specifically set the right side of the equals to something that isn't the version.

Solution

Update the above linked split(...) function to instead take the first capture of the regex ^.*@(?:git.)?([^=]+)(?:=.*)?$ instead. For a spec string of the form MODEL@git.TAG=VERSION, we essentially want the TAG:

aidanheerdegen commented 2 weeks ago

Do we need the spack parsing functionality in more than one place? If so I'm starting to think it would be good to have a little python library of functions to call for this stuff. It could be something that exposes existing functionality in spack, or if that isn't convenient, then roll something ourselves.