##################### generated by xml-casa (v2) from h_weblog.xml ##################
##################### 9b55e16bcb95cf6dcb7b756e43c6e95d ##############################
from __future__ import absolute_import
import numpy
from casatools.typecheck import CasaValidator as _val_ctor
_pc = _val_ctor( )
from casatools.coercetype import coerce as _coerce
from .private.task_h_weblog import h_weblog as _h_weblog_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log
class _h_weblog:
"""
h_weblog ---- Open the pipeline weblog in a browser
h_weblog opens the weblog in a new browser tab or window.
--------- parameter descriptions ---------------------------------------------
pipelinemode The pipeline operating mode. In 'automatic' mode the pipeline
determines the values of all context defined pipeline inputs
automatically. In 'interactive' mode the user can set the pipeline
context defined parameters manually. In 'getinputs' mode the user
can check the settings of all pipeline parameters without running
the task.
relpath Relative path to the weblog index file. This file must be located
in a child directory of the CASA working directory. If relpath
is left unspecified, the most recent weblog will be located and
displayed.
--------- examples -----------------------------------------------------------
"""
_info_group_ = """pipeline"""
_info_desc_ = """Open the pipeline weblog in a browser"""
def __call__( self, pipelinemode='automatic', relpath='' ):
schema = {'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'relpath': {'type': 'cStr', 'coerce': _coerce.to_str}}
doc = {'pipelinemode': pipelinemode, 'relpath': relpath}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'h_weblog', [ 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'relpath=' + repr(_pc.document['relpath']) ] )
return _end_log( _logging_state_, 'h_weblog', _h_weblog_t( _pc.document['pipelinemode'], _pc.document['relpath'] ) )
h_weblog = _h_weblog( )