desihub / desitest

Testing coordination for DESI code
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

desimodules version reported by minitest notebook is not useful #3

Closed weaverba137 closed 6 years ago

weaverba137 commented 6 years ago

In the desitest minitest notebook, the desimodules version is obtained via this code:

if 'DESIMODULES' in os.environ:
    desiutil.depend.setdep(deps, 'desimodules', os.path.basename(os.getenv('DESIMODULES')))

As a result, the version of desimodules is 'desimodules'. But if I do module list, I get e.g. desimodules/18.3. Is there a particular reason for this code, and not a more sophisticated attempt to obtain the desimodules version?

sbailey commented 6 years ago

Prior to desihub/desimodules#19, the $DESIMODULES environment would point to $code_root/$product/$version, e.g. the non-existent /global/common/software/desi/cori/desiconda/20180130-1.2.4-spec/code/desimodules/18.3. This minitest notebook code was parsing that to get the version of desimodules that was loaded. After that PR, $DESIMODULES changed to point to the directory with the desimodules modules files (e.g. /global/common/software/desi/cori/desiconda/startup/modulefiles/desimodules), but doesn't tell you which one was actually loaded.

Any of these options would be fine with me:

weaverba137 commented 6 years ago

Closing this in favor of desihub/desimodules#20.