Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-27835 pipetask run should always print stack trace and exception details #334

Merged
merged 2 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions python/lsst/obs/base/cli/cmd/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
)
from lsst.daf.butler.cli.utils import (
ButlerCommand,
cli_handle_exception,
split_commas,
typeStrAcceptsMultiple
)
Expand Down Expand Up @@ -75,7 +74,7 @@ def convert(*args, **kwargs):
has no chained reruns. Custom scripts that call ConvertRepoTask should be
used on more complex suites of repositories.
"""
cli_handle_exception(script.convert, *args, **kwargs)
script.convert(*args, **kwargs)


@click.command(short_help="Define visits from exposures.", cls=ButlerCommand)
Expand All @@ -92,7 +91,7 @@ def convert(*args, **kwargs):
@options_file_option()
def define_visits(*args, **kwargs):
"""Define visits from exposures in the butler registry."""
cli_handle_exception(script.defineVisits, *args, **kwargs)
script.defineVisits(*args, **kwargs)


@click.command(short_help="Ingest raw frames.", cls=ButlerCommand)
Expand All @@ -112,7 +111,7 @@ def define_visits(*args, **kwargs):
@options_file_option()
def ingest_raws(*args, **kwargs):
"""Ingest raw frames into from a directory into the butler registry"""
cli_handle_exception(script.ingestRaws, *args, **kwargs)
script.ingestRaws(*args, **kwargs)


@click.command(short_help="Add an instrument to the repository", cls=ButlerCommand)
Expand All @@ -121,7 +120,7 @@ def ingest_raws(*args, **kwargs):
def register_instrument(*args, **kwargs):
"""Add an instrument to the data repository.
"""
cli_handle_exception(script.registerInstrument, *args, **kwargs)
script.registerInstrument(*args, **kwargs)


@click.command(short_help="Add an instrument's curated calibrations.", cls=ButlerCommand)
Expand All @@ -136,4 +135,4 @@ def register_instrument(*args, **kwargs):
def write_curated_calibrations(*args, **kwargs):
"""Add an instrument's curated calibrations to the data repository.
"""
cli_handle_exception(script.writeCuratedCalibrations, *args, **kwargs)
script.writeCuratedCalibrations(*args, **kwargs)
2 changes: 2 additions & 0 deletions tests/test_cliCmdConvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

class ConvertTestCase(CliCmdTestBase, unittest.TestCase):

mockFuncName = "lsst.obs.base.cli.cmd.commands.script.convert"

@staticmethod
def defaultExpected():
return dict(skymap_name=None,
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cliCmdDefineVisits.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

class DefineVisitsTest(CliCmdTestBase, unittest.TestCase):

mockFuncName = "lsst.obs.base.cli.cmd.commands.script.defineVisits"

@staticmethod
def defaultExpected():
return dict(config_file=None,
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cliCmdRegisterInstrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

class RegisterInstrumentTest(CliCmdTestBase, unittest.TestCase):

mockFuncName = "lsst.obs.base.cli.cmd.commands.script.registerInstrument"

@staticmethod
def defaultExpected():
return dict()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cliCmdTestIngest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

class IngestRawsTestCase(CliCmdTestBase, unittest.TestCase):

mockFuncName = "lsst.obs.base.cli.cmd.commands.script.ingestRaws"

@staticmethod
def defaultExpected():
return dict(config={},
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cliCmdWriteCuratedCalibrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

class WriteCuratedCalibrationsTest(CliCmdTestBase, unittest.TestCase):

mockFuncName = "lsst.obs.base.cli.cmd.commands.script.writeCuratedCalibrations"

@staticmethod
def defaultExpected():
return dict()
Expand Down