lsst.pipe.base  21.0.0-7-g959bb79+522e0f12c2
Public Member Functions | Public Attributes | List of all members
lsst.pipe.base.argumentParser.DatasetArgument Class Reference
Inheritance diagram for lsst.pipe.base.argumentParser.DatasetArgument:
lsst.pipe.base.argumentParser.DynamicDatasetType

Public Member Functions

def __init__ (self, name=None, help="dataset type to process from input data repository", default=None)
 
def getDatasetType (self, namespace)
 
def addArgument (self, parser, idName)
 

Public Attributes

 name
 
 help
 
 default
 

Detailed Description

Dataset type specified by a command-line argument.

Parameters
----------
name : `str`, optional
    Name of command-line argument (including leading "--",
    if appropriate) whose value is the dataset type.
    If `None`, uses ``--idName_dstype`` where idName
    is the name of the data ID argument (e.g. "id").
help : `str`, optional
    Help string for the command-line argument.
default : `object`, optional
    Default value. If `None`, then the command-line option is required.
    This argument isignored if the command-line argument is positional
    (name does not start with "-") because positional arguments do
    not support default values.

Definition at line 301 of file argumentParser.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.base.argumentParser.DatasetArgument.__init__ (   self,
  name = None,
  help = "dataset type to process from input data repository",
  default = None 
)

Definition at line 320 of file argumentParser.py.

Member Function Documentation

◆ addArgument()

def lsst.pipe.base.argumentParser.DatasetArgument.addArgument (   self,
  parser,
  idName 
)
Add a command-line argument to specify the dataset type name.

Parameters
----------
parser : `ArgumentParser`
    Argument parser.
idName : `str`
    Data ID.

Notes
-----
Also sets the `name` attribute if it is currently `None`.

Reimplemented from lsst.pipe.base.argumentParser.DynamicDatasetType.

Definition at line 347 of file argumentParser.py.

◆ getDatasetType()

def lsst.pipe.base.argumentParser.DatasetArgument.getDatasetType (   self,
  namespace 
)
Get the dataset type as a string, from the appropriate
command-line argument.

Parameters
----------
namespace :
    Parsed command.

Returns
-------
datasetType : `str`
    Dataset type.

Reimplemented from lsst.pipe.base.argumentParser.DynamicDatasetType.

Definition at line 330 of file argumentParser.py.

Member Data Documentation

◆ default

lsst.pipe.base.argumentParser.DatasetArgument.default

Definition at line 324 of file argumentParser.py.

◆ help

lsst.pipe.base.argumentParser.DatasetArgument.help

Definition at line 323 of file argumentParser.py.

◆ name

lsst.pipe.base.argumentParser.DatasetArgument.name

Definition at line 322 of file argumentParser.py.


The documentation for this class was generated from the following file: