Coverage for gwcelery/tasks/circulars.py: 100%

17 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-11-14 05:52 +0000

1"""Generate and upload automated circulars.""" 

2import ligo.followup_advocate 

3 

4from . import legacy_gracedb as gracedb 

5 

6 

7@gracedb.task(shared=False) 

8def create_initial_circular(graceid): 

9 """Create and return circular txt.""" 

10 return ligo.followup_advocate.compose(graceid, client=gracedb.client, 

11 remove_text_wrap=True) 

12 

13 

14@gracedb.task(shared=False) 

15def create_emcoinc_circular(graceid): 

16 """Create and return the em_coinc circular txt.""" 

17 return ligo.followup_advocate.compose_raven(graceid, 

18 client=gracedb.client, 

19 remove_text_wrap=True) 

20 

21 

22@gracedb.task(shared=False) 

23def create_medium_latency_circular(graceid): 

24 """Create and return the em_coinc circular txt.""" 

25 return ligo.followup_advocate.compose_grb_medium_latency( 

26 graceid, client=gracedb.client, remove_text_wrap=True) 

27 

28 

29@gracedb.task(shared=False) 

30def create_update_circular(graceid, update_types=['sky_localization', 

31 'em_bright', 

32 'p_astro'], 

33 remove_text_wrap=True): 

34 """Create and return update circular txt.""" 

35 return ligo.followup_advocate.compose_update(graceid, 

36 update_types=update_types, 

37 client=gracedb.client, 

38 remove_text_wrap=True) 

39 

40 

41@gracedb.task(shared=False) 

42def create_retraction_circular(graceid): 

43 """Create and return retraction circular txt.""" 

44 return ligo.followup_advocate.compose_retraction(graceid, 

45 client=gracedb.client, 

46 remove_text_wrap=True)