diff --git a/config/settings/base.py b/config/settings/base.py index 897c2852deba210a4663f4a60107954b06d5670a..d2af7d8a70eb2cc0e1c072b0de3054b55de25ca8 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -139,7 +139,7 @@ BLESSED_TAGS = [ # Lists of pipelines used for selecting templates to serve COINC_PIPELINES = [ 'gstlal', - 'gstlal-spiir', + 'spiir', 'MBTAOnline', 'pycbc', ] @@ -177,7 +177,7 @@ REPORT_INFO_URL_PREFIX = "/report_info/" REPORT_IFAR_IMAGE_DIR = GRACEDB_PATHS["latency"] # Stuff for the new rates plot -BINNED_COUNT_PIPELINES = ['gstlal', 'MBTAOnline', 'CWB', 'LIB', 'gstlal-spiir'] +BINNED_COUNT_PIPELINES = ['gstlal', 'MBTAOnline', 'CWB', 'oLIB', 'spiir'] BINNED_COUNT_FILE = join(GRACEDB_PATHS["data"], "binned_counts.json") # Defaults for RSS feed diff --git a/docs/admin_docs/source/new_event_subclass.rst b/docs/admin_docs/source/new_event_subclass.rst index 4cc59beb8d13cff54ce9721f637cfc141bd9d20e..b4d7e6900b822410a94f4dab8c7e06f9604a2f9c 100644 --- a/docs/admin_docs/source/new_event_subclass.rst +++ b/docs/admin_docs/source/new_event_subclass.rst @@ -91,7 +91,7 @@ statement here that creates a new event object instance according to the pipeline. We'll need to add our new one:: # Create Event - if pipeline.name in ['gstlal', 'gstlal-spiir', 'MBTAOnline', 'pycbc',]: + if pipeline.name in ['gstlal', 'spiir', 'MBTAOnline', 'pycbc',]: event = CoincInspiralEvent() elif pipeline.name in ['Fermi', 'Swift', 'SNEWS']: event = GrbEvent() @@ -99,7 +99,7 @@ pipeline. We'll need to add our new one:: event = MultiBurstEvent() elif pipeline.name in ['HardwareInjection',]: event = SimInspiralEvent() - elif pipeline.name in ['LIB',]: + elif pipeline.name in ['oLIB',]: event = LalInferenceBurstEvent() ### BEHOLD, a new case: elif pipeline.name in ['newpipeline',]: @@ -171,8 +171,8 @@ we'll need to add something to the control structure that chooses the template:: templates.insert(0, 'gracedb/event_detail_CWB.html') elif event.pipeline.name in ['HardwareInjection',]: templates.insert(0, 'gracedb/event_detail_injection.html') - elif event.pipeline.name in ['LIB',]: - templates.insert(0, 'gracedb/event_detail_LIB.html') + elif event.pipeline.name in ['oLIB',]: + templates.insert(0, 'gracedb/event_detail_oLIB.html') elif event.pipeline.name in ['newpipeline',]: templates.insert(0, 'gracedb/event_detail_newpipeline.html') diff --git a/docs/admin_docs/source/new_pipeline.rst b/docs/admin_docs/source/new_pipeline.rst index 2d39b768392cac042de6be4ee879b56b10811272..d74caeebd06e308e8962549eb92c29c789f48097 100644 --- a/docs/admin_docs/source/new_pipeline.rst +++ b/docs/admin_docs/source/new_pipeline.rst @@ -11,9 +11,9 @@ the pipeline object itself is the easy part. The hard part is figuring out what kind of data file the group will be uploading, and how to ingest the values. The directions below will focus on the easiest possible case--in which the new pipeline's data files have the same format and information as those -of an existing pipeline. (For example, the ``gstlal-spiir`` group uploads +of an existing pipeline. (For example, the `spiir`` group uploads the same type of data file as the ``gstlal`` group, and this made adding the -``gstlal-spiir`` pipeline relatively easy.) +``spiir`` pipeline relatively easy.) Adding a new ``Search`` is simpler, but the steps relating to LVAlert are similar. .. NOTE:: diff --git a/docs/user_docs/source/models.rst b/docs/user_docs/source/models.rst index 61ed2e30e25522ad857cc779293656907cdda6e5..0c2c48bdfaf97d0d4b09b3865390030e0cc25e4b 100644 --- a/docs/user_docs/source/models.rst +++ b/docs/user_docs/source/models.rst @@ -10,7 +10,7 @@ The different types of events in GraceDB are distinguished by the following para - ``Group``: the working group responsible for finding the candidate - values: ``CBC``, ``Burst``, ``External``, ``Test`` - ``Pipeline``: the data analysis software tool used make the detection - - values: ``MBTAOnline``, ``CWB``, ``gstlal``, ``gstlal-spiir``, ``HardwareInjection``, ``Fermi``, ``Swift``, ``SNEWS``, ``LIB`` + - values: ``MBTAOnline``, ``CWB``, ``gstlal``, ``spiir``, ``HardwareInjection``, ``Fermi``, ``Swift``, ``SNEWS``, ``oLIB`` - ``Search``: the search activity which led to the detection - values: ``AllSky``, ``AllSkyLong``, ``LowMass``, ``HighMass``, ``GRB``, ``Supernova``, ``MDC`` diff --git a/gracedb/events/migrations/0017_rename_pipelines.py b/gracedb/events/migrations/0017_rename_pipelines.py new file mode 100644 index 0000000000000000000000000000000000000000..0592f30a99812e5c6e4c0f385af387d0fd924abc --- /dev/null +++ b/gracedb/events/migrations/0017_rename_pipelines.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.14 on 2018-09-17 19:46 +from __future__ import unicode_literals + +from django.db import migrations + +PIPELINES = [ + { + 'old_name': 'LIB', + 'new_name': 'oLIB', + }, + { + 'old_name': 'gstlal-spiir', + 'new_name': 'spiir', + }, +] + +def rename_pipelines(apps, schema_editor): + Pipeline = apps.get_model('events', 'Pipeline') + + # Rename pipelines + for p in PIPELINES: + pipeline = Pipeline.objects.get(name=p['old_name']) + pipeline.name = p['new_name'] + pipeline.save(update_fields=['name']) + + +def unrename_pipelines(apps, schema_editor): + Pipeline = apps.get_model('events', 'Pipeline') + + # Rename pipelines + for p in PIPELINES: + pipeline = Pipeline.objects.get(name=p['new_name']) + pipeline.name = p['old_name'] + pipeline.save(update_fields=['name']) + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0016_delete_old_tag_event_logs_table'), + ] + + operations = [ + migrations.RunPython(rename_pipelines, unrename_pipelines), + ] diff --git a/gracedb/events/translator.py b/gracedb/events/translator.py index 4d210ce2fb5d67dc6b7b78c7951e2b18a4037074..095d68b5e01779ef72c0a000986aa2eed4243a6c 100644 --- a/gracedb/events/translator.py +++ b/gracedb/events/translator.py @@ -70,7 +70,7 @@ def handle_uploaded_data(event, datafilename, pipeline = event.pipeline.name - if pipeline in [ 'gstlal', 'gstlal-spiir', 'pycbc', ] or (pipeline=='MBTAOnline' and '.xml' in datafilename): + if pipeline in [ 'gstlal', 'spiir', 'pycbc', ] or (pipeline=='MBTAOnline' and '.xml' in datafilename): log_comment = "Log File Created" # Wildly speculative wrt HM @@ -399,7 +399,7 @@ def handle_uploaded_data(event, datafilename, issuer=event.submitter, comment=error) log.save() - elif pipeline == 'LIB': + elif pipeline == 'oLIB': # lambda function for converting to a type if not None typecast = lambda t, v: t(v) if v is not None else v n_int = lambda v: typecast(int, v) diff --git a/gracedb/events/view_logic.py b/gracedb/events/view_logic.py index 2634c3fd0e0abe6dc62ea98694f8f372f7902959..cb6e165e01c767f0300763cda37f709ef631cc85 100644 --- a/gracedb/events/view_logic.py +++ b/gracedb/events/view_logic.py @@ -52,7 +52,7 @@ def _createEventFromForm(request, form): else: search = None # Create Event - if pipeline.name in ['gstlal', 'gstlal-spiir', 'MBTAOnline', 'pycbc',]: + if pipeline.name in ['gstlal', 'spiir', 'MBTAOnline', 'pycbc',]: event = CoincInspiralEvent() elif pipeline.name in ['Fermi', 'Swift', 'SNEWS']: event = GrbEvent() @@ -60,7 +60,7 @@ def _createEventFromForm(request, form): event = MultiBurstEvent() elif pipeline.name in ['HardwareInjection',]: event = SimInspiralEvent() - elif pipeline.name in ['LIB',]: + elif pipeline.name in ['oLIB',]: event = LalInferenceBurstEvent() else: event = Event() diff --git a/gracedb/events/views.py b/gracedb/events/views.py index dc1f0d2f9ab727346c1cf07591b6016c80b870c5..4d7bfda5ddf10b1e7f384475e8507af3da9a5181 100644 --- a/gracedb/events/views.py +++ b/gracedb/events/views.py @@ -462,8 +462,8 @@ def view(request, event): templates.insert(0, 'gracedb/event_detail_CWB.html') elif event.pipeline.name in ['HardwareInjection',]: templates.insert(0, 'gracedb/event_detail_injection.html') - elif event.pipeline.name in ['LIB',]: - templates.insert(0, 'gracedb/event_detail_LIB.html') + elif event.pipeline.name in ['oLIB',]: + templates.insert(0, 'gracedb/event_detail_oLIB.html') return render(request, templates, context=context) diff --git a/gracedb/templates/feeds/index.html b/gracedb/templates/feeds/index.html index 3da1939d561200cfdc4bc7197f5bcababc0bd7ed..734297d29d72cddd18701b5160b6b367475a1334 100644 --- a/gracedb/templates/feeds/index.html +++ b/gracedb/templates/feeds/index.html @@ -12,7 +12,7 @@ <li><a href="latest/burst/">Burst</a></li> <ul> <li><a href="latest/burst/cwb">CWB</a></li> - <li><a href="latest/burst/lib">LIB</a></li> + <li><a href="latest/burst/olib">oLIB</a></li> </ul> </ul> @@ -20,7 +20,7 @@ <li><a href="latest/cbc/">CBC</a></li> <ul> <li><a href="latest/cbc/gstlal">gstlal</a></li> - <li><a href="latest/cbc/gstlal-spiir">gstlal-spiir</a></li> + <li><a href="latest/cbc/spiir">spiir</a></li> <!-- <li><a href="latest/cbc/grb">GRB</a></li> --> <li><a href="latest/cbc/mbtaonline">MBTAOnline</a></li> </ul> diff --git a/gracedb/templates/gracedb/event_detail_LIB.html b/gracedb/templates/gracedb/event_detail_oLIB.html similarity index 100% rename from gracedb/templates/gracedb/event_detail_LIB.html rename to gracedb/templates/gracedb/event_detail_oLIB.html diff --git a/gracedb/templates/gracedb/index.html b/gracedb/templates/gracedb/index.html index cdd04a1147b361db70ed06aab9599f96e2615dec..30caadcf6f187f4a7dd036397b83afc399adb7d0 100644 --- a/gracedb/templates/gracedb/index.html +++ b/gracedb/templates/gracedb/index.html @@ -157,14 +157,14 @@ x.domain(d3.extent(data, function(d) { return d.created; })); // I suspect there is a better and less annoying way of doing all this. // But I don't really know what it is. We specify the ordering of the // pipelines and the color for each pipeline that may be present. -var PIPELINE_ORDER = [ 'gstlal', 'MBTAOnline', 'CWB', 'LIB', 'Fermi', 'Swift', 'SNEWS', 'HardwareInjection']; +var PIPELINE_ORDER = [ 'gstlal', 'MBTAOnline', 'CWB', 'oLIB', 'Fermi', 'Swift', 'SNEWS', 'HardwareInjection']; // These are the first 8 colors of category 10 var COLOR_HASH = {}; COLOR_HASH['gstlal'] = '#1f77b4'; COLOR_HASH['MBTAOnline'] = '#ff7f0e'; COLOR_HASH['CWB'] = '#2ca02c'; -COLOR_HASH['LIB'] = '#d62728'; +COLOR_HASH['oLIB'] = '#d62728'; COLOR_HASH['Fermi'] = '#9467bd'; COLOR_HASH['Swift'] = '#8c564b'; COLOR_HASH['SNEWS'] = '#e377c2';