From 47b7fbad0fb2a97a6ded31c75fdaa1273fa61a7c Mon Sep 17 00:00:00 2001 From: Tanner Prestegard <tanner.prestegard@ligo.org> Date: Wed, 5 Dec 2018 09:34:40 -0600 Subject: [PATCH] Remove unused submitToSkyalert functions --- gracedb/events/buildVOEvent.py | 37 --------------------------- gracedb/superevents/buildVOEvent.py | 39 ----------------------------- 2 files changed, 76 deletions(-) diff --git a/gracedb/events/buildVOEvent.py b/gracedb/events/buildVOEvent.py index 511bf0484..d1fcb8ee7 100644 --- a/gracedb/events/buildVOEvent.py +++ b/gracedb/events/buildVOEvent.py @@ -553,40 +553,3 @@ def buildVOEvent(event, serial_number, voevent_type, request=None, skymap_filena #schemaURL = "http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd") return xml, ivorn -def submitToSkyalert(event, validate_only=False): - ## Python stub code for validating and authoring VOEvents to Skyalert - import urllib - dict = {} - - # the server that will handle the submit request - url = "http://skyalert.org/submit/" - url = "https://betelgeuse.ligo.caltech.edu:8000/submit/" - url = "http://betelgeuse.ligo.caltech.edu/submit/" - - # choose 'dryrun' for validation and 'author' for authoring - dict['checker'] = 'dryrun' - - # for command line, we want plain text output, not HTML - dict['plainResponse'] = 'on' - - if not validate_only: - # uncomment these for authoring - dict['checker'] = 'author' - - # Skyalert username and password - dict['username'] = 'system' - dict['password'] = 'OPV537' - - # This is the short name for the stream, must match credentials and event! - dict['streamName'] = 'LIGO' - - # Should alerts be run once the event is ingested? - dict['doRules'] = 'on' - - dict['xmlText'] = buildVOEvent(event) - params = urllib.urlencode(dict) - f = urllib.urlopen(url, params) - result = f.read() - return result - - diff --git a/gracedb/superevents/buildVOEvent.py b/gracedb/superevents/buildVOEvent.py index 5247c2592..16e43eec9 100644 --- a/gracedb/superevents/buildVOEvent.py +++ b/gracedb/superevents/buildVOEvent.py @@ -508,42 +508,3 @@ def construct_voevent_file(superevent, voevent, request=None, xml = stringVOEvent(v) #schemaURL = "http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd") return xml, ivorn - - -def submitToSkyalert(superevent, validate_only=False): - ## Python stub code for validating and authoring VOEvents to Skyalert - import urllib - dict = {} - - # the server that will handle the submit request - #url = "http://skyalert.org/submit/" - #url = "https://betelgeuse.ligo.caltech.edu:8000/submit/" - url = "http://betelgeuse.ligo.caltech.edu/submit/" - - # choose 'dryrun' for validation and 'author' for authoring - dict['checker'] = 'dryrun' - - # for command line, we want plain text output, not HTML - dict['plainResponse'] = 'on' - - if not validate_only: - # uncomment these for authoring - dict['checker'] = 'author' - - # Skyalert username and password - dict['username'] = 'system' - dict['password'] = 'OPV537' - - # This is the short name for the stream, must match credentials and event! - dict['streamName'] = 'LIGO' - - # Should alerts be run once the event is ingested? - dict['doRules'] = 'on' - - dict['xmlText'] = buildVOEvent(superevent) - params = urllib.urlencode(dict) - f = urllib.urlopen(url, params) - result = f.read() - return result - - -- GitLab