desihub / tutorials

DESI tutorials
BSD 3-Clause "New" or "Revised" License
42 stars 16 forks source link

Database access with a public user #80

Closed weaverba137 closed 1 year ago

weaverba137 commented 1 year ago

This PR updates the database notebook to use a database username that would be accessible to the public (with a NERSC account). It needs some testing before merging.

sbailey commented 1 year ago

The tutorial looks good, but I made two updates:

Note: this notebook uses fuji_test. I'm ok with merging it as-is if we open another ticket associated with EDR Countdown to switch to fuji after fuji_test is reloaded and approved.

weaverba137 commented 1 year ago

The manipulation of sys.path is leftover from some testing. The notebook is supposed to use a kernel that has that installed as a tagged version. I will remove that entirely before merging.

weaverba137 commented 1 year ago

Hmm, the setup_db return value is an interesting bug. I will look into that further.

weaverba137 commented 1 year ago

setup_db will raise an exception if the pgpass details can't be found, which is the more appropriate response. This will be implemented in desihub/specprod-db#4.

weaverba137 commented 1 year ago

And also note: specprod-db is loaded in kernel 23.1, we just need to update desimodules/23.1 with the updated tag after all the database reloading is done.