Skip to content

Commit

Permalink
Merge pull request #17 from lsst/tickets/DM-22234-ctrl_orca
Browse files Browse the repository at this point in the history
DM-22234: Remove Python 2 support
  • Loading branch information
timj committed Nov 20, 2019
2 parents b63ae42 + 15067fe commit 36382b0
Show file tree
Hide file tree
Showing 34 changed files with 17 additions and 79 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.coverage
.sconsign.dblite
config.log
.sconf_temp
Expand Down
1 change: 0 additions & 1 deletion bin.src/filewaiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
import os
import os.path
import sys
Expand Down
3 changes: 0 additions & 3 deletions bin.src/orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#


from __future__ import with_statement
from __future__ import print_function
import os
import os.path
import optparse
Expand Down
2 changes: 0 additions & 2 deletions etc/condor/scripts/generateDag.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
from builtins import str
import argparse
import sys
import shlex
Expand Down
6 changes: 1 addition & 5 deletions python/lsst/ctrl/orca/CondorJobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#


from __future__ import print_function
from builtins import str
from builtins import object
import os
import subprocess
import re
import time
import lsst.log as log


class CondorJobs(object):
class CondorJobs:
"""Handles interaction with HTCondor
This class is highly dependent on the output of the condor commands
condor_submit and condor_q
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/CondorWorkflowConfigurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from builtins import str
import stat
import sys
import os
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/CondorWorkflowLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
import os
import lsst.log as log
from lsst.ctrl.orca.WorkflowLauncher import WorkflowLauncher
Expand Down
2 changes: 0 additions & 2 deletions python/lsst/ctrl/orca/CondorWorkflowMonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import with_statement
from __future__ import print_function
import threading
import time
import lsst.log as log
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/ctrl/orca/DatabaseConfigurator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from builtins import object
#
# LSST Data Management System
# Copyright 2008-2017 LSST Corporation.
Expand Down Expand Up @@ -29,7 +28,7 @@
#


class DatabaseConfigurator(object):
class DatabaseConfigurator:
"""Configures a database for use.
Parameters
Expand Down
4 changes: 1 addition & 3 deletions python/lsst/ctrl/orca/Directories.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#


from builtins import object
import lsst.pex.exceptions as pexExcept

import lsst.daf.base as dafBase

import os


class Directories(object):
class Directories:
"""Determine the various directory roots that can be used by a pipeline
This class takes a "dir" config and a run identifier and converts the
values into a set of directory paths that a pipeline is allowed to use.
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/ctrl/orca/EnvString.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from builtins import object
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand All @@ -25,7 +24,7 @@
import os


class EnvString(object):
class EnvString:
def resolve(strVal):
"""Replace environment variables within a string
Expand Down
7 changes: 1 addition & 6 deletions python/lsst/ctrl/orca/FileWaiter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand All @@ -22,14 +20,11 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#


from __future__ import print_function
from builtins import object
import os
import lsst.log as log


class FileWaiter(object):
class FileWaiter:
# @brief initializer
"""Waits for files to come into existence on a remote resource
Parameters
Expand Down
4 changes: 1 addition & 3 deletions python/lsst/ctrl/orca/NamedClassFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from builtins import object


class NamedClassFactory(object):
class NamedClassFactory:
"""Create a new "name" class object
Parameters
Expand Down
4 changes: 0 additions & 4 deletions python/lsst/ctrl/orca/PegasusJobs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# LSST Data Management System
# Copyright 2017 LSST Corporation.
Expand All @@ -22,8 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#


from __future__ import print_function
import subprocess
import re
import lsst.log as log
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/PegasusWorkflowLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
import os
import lsst.log as log
from lsst.ctrl.orca.WorkflowLauncher import WorkflowLauncher
Expand Down
4 changes: 1 addition & 3 deletions python/lsst/ctrl/orca/ProductionRunConfigurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
from builtins import object
from lsst.ctrl.orca.NamedClassFactory import NamedClassFactory
from lsst.ctrl.orca.WorkflowManager import WorkflowManager
from lsst.ctrl.orca.config.ProductionConfig import ProductionConfig
from lsst.ctrl.orca.exceptions import MultiIssueConfigurationError
import lsst.log as log


class ProductionRunConfigurator(object):
class ProductionRunConfigurator:
"""Create a basic production run.
Parameters
Expand Down
7 changes: 1 addition & 6 deletions python/lsst/ctrl/orca/ProductionRunManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import with_statement
from __future__ import print_function
from __future__ import absolute_import
from builtins import object

import os
import os.path
import socket
Expand Down Expand Up @@ -53,7 +48,7 @@ def __init__(self, *args, **kwargs):
return CustomHandler


class ProductionRunManager(object):
class ProductionRunManager:
"""In charge of launching, monitoring, managing, and stopping a production run
Parameters
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/ctrl/orca/StatusListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from builtins import object
import lsst.log as log


class StatusListener(object):
class StatusListener:
"""Used receive messages about changes in a workflow
"""

Expand Down
4 changes: 1 addition & 3 deletions python/lsst/ctrl/orca/TemplateWriter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from builtins import str
from builtins import object
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down Expand Up @@ -30,7 +28,7 @@
#


class TemplateWriter(object):
class TemplateWriter:
"""Takes templates and subtitutes the values for the given keys,
writing a new file generated from the template.
"""
Expand Down
7 changes: 2 additions & 5 deletions python/lsst/ctrl/orca/WorkflowConfigurator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import print_function
from builtins import range
from builtins import object
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down Expand Up @@ -33,7 +30,7 @@
#


class WorkflowConfigurator(object):
class WorkflowConfigurator:
"""Abstract class for configuring a workflow
Parameters
Expand All @@ -55,7 +52,7 @@ class WorkflowConfigurator(object):
"""

# configuration group
class ConfigGroup(object):
class ConfigGroup:
"""Configuration group
Parameters
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/ctrl/orca/WorkflowLauncher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from builtins import object
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down Expand Up @@ -32,7 +31,7 @@
#


class WorkflowLauncher(object):
class WorkflowLauncher:
##
# @brief
#
Expand Down
4 changes: 1 addition & 3 deletions python/lsst/ctrl/orca/WorkflowManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
from builtins import object
from lsst.ctrl.orca.NamedClassFactory import NamedClassFactory
from lsst.ctrl.orca.multithreading import SharedData
from lsst.ctrl.orca.exceptions import MultiIssueConfigurationError
Expand All @@ -32,7 +30,7 @@
#


class WorkflowManager(object):
class WorkflowManager:
"""Manage lifecycle of this workflow.
Parameters
Expand Down
4 changes: 1 addition & 3 deletions python/lsst/ctrl/orca/WorkflowMonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#


from builtins import object
import lsst.log as log
from lsst.ctrl.orca.multithreading import SharedData


class WorkflowMonitor(object):
class WorkflowMonitor:
"""In charge of monitoring and/or controlling the progress of a running workflow.
"""

Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/config/CondorWorkflowConfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import lsst.pex.config as pexConfig

# condor data configuration
Expand Down
2 changes: 0 additions & 2 deletions python/lsst/ctrl/orca/config/DatabaseConfig.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
# import sys
import lsst.pex.config as pexConfig
# from . import FakeTypeMap as fake
# from . import WorkflowConfig as work
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/config/MonitorConfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import lsst.pex.config as pexConfig

# workflow monitor configuration
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/config/PipelineConfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import lsst.pex.config as pexConfig
from lsst.ctrl.orca.config.DirectoryConfig import DirectoryConfig

Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/config/TaskConfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import lsst.pex.config as pexConfig

# script template
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from builtins import str
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down
5 changes: 1 addition & 4 deletions python/lsst/ctrl/orca/multithreading/SharedData.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@
#

#
from __future__ import with_statement
from builtins import str
from builtins import object
import threading


class SharedData(object):
class SharedData:
"""A lock-protected container for data that can be shared amongst threads.
Parameters
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ctrl/orca/multithreading/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down
1 change: 0 additions & 1 deletion tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"""
Tests of orca exceptions
"""
from builtins import str
import unittest
import lsst.utils.tests

Expand Down
2 changes: 0 additions & 2 deletions tests/test_sharedData.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"""
Tests of the SharedData class
"""
from __future__ import with_statement
from builtins import str

import unittest
import threading
Expand Down
1 change: 0 additions & 1 deletion ups/ctrl_orca.table
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
setupRequired(python_future)
setupRequired(utils)
setupRequired(pex_config)
setupRequired(daf_persistence)
Expand Down

0 comments on commit 36382b0

Please sign in to comment.