-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/hermes support #25
Conversation
'TNS_GROUP_NAMES': ['bot_group', 'PI_group'], # Optional List. Include if you wish to use any affiliated Group Names when reporting to TNS. | ||
'FILTER_MAPPING': { | ||
'o': 'Other', | ||
'c': 'Clear', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't really important, but the o and c bands are from the atlas survey and stand for orange and cyan respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of this readme is just to show an example setting... users should tailor it to their own data sources and mapping. But if there is a better example mapping you want me to put here please let me know (Cyan/Orange aren't tns filter names I think).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Minor comments interleaved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
I'm OK with releasing this and letting Griffin make any issues that he finds.
README.md
Outdated
'c': 'Clear', | ||
... | ||
}, # Optional mapping from your reduced datum filter values to TNS filter options. | ||
'default_authors': 'Foo Bar <[email protected]>' # Optional default authors string to populate the author fields for tns submission. If not specified, defaults to saying "<logged in user> using <tom name>". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a second author to the example?
Something like 'Foo Bar [email protected], Rando Calrissian, et al.'
```python | ||
urlpatterns = [ | ||
... | ||
path('tns/', include('tom_tns.urls', namespace='tns')), | ||
] | ||
``` | ||
|
||
Once configured, a `TNS` button should appear below the Target Name. | ||
Once configured, a `TNS` button should appear below the Target Name on the default Target Detail page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good solution for now. Ultimately, we want to get away from forcing users to modify their templates to benefit from our apps. (See TOMToolkit/tom_base#745)
Adding a connection point to apps.py
for photometry table would be an interesting step for future development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I saw that was used for the TNS button here. Seems nice, but will be a lot of work to add them everywhere that might make sense (anywhere with the target, datums, or dataproducts)
# Get IAU name from Report Reply | ||
iau_name = get_tns_report_reply(report_id, self.request) | ||
|
||
if iau_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
This PR adds the ability to submit to TNS through Hermes (If Hermes info is defined in the DATA_SHARING section). I also enhanced the form a bit to have:
Please check out the README especially to see if that makes sense for the two modes of submission now. Also @jchate6 I added a bit at the bottom about how to include it into your TOM's templates - the idea was originally to add a button to the target details "manage data" or "photometry" and "spectroscopy" tabs to go to the tns form for a specific datum or data product, but I can't really see a way to "inject" that into this plugin? Please let me know if there is a way, but ff there isn't, then I think its fine to leave this as is since the main user SNEX uses fully custom target detail templates anyway, so they will need to add it themselves either way.