From 2d82e872ece2e25b2f0787d34abff22993315d10 Mon Sep 17 00:00:00 2001
From: John Chilton <jmchilton@gmail.com>
Date: Wed, 18 Jun 2014 14:56:22 -0500
Subject: [PATCH] Rename LWR in Python source code comments and log statements.

---
 galaxy/__init__.py                     |  2 +-
 galaxy/objectstore/pulsar.py           |  6 +++---
 galaxy/tools/deps/dependencies.py      |  4 ++--
 pulsar/client/action_mapper.py         | 20 ++++++++++----------
 pulsar/client/client.py                | 24 ++++++++++++------------
 pulsar/client/interface.py             |  8 ++++----
 pulsar/client/manager.py               |  8 ++++----
 pulsar/client/path_mapper.py           |  6 +++---
 pulsar/client/setup_handler.py         |  4 ++--
 pulsar/client/staging/__init__.py      |  6 +++---
 pulsar/client/staging/down.py          | 10 +++++-----
 pulsar/client/staging/up.py            | 18 +++++++++---------
 pulsar/client/transport/curl.py        |  2 +-
 pulsar/client/transport/standard.py    |  2 +-
 pulsar/client/util.py                  |  2 +-
 pulsar/core.py                         |  2 +-
 pulsar/daemon.py                       | 10 +++++-----
 pulsar/locks.py                        |  2 +-
 pulsar/manager_endpoint_util.py        |  2 +-
 pulsar/managers/queued.py              |  2 +-
 pulsar/managers/queued_cli.py          |  2 +-
 pulsar/managers/queued_drmaa.py        |  2 +-
 pulsar/managers/staging/__init__.py    |  2 +-
 pulsar/managers/stateful.py            |  4 ++--
 pulsar/managers/unqueued.py            |  2 +-
 pulsar/managers/util/__init__.py       |  2 +-
 pulsar/managers/util/cli/job/slurm.py  |  2 +-
 pulsar/managers/util/cli/job/torque.py |  2 +-
 pulsar/mesos/__init__.py               |  2 +-
 pulsar/messaging/bind_amqp.py          |  4 ++--
 pulsar/scripts/mesos_executor.py       |  2 +-
 pulsar/scripts/submit.py               |  2 +-
 pulsar/tools/authorization.py          |  6 +++---
 pulsar/web/__init__.py                 |  2 +-
 pulsar/web/framework.py                |  2 +-
 pulsar/web/wsgi.py                     |  4 ++--
 test/integration_test.py               |  2 +-
 37 files changed, 92 insertions(+), 92 deletions(-)

diff --git a/galaxy/__init__.py b/galaxy/__init__.py
index 1a2f0cb4..d211acb4 100644
--- a/galaxy/__init__.py
+++ b/galaxy/__init__.py
@@ -1,3 +1,3 @@
 """
-Compat. layer between LWR and Galaxy.
+Compat. layer between Pulsar and Galaxy.
 """
diff --git a/galaxy/objectstore/pulsar.py b/galaxy/objectstore/pulsar.py
index 7eca393e..08f51ea1 100644
--- a/galaxy/objectstore/pulsar.py
+++ b/galaxy/objectstore/pulsar.py
@@ -5,13 +5,13 @@ from pulsar.client.manager import ObjectStoreClientManager
 
 class PulsarObjectStore(ObjectStore):
     """
-    Object store implementation that delegates to a remote LWR server.
+    Object store implementation that delegates to a remote Pulsar server.
 
     This may be more aspirational than practical for now, it would be good to
     Galaxy to a point that a handler thread could be setup that doesn't attempt
     to access the disk files returned by a (this) object store - just passing
-    them along to the LWR unmodified. That modification - along with this
-    implementation and LWR job destinations would then allow Galaxy to fully
+    them along to the Pulsar unmodified. That modification - along with this
+    implementation and Pulsar job destinations would then allow Galaxy to fully
     manage jobs on remote servers with completely different mount points.
 
     This implementation should be considered beta and may be dropped from
diff --git a/galaxy/tools/deps/dependencies.py b/galaxy/tools/deps/dependencies.py
index 060b89cb..6dd372a7 100644
--- a/galaxy/tools/deps/dependencies.py
+++ b/galaxy/tools/deps/dependencies.py
@@ -8,7 +8,7 @@ class DependenciesDescription(object):
     related context required to resolve dependencies via the
     ToolShedPackageDependencyResolver.
 
-    This is meant to enable remote resolution of dependencies, by the LWR or
+    This is meant to enable remote resolution of dependencies, by the Pulsar or
     other potential remote execution mechanisms.
     """
 
@@ -39,7 +39,7 @@ class DependenciesDescription(object):
 
     @staticmethod
     def _toolshed_install_dependency_from_dict(as_dict):
-        # Rather than requiring full models in LWR, just use simple objects
+        # Rather than requiring full models in Pulsar, just use simple objects
         # containing only properties and associations used to resolve
         # dependencies for tool execution.
         repository_object = bunch.Bunch(
diff --git a/pulsar/client/action_mapper.py b/pulsar/client/action_mapper.py
index 2bfaae28..893ac1a4 100644
--- a/pulsar/client/action_mapper.py
+++ b/pulsar/client/action_mapper.py
@@ -248,7 +248,7 @@ class BaseAction(object):
 class NoneAction(BaseAction):
     """ This action indicates the corresponding path does not require any
     additional action. This should indicate paths that are available both on
-    the LWR client (i.e. Galaxy server) and remote LWR server with the same
+    the Pulsar client (i.e. Galaxy server) and remote Pulsar server with the same
     paths. """
     action_type = "none"
     staging = STAGING_ACTION_NONE
@@ -265,7 +265,7 @@ class NoneAction(BaseAction):
 
 
 class RewriteAction(BaseAction):
-    """ This actin indicates the LWR server should simply rewrite the path
+    """ This actin indicates the Pulsar server should simply rewrite the path
     to the specified file.
     """
     action_spec = dict(
@@ -305,25 +305,25 @@ class RewriteAction(BaseAction):
 
 
 class TransferAction(BaseAction):
-    """ This actions indicates that the LWR client should initiate an HTTP
-    transfer of the corresponding path to the remote LWR server before
+    """ This actions indicates that the Pulsar client should initiate an HTTP
+    transfer of the corresponding path to the remote Pulsar server before
     launching the job. """
     action_type = "transfer"
     staging = STAGING_ACTION_LOCAL
 
 
 class CopyAction(BaseAction):
-    """ This action indicates that the LWR client should execute a file system
-    copy of the corresponding path to the LWR staging directory prior to
+    """ This action indicates that the Pulsar client should execute a file system
+    copy of the corresponding path to the Pulsar staging directory prior to
     launching the corresponding job. """
     action_type = "copy"
     staging = STAGING_ACTION_LOCAL
 
 
 class RemoteCopyAction(BaseAction):
-    """ This action indicates the LWR server should copy the file before
+    """ This action indicates the Pulsar server should copy the file before
     execution via direct file system copy. This is like a CopyAction, but
-    it indicates the action should occur on the LWR server instead of on
+    it indicates the action should occur on the Pulsar server instead of on
     the client.
     """
     action_type = "remote_copy"
@@ -349,9 +349,9 @@ class RemoteCopyAction(BaseAction):
 
 
 class RemoteTransferAction(BaseAction):
-    """ This action indicates the LWR server should copy the file before
+    """ This action indicates the Pulsar server should copy the file before
     execution via direct file system copy. This is like a CopyAction, but
-    it indicates the action should occur on the LWR server instead of on
+    it indicates the action should occur on the Pulsar server instead of on
     the client.
     """
     action_type = "remote_transfer"
diff --git a/pulsar/client/client.py b/pulsar/client/client.py
index 1ad76822..0cdd55c9 100644
--- a/pulsar/client/client.py
+++ b/pulsar/client/client.py
@@ -52,7 +52,7 @@ class BaseJobClient(object):
 
     def setup(self, tool_id=None, tool_version=None):
         """
-        Setup remote LWR server to run this job.
+        Setup remote Pulsar server to run this job.
         """
         setup_args = {"job_id": self.job_id}
         if tool_id:
@@ -70,7 +70,7 @@ class BaseJobClient(object):
 
 class JobClient(BaseJobClient):
     """
-    Objects of this client class perform low-level communication with a remote LWR server.
+    Objects of this client class perform low-level communication with a remote Pulsar server.
 
     **Parameters**
 
@@ -107,7 +107,7 @@ class JobClient(BaseJobClient):
             launch_params['remote_staging'] = dumps(remote_staging)
         if job_config and self.setup_handler.local:
             # Setup not yet called, job properties were inferred from
-            # destination arguments. Hence, must have LWR setup job
+            # destination arguments. Hence, must have Pulsar setup job
             # before queueing.
             setup_params = _setup_params_from_job_config(job_config)
             launch_params["setup_params"] = dumps(setup_params)
@@ -135,7 +135,7 @@ class JobClient(BaseJobClient):
 
     def get_status(self):
         check_complete_response = self.raw_check_complete()
-        # Older LWR instances won't set status so use 'complete', at some
+        # Older Pulsar instances won't set status so use 'complete', at some
         # point drop backward compatibility.
         status = check_complete_response.get("status", None)
         return status
@@ -149,7 +149,7 @@ class JobClient(BaseJobClient):
     @parseJson()
     def remote_setup(self, **setup_args):
         """
-        Setup remote LWR server to run this job.
+        Setup remote Pulsar server to run this job.
         """
         return self._raw_execute("setup", setup_args)
 
@@ -169,7 +169,7 @@ class JobClient(BaseJobClient):
 
     def fetch_output(self, path, name, working_directory, action_type, output_type):
         """
-        Fetch (transfer, copy, etc...) an output from the remote LWR server.
+        Fetch (transfer, copy, etc...) an output from the remote Pulsar server.
 
         **Parameters**
 
@@ -181,9 +181,9 @@ class JobClient(BaseJobClient):
         working_directory : str
             Local working_directory for the job.
         action_type : str
-            Where to find file on LWR (output_workdir or output). legacy is also
-            an option in this case LWR is asked for location - this will only be
-            used if targetting an older LWR server that didn't return statuses
+            Where to find file on Pulsar (output_workdir or output). legacy is also
+            an option in this case Pulsar is asked for location - this will only be
+            used if targetting an older Pulsar server that didn't return statuses
             allowing this to be inferred.
         """
         if output_type == 'output_workdir':
@@ -207,7 +207,7 @@ class JobClient(BaseJobClient):
         ensure_directory(output_path)
         if action_type == 'transfer':
             self.__raw_download_output(name, self.job_id, path_type.OUTPUT_WORKDIR, output_path)
-        else:  # Even if action is none - LWR has a different work_dir so this needs to be copied.
+        else:  # Even if action is none - Pulsar has a different work_dir so this needs to be copied.
             pulsar_path = self._output_path(name, self.job_id, path_type.OUTPUT_WORKDIR)['path']
             copy(pulsar_path, output_path)
 
@@ -245,7 +245,7 @@ class BaseMessageJobClient(BaseJobClient):
     def __init__(self, destination_params, job_id, client_manager):
         super(BaseMessageJobClient, self).__init__(destination_params, job_id)
         if not self.job_directory:
-            error_message = "Message-queue based LWR client requires destination define a remote job_directory to stage files into."
+            error_message = "Message-queue based Pulsar client requires destination define a remote job_directory to stage files into."
             raise Exception(error_message)
         self.client_manager = client_manager
 
@@ -273,7 +273,7 @@ class BaseMessageJobClient(BaseJobClient):
             launch_params['remote_staging'] = remote_staging
         if job_config and self.setup_handler.local:
             # Setup not yet called, job properties were inferred from
-            # destination arguments. Hence, must have LWR setup job
+            # destination arguments. Hence, must have Pulsar setup job
             # before queueing.
             setup_params = _setup_params_from_job_config(job_config)
             launch_params["setup_params"] = setup_params
diff --git a/pulsar/client/interface.py b/pulsar/client/interface.py
index 1dc98fc6..dddeb81f 100644
--- a/pulsar/client/interface.py
+++ b/pulsar/client/interface.py
@@ -19,8 +19,8 @@ except ImportError:
 class PulsarInterface(object):
     """
     Abstract base class describes how synchronous client communicates with
-    (potentially remote) LWR procedures. Obvious implementation is HTTP based
-    but LWR objects wrapped in routes can also be directly communicated with
+    (potentially remote) Pulsar procedures. Obvious implementation is HTTP based
+    but Pulsar objects wrapped in routes can also be directly communicated with
     if in memory.
     """
     __metaclass__ = ABCMeta
@@ -28,7 +28,7 @@ class PulsarInterface(object):
     @abstractmethod
     def execute(self, command, args={}, data=None, input_path=None, output_path=None):
         """
-        Execute the correspond command against configured LWR job manager. Arguments are
+        Execute the correspond command against configured Pulsar job manager. Arguments are
         method parameters and data or input_path describe essentially POST bodies. If command
         results in a file, resulting path should be specified as output_path.
         """
@@ -85,7 +85,7 @@ class HttpPulsarInterface(PulsarInterface):
     def __init__(self, destination_params, transport):
         self.transport = transport
         remote_host = destination_params.get("url")
-        assert remote_host is not None, "Failed to determine url for LWR client."
+        assert remote_host is not None, "Failed to determine url for Pulsar client."
         if not remote_host.endswith("/"):
             remote_host = "%s/" % remote_host
         if not remote_host.startswith("http"):
diff --git a/pulsar/client/manager.py b/pulsar/client/manager.py
index b6fcdf57..95daa6a7 100644
--- a/pulsar/client/manager.py
+++ b/pulsar/client/manager.py
@@ -35,7 +35,7 @@ def build_client_manager(**kwargs):
 
 class ClientManager(object):
     """
-    Factory to create LWR clients, used to manage potential shared
+    Factory to create Pulsar clients, used to manage potential shared
     state between multiple client connections.
     """
     def __init__(self, **kwds):
@@ -51,12 +51,12 @@ class ClientManager(object):
         if cache is None:
             cache = _environ_default_int('LWR_CACHE_TRANSFERS')
         if cache:
-            log.info("Setting LWR client class to caching variant.")
+            log.info("Setting Pulsar client class to caching variant.")
             self.client_cacher = ClientCacher(**kwds)
             self.client_class = InputCachingJobClient
             self.extra_client_kwds = {"client_cacher": self.client_cacher}
         else:
-            log.info("Setting LWR client class to standard, non-caching variant.")
+            log.info("Setting Pulsar client class to standard, non-caching variant.")
             self.client_class = JobClient
             self.extra_client_kwds = {}
 
@@ -128,7 +128,7 @@ class MessageQueueClientManager(object):
 
     def get_client(self, destination_params, job_id, **kwargs):
         if job_id is None:
-            raise Exception("Cannot generate LWR client for empty job_id.")
+            raise Exception("Cannot generate Pulsar client for empty job_id.")
         destination_params = _parse_destination_params(destination_params)
         destination_params.update(**kwargs)
         if 'shell_plugin' in destination_params:
diff --git a/pulsar/client/path_mapper.py b/pulsar/client/path_mapper.py
index 758c0901..02089117 100644
--- a/pulsar/client/path_mapper.py
+++ b/pulsar/client/path_mapper.py
@@ -8,11 +8,11 @@ from galaxy.util import in_directory
 
 class PathMapper(object):
     """ Ties together a FileActionMapper and remote job configuration returned
-    by the LWR setup method to pre-determine the location of files for staging
-    on the remote LWR server.
+    by the Pulsar setup method to pre-determine the location of files for staging
+    on the remote Pulsar server.
 
     This is not useful when rewrite_paths (as has traditionally been done with
-    the LWR) because when doing that the LWR determines the paths as files are
+    the Pulsar) because when doing that the Pulsar determines the paths as files are
     uploaded. When rewrite_paths is disabled however, the destination of files
     needs to be determined prior to transfer so an object of this class can be
     used.
diff --git a/pulsar/client/setup_handler.py b/pulsar/client/setup_handler.py
index 19906edf..b61931eb 100644
--- a/pulsar/client/setup_handler.py
+++ b/pulsar/client/setup_handler.py
@@ -18,7 +18,7 @@ def build(client, destination_args):
 class LocalSetupHandler(object):
     """ Parse destination params to infer job setup parameters (input/output
     directories, etc...). Default is to get this configuration data from the
-    remote LWR server.
+    remote Pulsar server.
 
     Downside of this approach is that it requires more and more dependent
     configuraiton of Galaxy. Upside is that it is asynchronous and thus makes
@@ -56,7 +56,7 @@ class LocalSetupHandler(object):
 
 
 class RemoteSetupHandler(object):
-    """ Default behavior. Fetch setup information from remote LWR server.
+    """ Default behavior. Fetch setup information from remote Pulsar server.
     """
     def __init__(self, client):
         self.client = client
diff --git a/pulsar/client/staging/__init__.py b/pulsar/client/staging/__init__.py
index 231a09f6..7b0a47c3 100644
--- a/pulsar/client/staging/__init__.py
+++ b/pulsar/client/staging/__init__.py
@@ -120,7 +120,7 @@ class ClientOutputs(object):
 
 
 class PulsarOutputs(object):
-    """ Abstraction describing the output files PRODUCED by the remote LWR
+    """ Abstraction describing the output files PRODUCED by the remote Pulsar
     server. """
 
     def __init__(self, working_directory_contents, output_directory_contents, remote_separator=sep):
@@ -131,10 +131,10 @@ class PulsarOutputs(object):
     @staticmethod
     def from_status_response(complete_response):
         # Default to None instead of [] to distinguish between empty contents and it not set
-        # by the LWR - older LWR instances will not set these in complete response.
+        # by the Pulsar - older Pulsar instances will not set these in complete response.
         working_directory_contents = complete_response.get("working_directory_contents")
         output_directory_contents = complete_response.get("outputs_directory_contents")
-        # Older (pre-2014) LWR servers will not include separator in response,
+        # Older (pre-2014) Pulsar servers will not include separator in response,
         # so this should only be used when reasoning about outputs in
         # subdirectories (which was not previously supported prior to that).
         remote_separator = complete_response.get("system_properties", {}).get("separator", sep)
diff --git a/pulsar/client/staging/down.py b/pulsar/client/staging/down.py
index d4b3d59b..e3adf9d7 100644
--- a/pulsar/client/staging/down.py
+++ b/pulsar/client/staging/down.py
@@ -19,7 +19,7 @@ COPY_FROM_WORKING_DIRECTORY_PATTERN = compile(r"primary_.*|galaxy.json|metadata_
 
 def finish_job(client, cleanup_job, job_completed_normally, client_outputs, pulsar_outputs):
     """ Responsible for downloading results from remote server and cleaning up
-    LWR staging directory (if needed.)
+    Pulsar staging directory (if needed.)
     """
     collection_failure_exceptions = []
     if job_completed_normally:
@@ -37,7 +37,7 @@ class ClientOutputCollector(object):
         self.client = client
 
     def collect_output(self, results_collector, output_type, action, name):
-        # This output should have been handled by the LWR.
+        # This output should have been handled by the Pulsar.
         if not action.staging_action_local:
             return False
 
@@ -86,7 +86,7 @@ class ResultsCollector(object):
                 raise Exception("Failed to remove %s from %s" % (output_file, self.output_files))
 
     def __collect_outputs(self):
-        # Legacy LWR not returning list of files, iterate over the list of
+        # Legacy Pulsar not returning list of files, iterate over the list of
         # expected outputs for tool.
         for output_file in self.output_files:
             # Fetch output directly...
@@ -117,7 +117,7 @@ class ResultsCollector(object):
 
     def _attempt_collect_output(self, output_type, path, name=None):
         # path is final path on galaxy server (client)
-        # name is the 'name' of the file on the LWR server (possible a relative)
+        # name is the 'name' of the file on the Pulsar server (possible a relative)
         # path.
         collected = False
         with self.exception_tracker():
@@ -150,6 +150,6 @@ def __clean(collection_failure_exceptions, cleanup_job, client):
         try:
             client.clean()
         except Exception:
-            log.warn("Failed to cleanup remote LWR job")
+            log.warn("Failed to cleanup remote Pulsar job")
 
 __all__ = [finish_job]
diff --git a/pulsar/client/staging/up.py b/pulsar/client/staging/up.py
index c8996fd8..9712e69e 100644
--- a/pulsar/client/staging/up.py
+++ b/pulsar/client/staging/up.py
@@ -46,13 +46,13 @@ def submit_job(client, client_job_description, job_config=None):
 
 class FileStager(object):
     """
-    Objects of the FileStager class interact with an LWR client object to
-    stage the files required to run jobs on a remote LWR server.
+    Objects of the FileStager class interact with an Pulsar client object to
+    stage the files required to run jobs on a remote Pulsar server.
 
     **Parameters**
 
     client : JobClient
-        LWR client object.
+        Pulsar client object.
     client_job_description : client_job_description
         Description of client view of job to stage and execute remotely.
     """
@@ -74,7 +74,7 @@ class FileStager(object):
         self.rewrite_paths = client_job_description.rewrite_paths
 
         # Setup job inputs, these will need to be rewritten before
-        # shipping off to remote LWR server.
+        # shipping off to remote Pulsar server.
         self.job_inputs = JobInputs(self.command_line, self.config_files)
 
         self.action_mapper = FileActionMapper(client)
@@ -109,23 +109,23 @@ class FileStager(object):
         self.new_working_directory = job_config['working_directory']
         self.new_outputs_directory = job_config['outputs_directory']
         # Default configs_directory to match remote working_directory to mimic
-        # behavior of older LWR servers.
+        # behavior of older Pulsar servers.
         self.new_configs_directory = job_config.get('configs_directory', self.new_working_directory)
         self.remote_separator = self.__parse_remote_separator(job_config)
         self.path_helper = PathHelper(self.remote_separator)
-        # If remote LWR server assigned job id, use that otherwise
+        # If remote Pulsar server assigned job id, use that otherwise
         # just use local job_id assigned.
         galaxy_job_id = self.client.job_id
         self.job_id = job_config.get('job_id', galaxy_job_id)
         if self.job_id != galaxy_job_id:
-            # Remote LWR server assigned an id different than the
+            # Remote Pulsar server assigned an id different than the
             # Galaxy job id, update client to reflect this.
             self.client.job_id = self.job_id
         self.job_config = job_config
 
     def __parse_remote_separator(self, job_config):
         separator = job_config.get("system_properties", {}).get("separator", None)
-        if not separator:  # Legacy LWR
+        if not separator:  # Legacy Pulsar
             separator = job_config["path_separator"]  # Poorly named
         return separator
 
@@ -165,7 +165,7 @@ class FileStager(object):
             if exists(input_file):
                 self.transfer_tracker.handle_transfer(input_file, path_type.INPUT)
             else:
-                message = "LWR: __upload_input_file called on empty or missing dataset." + \
+                message = "Pulsar: __upload_input_file called on empty or missing dataset." + \
                           " So such file: [%s]" % input_file
                 log.debug(message)
 
diff --git a/pulsar/client/transport/curl.py b/pulsar/client/transport/curl.py
index 4e8cd224..9594c719 100644
--- a/pulsar/client/transport/curl.py
+++ b/pulsar/client/transport/curl.py
@@ -10,7 +10,7 @@ from os.path import getsize
 
 
 PYCURL_UNAVAILABLE_MESSAGE = \
-    "You are attempting to use the Pycurl version of the LWR client but pycurl is unavailable."
+    "You are attempting to use the Pycurl version of the Pulsar client but pycurl is unavailable."
 
 
 class PycurlTransport(object):
diff --git a/pulsar/client/transport/standard.py b/pulsar/client/transport/standard.py
index 8191ed7e..999ecce5 100644
--- a/pulsar/client/transport/standard.py
+++ b/pulsar/client/transport/standard.py
@@ -1,5 +1,5 @@
 """
-LWR HTTP Client layer based on Python Standard Library (urllib2)
+Pulsar HTTP Client layer based on Python Standard Library (urllib2)
 """
 from __future__ import with_statement
 from os.path import getsize
diff --git a/pulsar/client/util.py b/pulsar/client/util.py
index 62f5aba3..04908db6 100644
--- a/pulsar/client/util.py
+++ b/pulsar/client/util.py
@@ -90,7 +90,7 @@ class PathHelper(object):
     '''
 
     >>> import posixpath
-    >>> # Forcing local path to posixpath because LWR designed to be used with
+    >>> # Forcing local path to posixpath because Pulsar designed to be used with
     >>> # posix client.
     >>> posix_path_helper = PathHelper("/", local_path_module=posixpath)
     >>> windows_slash = "\\\\"
diff --git a/pulsar/core.py b/pulsar/core.py
index ef7751e2..386b8bd7 100644
--- a/pulsar/core.py
+++ b/pulsar/core.py
@@ -22,7 +22,7 @@ DEFAULT_STAGING_DIRECTORY = os.path.join(DEFAULT_FILES_DIRECTORY, "staging")
 DEFAULT_PERSISTENCE_DIRECTORY = os.path.join(DEFAULT_FILES_DIRECTORY, "persisted_data")
 
 
-NOT_WHITELIST_WARNING = "Starting the LWR without a toolbox to white-list." + \
+NOT_WHITELIST_WARNING = "Starting the Pulsar without a toolbox to white-list." + \
                         "Ensure this application is protected by firewall or a configured private token."
 
 
diff --git a/pulsar/daemon.py b/pulsar/daemon.py
index ad66bc56..e9f53c88 100644
--- a/pulsar/daemon.py
+++ b/pulsar/daemon.py
@@ -54,7 +54,7 @@ def load_pulsar_app(
     if log is None:
         log = logging.getLogger(__name__)
 
-    # If called in daemon mode, set the ROOT directory and ensure LWR is on
+    # If called in daemon mode, set the ROOT directory and ensure Pulsar is on
     # sys.path.
     if config_env:
         try:
@@ -65,7 +65,7 @@ def load_pulsar_app(
         try:
             sys.path.append(os.path.join(LWR_ROOT_DIR))
         except Exception:
-            log.exception("Failed to add LWR to sys.path")
+            log.exception("Failed to add Pulsar to sys.path")
             raise
 
     config_builder.setup_logging()
@@ -103,7 +103,7 @@ def app_loop(args):
             log=log,
         )
     except BaseException:
-        log.exception("Failed to initialize LWR application")
+        log.exception("Failed to initialize Pulsar application")
         raise
     try:
         # Hmmmm... not sure what to do in here this was example though...
@@ -114,7 +114,7 @@ def app_loop(args):
     try:
         pulsar_app.shutdown()
     except Exception:
-        log.exception("Failed to shutdown LWR application")
+        log.exception("Failed to shutdown Pulsar application")
         raise
 
 
@@ -180,7 +180,7 @@ class PulsarManagerConfigBuilder(PulsarConfigBuilder):
 
 def main():
     if Daemonize is None:
-        raise ImportError("Attempted to use LWR in daemon mode, but daemonize is unavailable.")
+        raise ImportError("Attempted to use Pulsar in daemon mode, but daemonize is unavailable.")
 
     arg_parser = ArgumentParser(description=DESCRIPTION)
     PulsarConfigBuilder.populate_options(arg_parser)
diff --git a/pulsar/locks.py b/pulsar/locks.py
index 15a5d231..c2b4f7f7 100644
--- a/pulsar/locks.py
+++ b/pulsar/locks.py
@@ -8,7 +8,7 @@ import threading
 import logging
 log = logging.getLogger(__name__)
 
-NO_PYLOCKFILE_MESSAGE = "pylockfile module not found, expect suboptimal LWR lock handling."
+NO_PYLOCKFILE_MESSAGE = "pylockfile module not found, expect suboptimal Pulsar lock handling."
 
 
 class LockManager():
diff --git a/pulsar/manager_endpoint_util.py b/pulsar/manager_endpoint_util.py
index bb2b1258..6f6da36f 100644
--- a/pulsar/manager_endpoint_util.py
+++ b/pulsar/manager_endpoint_util.py
@@ -17,7 +17,7 @@ def full_status(manager, job_status, job_id):
 
 def __job_complete_dict(complete_status, manager, job_id):
     """ Build final dictionary describing completed job for consumption by
-    LWR client.
+    Pulsar client.
     """
     return_code = manager.return_code(job_id)
     if return_code == LWR_UNKNOWN_RETURN_CODE:
diff --git a/pulsar/managers/queued.py b/pulsar/managers/queued.py
index 5f343703..637b6a97 100644
--- a/pulsar/managers/queued.py
+++ b/pulsar/managers/queued.py
@@ -76,7 +76,7 @@ class QueueManager(Manager):
                 try:
                     os.remove(self._job_file(job_id, JOB_FILE_COMMAND_LINE))
                 except Exception:
-                    log.exception("Running command but failed to delete - command may rerun on LWR boot.")
+                    log.exception("Running command but failed to delete - command may rerun on Pulsar boot.")
                 self._run(job_id, command_line, async=False)
             except:
                 log.warn("Uncaught exception running job with job_id %s" % job_id)
diff --git a/pulsar/managers/queued_cli.py b/pulsar/managers/queued_cli.py
index 54d936fc..74893bdc 100644
--- a/pulsar/managers/queued_cli.py
+++ b/pulsar/managers/queued_cli.py
@@ -1,5 +1,5 @@
 """
-LWR job manager that uses a CLI interface to a job queue (e.g. Torque's qsub,
+Pulsar job manager that uses a CLI interface to a job queue (e.g. Torque's qsub,
 qstat, etc...).
 """
 
diff --git a/pulsar/managers/queued_drmaa.py b/pulsar/managers/queued_drmaa.py
index 64a86c7f..4ef4d6f9 100644
--- a/pulsar/managers/queued_drmaa.py
+++ b/pulsar/managers/queued_drmaa.py
@@ -20,7 +20,7 @@ class DrmaaQueueManager(BaseDrmaaManager):
             submit_params=submit_params,
         )
         external_id = self.drmaa_session.run_job(**attributes)
-        log.info("Submitted DRMAA job with LWR job id %s and external id %s", job_id, external_id)
+        log.info("Submitted DRMAA job with Pulsar job id %s and external id %s", job_id, external_id)
         self._register_external_id(job_id, external_id)
 
     def _kill_external(self, external_id):
diff --git a/pulsar/managers/staging/__init__.py b/pulsar/managers/staging/__init__.py
index 9134436e..3d7934c9 100644
--- a/pulsar/managers/staging/__init__.py
+++ b/pulsar/managers/staging/__init__.py
@@ -1,4 +1,4 @@
-""" This module contains the code that allows the LWR to stage file's during
+""" This module contains the code that allows the Pulsar to stage file's during
 preprocessing (currently this means downloading or copying files) and then unstage
 or send results back to client during postprocessing.
 
diff --git a/pulsar/managers/stateful.py b/pulsar/managers/stateful.py
index 3cabe850..87b0f279 100644
--- a/pulsar/managers/stateful.py
+++ b/pulsar/managers/stateful.py
@@ -13,8 +13,8 @@ log = logging.getLogger(__name__)
 
 DEFAULT_DO_MONITOR = False
 
-DECACTIVATE_FAILED_MESSAGE = "Failed to deactivate job with job id %s. May be problems when starting LWR next."
-ACTIVATE_FAILED_MESSAGE = "Failed to activate job wiht job id %s. This job may not recover properly upon LWR restart."
+DECACTIVATE_FAILED_MESSAGE = "Failed to deactivate job with job id %s. May be problems when starting Pulsar next."
+ACTIVATE_FAILED_MESSAGE = "Failed to activate job wiht job id %s. This job may not recover properly upon Pulsar restart."
 
 JOB_FILE_FINAL_STATUS = "final_status"
 JOB_FILE_POSTPROCESSED = "postprocessed"
diff --git a/pulsar/managers/unqueued.py b/pulsar/managers/unqueued.py
index 21ef369d..3802d5c0 100644
--- a/pulsar/managers/unqueued.py
+++ b/pulsar/managers/unqueued.py
@@ -27,7 +27,7 @@ JOB_FILE_PID = "pid"
 class Manager(DirectoryBaseManager):
     """
     A simple job manager that just directly runs jobs as given (no
-    queueing). Preserved for compatibilty with older versions of LWR
+    queueing). Preserved for compatibilty with older versions of Pulsar
     client code where Galaxy is used to maintain queue (like Galaxy's
     local job runner).
 
diff --git a/pulsar/managers/util/__init__.py b/pulsar/managers/util/__init__.py
index 79ec002b..aff63231 100644
--- a/pulsar/managers/util/__init__.py
+++ b/pulsar/managers/util/__init__.py
@@ -1,7 +1,7 @@
 """
 This module and its submodules contains utilities for running external
 processes and interfacing with job managers. This module should contain
-functionality shared between Galaxy and the LWR.
+functionality shared between Galaxy and the Pulsar.
 """
 from galaxy.util.bunch import Bunch
 
diff --git a/pulsar/managers/util/cli/job/slurm.py b/pulsar/managers/util/cli/job/slurm.py
index 95350d73..c3fe4379 100644
--- a/pulsar/managers/util/cli/job/slurm.py
+++ b/pulsar/managers/util/cli/job/slurm.py
@@ -5,7 +5,7 @@ try:
     from galaxy.model import Job
     job_states = Job.states
 except ImportError:
-    # Not in Galaxy, map Galaxy job states to LWR ones.
+    # Not in Galaxy, map Galaxy job states to Pulsar ones.
     from galaxy.util import enum
     job_states = enum(RUNNING='running', OK='complete', QUEUED='queued')
 
diff --git a/pulsar/managers/util/cli/job/torque.py b/pulsar/managers/util/cli/job/torque.py
index 9159827b..6cf7bcae 100644
--- a/pulsar/managers/util/cli/job/torque.py
+++ b/pulsar/managers/util/cli/job/torque.py
@@ -7,7 +7,7 @@ try:
     from galaxy.model import Job
     job_states = Job.states
 except ImportError:
-    # Not in Galaxy, map Galaxy job states to LWR ones.
+    # Not in Galaxy, map Galaxy job states to Pulsar ones.
     from galaxy.util import enum
     job_states = enum(RUNNING='running', OK='complete', QUEUED='queued')
 
diff --git a/pulsar/mesos/__init__.py b/pulsar/mesos/__init__.py
index 7b981895..e16273b2 100644
--- a/pulsar/mesos/__init__.py
+++ b/pulsar/mesos/__init__.py
@@ -33,7 +33,7 @@ NO_MESOS_PROTO_EXCEPTION = "Failed to import mesos_pbs module, please install me
 def ensure_mesos_libs():
     """ Raise import error if mesos is not actually available. Original
     import errors above supressed because mesos is meant as an optional
-    dependency for the LWR.
+    dependency for the Pulsar.
     """
 
     if MesosSchedulerDriver is None:
diff --git a/pulsar/messaging/bind_amqp.py b/pulsar/messaging/bind_amqp.py
index 7c0dd5e9..2e694a44 100644
--- a/pulsar/messaging/bind_amqp.py
+++ b/pulsar/messaging/bind_amqp.py
@@ -52,12 +52,12 @@ def bind_manager_to_queue(manager, queue_state, connection_string, conf):
     # has occurred.
     def bind_on_status_change(new_status, job_id):
         try:
-            message = "Publishing LWR state change with status %s for job_id %s" % (new_status, job_id)
+            message = "Publishing Pulsar state change with status %s for job_id %s" % (new_status, job_id)
             log.debug(message)
             payload = manager_endpoint_util.full_status(manager, new_status, job_id)
             pulsar_exchange.publish("status_update", payload)
         except:
-            log.exception("Failure to publish LWR state change.")
+            log.exception("Failure to publish Pulsar state change.")
             raise
 
     if conf.get("message_queue_publish", True):
diff --git a/pulsar/scripts/mesos_executor.py b/pulsar/scripts/mesos_executor.py
index e05d4544..7848791f 100644
--- a/pulsar/scripts/mesos_executor.py
+++ b/pulsar/scripts/mesos_executor.py
@@ -73,7 +73,7 @@ def run_executor():
     arg_parser.parse_args()
 
     ensure_mesos_libs()
-    log.info("Starting LWR executor")
+    log.info("Starting Pulsar executor")
     driver = MesosExecutorDriver(PulsarExecutor())
     exit_code = 0
     if not driver.run() == mesos_pb2.DRIVER_STOPPED:
diff --git a/pulsar/scripts/submit.py b/pulsar/scripts/submit.py
index 12d462fb..10b101c2 100644
--- a/pulsar/scripts/submit.py
+++ b/pulsar/scripts/submit.py
@@ -59,7 +59,7 @@ def manager_from_args(config_builder):
 
     pulsar_app = load_pulsar_app(
         config_builder,
-        # Set message_queue_consume so this LWR app doesn't try to consume
+        # Set message_queue_consume so this Pulsar app doesn't try to consume
         # setup/kill messages and only publishes status updates to configured
         # queue.
         message_queue_consume=False,
diff --git a/pulsar/tools/authorization.py b/pulsar/tools/authorization.py
index 2c63e4ca..bec80b53 100644
--- a/pulsar/tools/authorization.py
+++ b/pulsar/tools/authorization.py
@@ -18,7 +18,7 @@ class AllowAnyAuthorization(object):
 
 class AllowAnyAuthorizer(object):
     """
-    Allow any, by default LWR is assumed to be secured
+    Allow any, by default Pulsar is assumed to be secured
     using a firewall or private_token.
     """
     ALLOW_ANY_AUTHORIZATION = AllowAnyAuthorization()
@@ -37,7 +37,7 @@ class ToolBasedAuthorization(AllowAnyAuthorization):
 
     def authorize_setup(self):
         if self.tool is None:
-            self.__unauthorized("Attempt to setup a tool with id not registered with LWR toolbox.")
+            self.__unauthorized("Attempt to setup a tool with id not registered with Pulsar toolbox.")
 
     def authorize_tool_file(self, name, contents):
         tool = self.tool
@@ -45,7 +45,7 @@ class ToolBasedAuthorization(AllowAnyAuthorization):
         tool_dir_file = join(tool_dir, name)
         allowed_contents = open(tool_dir_file).read()
         if contents != allowed_contents:
-            self.__unauthorized("Attempt to write tool file with contents differing from LWR copy of tool file.")
+            self.__unauthorized("Attempt to write tool file with contents differing from Pulsar copy of tool file.")
 
     def authorize_config_file(self, job_directory, name, path):
         if not self.__inputs_validator.validate_configfile(job_directory, name, path):
diff --git a/pulsar/web/__init__.py b/pulsar/web/__init__.py
index 7ec06b77..a9a657ad 100644
--- a/pulsar/web/__init__.py
+++ b/pulsar/web/__init__.py
@@ -1,4 +1,4 @@
-""" The code explicitly related to the LWR web server can be found in this
+""" The code explicitly related to the Pulsar web server can be found in this
 module and its submodules.
 
 
diff --git a/pulsar/web/framework.py b/pulsar/web/framework.py
index f4dc08cd..c913552c 100644
--- a/pulsar/web/framework.py
+++ b/pulsar/web/framework.py
@@ -1,5 +1,5 @@
 """
-Tiny framework used to power LWR application, nothing in here is specific to running
+Tiny framework used to power Pulsar application, nothing in here is specific to running
 or staging jobs. Mostly deals with routing web traffic and parsing parameters.
 """
 from webob import Request
diff --git a/pulsar/web/wsgi.py b/pulsar/web/wsgi.py
index f84b3884..e115cef3 100644
--- a/pulsar/web/wsgi.py
+++ b/pulsar/web/wsgi.py
@@ -9,7 +9,7 @@ import pulsar.web.routes
 
 def app_factory(global_conf, **local_conf):
     """
-    Returns the LWR WSGI application.
+    Returns the Pulsar WSGI application.
     """
     pulsar_app = PulsarApp(global_conf=global_conf, **local_conf)
     webapp = PulsarWebApp(pulsar_app=pulsar_app)
@@ -19,7 +19,7 @@ def app_factory(global_conf, **local_conf):
 
 class PulsarWebApp(RoutingApp):
     """
-    Web application for LWR web server.
+    Web application for Pulsar web server.
     """
 
     def __init__(self, pulsar_app):
diff --git a/test/integration_test.py b/test/integration_test.py
index 0d7d6269..dbda94ac 100644
--- a/test/integration_test.py
+++ b/test/integration_test.py
@@ -30,7 +30,7 @@ class BaseIntegrationTest(TempDirectoryTestCase):
             # Client directory hasn't bee created yet, don't restrict where
             # test files written.
             # Can only run tests using files_server if not constructing a test
-            # server for LWR - webtest doesn't seem to like having two test
+            # server for Pulsar - webtest doesn't seem to like having two test
             # servers alive at same time.
             with files_server("/") as test_files_server:
                 files_endpoint = test_files_server.application_url
-- 
GitLab