cwltool.validate_js

Module Contents

Classes

SuppressLog

Filter instances are used to perform arbitrary filtering of LogRecords.

Functions

is_expression(tool, schema)

get_expressions(tool, schema, source_line = None)

jshint_js(js_text, globals = None, options = None, container_engine = 'docker')

print_js_hint_messages(js_hint_messages, source_line)

validate_js_expressions(tool, schema, jshint_options = None, container_engine = 'docker')

Attributes

JSHintJSReturn

cwltool.validate_js.is_expression(tool, schema)
Parameters
  • tool (Any) –

  • schema (Optional[schema_salad.avro.schema.Schema]) –

Return type

bool

class cwltool.validate_js.SuppressLog(name)

Bases: logging.Filter

Inheritance diagram of cwltool.validate_js.SuppressLog

Filter instances are used to perform arbitrary filtering of LogRecords.

Loggers and Handlers can optionally use Filter instances to filter records as desired. The base filter class only allows events which are below a certain point in the logger hierarchy. For example, a filter initialized with “A.B” will allow events logged by loggers “A.B”, “A.B.C”, “A.B.C.D”, “A.B.D” etc. but not “A.BB”, “B.A.B” etc. If initialized with the empty string, all events are passed.

Parameters

self (str) –

filter(self, record)

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

Parameters

self (logging.LogRecord) –

Return type

bool

cwltool.validate_js.get_expressions(tool, schema, source_line=None)
Parameters
  • tool (Union[ruamel.yaml.comments.CommentedMap, str, ruamel.yaml.comments.CommentedSeq]) –

  • schema (Optional[Union[schema_salad.avro.schema.Schema, schema_salad.avro.schema.ArraySchema]]) –

  • source_line (Optional[schema_salad.sourceline.SourceLine]) –

Return type

List[Tuple[str, Optional[schema_salad.sourceline.SourceLine]]]

cwltool.validate_js.JSHintJSReturn
cwltool.validate_js.jshint_js(js_text, globals=None, options=None, container_engine='docker')
Parameters
  • js_text (str) –

  • globals (Optional[List[str]]) –

  • options (Optional[Dict[str, Union[List[str], str, int]]]) –

  • container_engine (str) –

Return type

JSHintJSReturn

cwltool.validate_js.print_js_hint_messages(js_hint_messages, source_line)
Parameters
  • js_hint_messages (List[str]) –

  • source_line (Optional[schema_salad.sourceline.SourceLine]) –

Return type

None

cwltool.validate_js.validate_js_expressions(tool, schema, jshint_options=None, container_engine='docker')
Parameters
  • tool (ruamel.yaml.comments.CommentedMap) –

  • schema (schema_salad.avro.schema.Schema) –

  • jshint_options (Optional[Dict[str, Union[List[str], str, int]]]) –

  • container_engine (str) –

Return type

None