Repository: DataBiosphere/toil

Issue:
Remove toil restart (resolves #807, resolves #805)
And update docs to reflect this. Issue #805 is a ticket to fix toil restart so this PR also indirectly resolves that ticket. 



Discussion:

Resolving patch:
diff --git a/src/toil/jobStores/abstractJobStore.py b/src/toil/jobStores/abstractJobStore.py
--- a/src/toil/jobStores/abstractJobStore.py
+++ b/src/toil/jobStores/abstractJobStore.py
@@ -224,10 +224,10 @@ def _checkJobStoreCreation(create, exists, jobStoreString):
         :raise JobStoreCreationException:  if create == exists
         """
         if create and exists:
-            raise JobStoreCreationException("The job store '%s' already exists. Use --restart or "
-                                            "'toil restart' to resume the workflow, or remove the "
-                                            "job store with 'toil clean' to start the workflow "
-                                            "from scratch" % jobStoreString)
+            raise JobStoreCreationException("The job store '%s' already exists. Use --restart to "
+                                            "resume the workflow, or remove the job store with "
+                                            "'toil clean' to start the workflow from scratch" %
+                                            jobStoreString) 
         if not create and not exists:
             raise JobStoreCreationException("The job store '%s' does not exist, so there "
                                             "is nothing to restart." % jobStoreString)
diff --git a/src/toil/utils/toilMain.py b/src/toil/utils/toilMain.py
--- a/src/toil/utils/toilMain.py
+++ b/src/toil/utils/toilMain.py
@@ -32,7 +32,7 @@ def main():
 
 def loadModules():
     # noinspection PyUnresolvedReferences
-    from toil.utils import toilKill, toilRestart, toilStats, toilStatus, toilClean
+    from toil.utils import toilKill, toilStats, toilStatus, toilClean
     return {name[4:].lower(): module for name, module in locals().iteritems()}
 
 
diff --git a/src/toil/utils/toilRestart.py b/src/toil/utils/toilRestart.py
deleted file mode 100644
--- a/src/toil/utils/toilRestart.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (C) 2015 UCSC Computational Genomics Lab
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""A script to setup and run a hierarchical run of cluster jobs.
-"""
-
-from __future__ import absolute_import
-
-from toil.lib.bioio import getBasicOptionParser
-from toil.lib.bioio import parseBasicOptions
-
-from toil.common import Toil
-from toil.lib.bioio import setLoggingFromOptions
-from toil.version import version
-import logging
-logger = logging.getLogger( __name__ )
-
-def main():
-    """Restarts a toil workflow.
-    """
-    
-    ##########################################
-    #Construct the arguments.
-    ##########################################  
-
-    parser = getBasicOptionParser()
-
-    parser.add_argument("--version", action='version', version=version)
-
-    parser.add_argument("jobStore", type=str,
-          help=("Store in which to place job management files \
-          and the global accessed temporary files"
-          "(If this is a file path this needs to be globally accessible "
-          "by all machines running jobs).\n"
-          "If the store already exists and restart is false an"
-          " ExistingJobStoreException exception will be thrown."))
-
-    options = parseBasicOptions(parser)
-        
-    ##########################################
-    #Now run the toil construction/leader
-    ##########################################  
-        
-    setLoggingFromOptions(options)
-    options.restart = True
-
-    with Toil(options) as toil:
-        toil.run()
-
-    
-def _test():
-    import doctest      
-    return doctest.testmod()


Test patch:
diff --git a/src/toil/test/utils/utilsTest.py b/src/toil/test/utils/utilsTest.py
--- a/src/toil/test/utils/utilsTest.py
+++ b/src/toil/test/utils/utilsTest.py
@@ -74,8 +74,8 @@ def statusCommand(self):
 
     def testUtilsSort(self):
         """
-        Tests the restart, status and stats commands of the toil command line utility using the
-        sort example.
+        Tests the status and stats commands of the toil command line utility using the
+        sort example with the --restart flag.
         """
         # Get the sort command to run
         toilCommand = [sys.executable,