TOMToolkit / tom_base

The base Django project for a Target and Observation Manager
https://tom-toolkit.readthedocs.io
GNU General Public License v3.0
26 stars 47 forks source link

Update TOM Demo #749

Open jchate6 opened 1 year ago

jchate6 commented 1 year ago

We need to update TOM Demo to accommodate the most recent upgrades to TOM Base. This likely involves updating several other modules as well. Specifically TOM_Nonlocalizedevents seems to be pretty far behind.

At the bare minimum we need to do the following:

rachel3834 commented 11 months ago

(I'm not sure if this is the right issue to record these comments on, so feel free to repost if it should go elsewhere)

I logged into the tom-demo to review the revised version. Overall it looks good. In the spirit of destruction testing I tried to stress-test it a bit and found the following:

Request Method: GET
Request URL: http://tom-demo-dev.lco.gtn/dataproducts/data/reduced/update/?type=&name=NGC&key=&value=&cone_search=&targetlist__name=1&name_fuzzy=&target_cone_search=&order=
Django Version: 4.2.8
Exception Type: KeyError
Exception Value: 'name'
Exception Location: /usr/local/lib/python3.9/site-packages/tom_alerts/brokers/gaia.py, line 150, in process_reduced_data
Raised during: tom_dataproducts.views.UpdateReducedDataView
Python Executable: /usr/local/bin/python
Python Version: 3.9.18
Python Path: ['/tom-demo', '/usr/local/bin', '/usr/local/lib/python39.zip', '/usr/local/lib/python3.9', '/usr/local/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages']
Server time: Tue, 19 Dec 2023 22:47:25 +0000
- [ ] Clicking the “check for new data” button from the photometry tab of the TargetDetailPage produces a stacktrace for example target NGC6819:

KeyError at /dataproducts/data/reduced/update/ 'name'

Request Method: GET
Request URL: http://tom-demo-dev.lco.gtn/dataproducts/data/reduced/update/?target_id=5
Django Version: 4.2.8
Exception Type: KeyError
Exception Value: 'name'
Exception Location: /usr/local/lib/python3.9/site-packages/tom_alerts/brokers/gaia.py, line 150, in process_reduced_data
Raised during: tom_dataproducts.views.UpdateReducedDataView
Python Executable: /usr/local/bin/python

Perhaps because this object doesn’t have any associated observations yet?
jchate6 commented 11 months ago

(I'm not sure if this is the right issue to record these comments on, so feel free to repost if it should go elsewhere)

Perfect place for this

  • [ ] Pressing the LCO button from a TargetDetailPage produces a new login screen rather than a warning about no credentials

This is because tom-demo-dev has actual real life credentials at LCO through the eng profile, I don't think this will happen with the proper "guest" permissions on tom-demo proper.

This is because the Hermes Broker hasn't been reinstalled yet...

  • [ ] Running a Gaia alert broker query for Gaia21ccu as a test target correctly produces the target but the TOM doesn’t create a new Target or harvest the data when I select it. This is not that I can’t create a target because I can do a SIMBAD catalog search and create one that way.

This worked 'properly', but is running into the same problem as issue #771. Guest doesn't have permission to see your own targets.