Skip to content

Commit

Permalink
Move BPS_SEARCH_ORDER to bps_config.py
Browse files Browse the repository at this point in the history
The default search order for BpsConfig was defined in submit.py, a
module implementing function responsible for run submissions.  Moved the
definition to bps_config.py as it seems like much better choice.
  • Loading branch information
mxk62 committed Jul 14, 2021
1 parent d231ae6 commit 0ade2e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion python/lsst/ctrl/bps/bps_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
expands environment variables and other config variables.
"""

__all__ = ["BpsConfig", "BpsFormatter"]
__all__ = ["BPS_SEARCH_ORDER", "BpsConfig", "BpsFormatter"]


from os.path import expandvars
Expand All @@ -37,6 +37,8 @@

_LOG = logging.getLogger(__name__)

BPS_SEARCH_ORDER = ["payload", "pipetask", "site", "bps_defined"]


class BpsFormatter(string.Formatter):
"""String formatter class that allows BPS config search options.
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/ctrl/bps/drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@

from lsst.obs.base import Instrument

from . import BpsConfig
from . import BPS_SEARCH_ORDER, BpsConfig
from .bps_draw import draw_networkx_dot
from .pre_transform import acquire_quantum_graph, cluster_quanta
from .transform import transform
from .prepare import prepare
from .submit import BPS_SEARCH_ORDER, submit
from .submit import submit
from .cancel import cancel
from .report import report

Expand Down
4 changes: 0 additions & 4 deletions python/lsst/ctrl/bps/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
from lsst.utils import doImport


# Config section search order
BPS_SEARCH_ORDER = ["payload", "pipetask", "site", "bps_defined"]


def submit(config, wms_workflow, wms_service=None):
"""Convert generic workflow to a workflow for a particular WMS.
Expand Down

0 comments on commit 0ade2e1

Please sign in to comment.