Run validation on the generated WDL output using wdltool.
5790
def _validate(wdl_file):
    
    start_dir = os.getcwd()
    os.chdir(os.path.dirname(wdl_file))
    print("Validating", wdl_file)
    subprocess.check_call(["wdltool", "validate", wdl_file])
    os.chdir(start_dir)
510297
def validation_epoch(self, epoch_info, source: 'vel.api.Source'):
        
        self.eval()

        iterator = tqdm.tqdm(source.val_loader(), desc="Validation", unit="iter", file=sys.stdout)

        with torch.no_grad():
            for batch_idx, (data, target) in enumerate(iterator):
                batch_info = BatchInfo(epoch_info, batch_idx)

                batch_info.on_validation_batch_begin()
                self.feed_batch(batch_info, data, target)
                batch_info.on_validation_batch_end()
1342997
def validate(self):
        """"""
        passed = True
        for data in self.profile.get('validations') or []:
            data_type = data.get('data_type', 'redis')  # default to redis for older data files
            if data_type == 'redis':
                user_data = data.get('data')
                user_data_path = data.get('data_path')  # jmespath expression
                if isinstance(user_data, string_types) and re.match(self._vars_match, user_data):
                    # if user_data reference a redis variable retrieve the data
                    if user_data.endswith('Binary'):
                        # call specific method and do not decode data
                        user_data = self.tcex.playbook.read_binary(user_data, False, False)
                    elif user_data.endswith('BinaryArray'):
                        # call specific method and do not decode data
                        user_data = self.tcex.playbook.read_binary_array(user_data, False, False)
                    else:
                        user_data = self.tcex.playbook.read(user_data)

                if user_data_path is not None:
                    user_data = self.path_data(user_data, user_data_path)

                # get db variable/data
                variable = data.get('variable')
                if variable.endswith('Binary'):
                    # call specific method and do not decode data
                    db_data = self.tcex.playbook.read_binary(variable, False, False)
                elif variable.endswith('BinaryArray'):
                    # call specific method and do not decode data
                    db_data = self.tcex.playbook.read_binary_array(variable, False, False)
                else:
                    db_data = self.tcex.playbook.read(variable)
                db_data_path = data.get('variable_path')
                if db_data_path is not None:
                    db_data = self.path_data(db_data, db_data_path)

                # operator
                oper = data.get('operator', 'eq')

                # validate if possible
                sep = '-' * 10
                self.log.info('{0} {1} {0}'.format(sep, variable))
                # self.log.info('[validate] Variable  : {}'.format(variable))
                if not self.validate_redis(db_data, user_data, oper):
                    passed = False
                    self.exit_code = 1  # if any validation fails everything fails
        return passed
215026
def Validate(self, win):
        """"""

        val = self.GetWindow().GetValue()

        for x in val:
            if x not in string.digits:
                return False

        return True
675075
async def validate(state, holdout_glob):
  

  if not glob.glob(holdout_glob):
    print('Glob "{}" didn\'t match any files, skipping validation'.format(
          holdout_glob))
  else:
    await run(
        'python3', 'validate.py', holdout_glob,
        '--flagfile={}'.format(os.path.join(FLAGS.flags_dir, 'validate.flags')),
        '--work_dir={}'.format(fsdb.working_dir()))
1348522
def validate_flags():
  """"""
  assert not job_dir()
  assert FLAGS.output_dir.startswith("gs://")
  assert FLAGS.data_dir.startswith("gs://")
  assert FLAGS.worker_replicas <= 1
  assert FLAGS.ps_replicas <= 0
  if FLAGS.hparams_range:
    assert FLAGS.autotune_objective
  if FLAGS.worker_gpu:
    assert FLAGS.worker_gpu in [1, 4, 8]
  if FLAGS.cloud_mlengine_master_type:
    if FLAGS.worker_gpu:
      if FLAGS.worker_gpu == 1:
        assert FLAGS.cloud_mlengine_master_type in ["standard_gpu",
                                                    "standard_p100"]
      elif FLAGS.worker_gpu == 4:
        assert FLAGS.cloud_mlengine_master_type in ["complex_model_m_gpu",
                                                    "complex_model_m_p100"]
      else:
        assert FLAGS.cloud_mlengine_master_type == "complex_model_l_gpu"
    else:
      assert FLAGS.cloud_mlengine_master_type in ["standard", "large_model",
                                                  "complex_model_s",
                                                  "complex_model_m",
                                                  "complex_model_l"]
176529
def _validate(self, writing=True):
        """"""
        if any([box.box_id != 'colr' for box in self.box]):
            msg = ("Colour group boxes can only contain colour specification "
                   "boxes.")
            self._dispatch_validation_error(msg, writing=writing)
1184450
public void validate() {
    StringBuilder validationErrorBuilder = new StringBuilder("Process engine configuration is invalid: \n");
    boolean isValid = true;    
    
    if(datasourceJndiName == null || datasourceJndiName.isEmpty()) {
      isValid = false;
      validationErrorBuilder.append(" property 'datasource' cannot be null \n");      
    }
    if(engineName == null || engineName.isEmpty()) {
      isValid = false;
      validationErrorBuilder.append(" property 'engineName' cannot be null \n");
    }

    for (int i = 0; i < pluginConfigurations.size(); i++) {
      ProcessEnginePluginXml pluginConfiguration = pluginConfigurations.get(i);
      if (pluginConfiguration.getPluginClass() == null || pluginConfiguration.getPluginClass().isEmpty()) {
        isValid = false;
        validationErrorBuilder.append(" property 'class' in plugin[" + i + "] cannot be null \n");
      }
    }
    
    if(!isValid) {
      throw new ProcessEngineException(validationErrorBuilder.toString());
    }
  }
120414
private static function validation()
    {
        $files = ['Validator', 'ValidationResult'];
        $folder = static::$root.'Validation'.'/';

        self::call($files, $folder);

        //Initiate the validation surface
        Validator::ini();
    }
103276
def validate(ctx, schema, all_schemata):
    """"""

    database = ctx.obj['db']

    if schema is None:
        if all_schemata is False:
            log('No schema given. Read the help', lvl=warn)
            return
        else:
            schemata = database.objectmodels.keys()
    else:
        schemata = [schema]

    for schema in schemata:
        try:
            things = database.objectmodels[schema]
            with click.progressbar(things.find(), length=things.count(),
                                   label='Validating %15s' % schema) as object_bar:
                for obj in object_bar:
                    obj.validate()
        except Exception as e:

            log('Exception while validating:',
                schema, e, type(e),
                '\n\nFix this object and rerun validation!',
                emitter='MANAGE', lvl=error)

    log('Done')
416790
def _validate(wrapped):
    '''
    
    '''
    @functools.wraps(wrapped)
    def wrapper(*args, **kwargs):
        container_type = kwargs.get('container_type')
        exec_driver = kwargs.get('exec_driver')
        valid_driver = {
            'docker': ('lxc-attach', 'nsenter', 'docker-exec'),
            'lxc': ('lxc-attach',),
            'nspawn': ('nsenter',),
        }
        if container_type not in valid_driver:
            raise SaltInvocationError(
                'Invalid container type \'{0}\'. Valid types are: {1}'
                .format(container_type, ', '.join(sorted(valid_driver)))
            )
        if exec_driver not in valid_driver[container_type]:
            raise SaltInvocationError(
                'Invalid command execution driver. Valid drivers are: {0}'
                .format(', '.join(valid_driver[container_type]))
            )
        if exec_driver == 'lxc-attach' and not salt.utils.path.which('lxc-attach'):
            raise SaltInvocationError(
                'The \'lxc-attach\' execution driver has been chosen, but '
                'lxc-attach is not available. LXC may not be installed.'
            )
        return wrapped(*args, **salt.utils.args.clean_kwargs(**kwargs))
    return wrapper
230051
def validate(self):
        """"""
        super(OutputContextVertex, self).validate()

        if self.location.field is not None:
            raise ValueError(u'Expected location at a vertex, but got: {}'.format(self.location))
1341884
def validate(self, arg=None):
        """"""
        if os.path.isdir(self.path):
            self.validator.object = None
        else:
            self.validator.object = ICONS['error']
662804
def validate_split_runs_file(split_runs_file):
    """"""
    try:
        content = [l.strip() for l in split_runs_file.readlines()]
        if content[0].upper().split('\t') == ['NAME', 'RUN_ID']:
            return {c.split('\t')[1]: c.split('\t')[0] for c in content[1:] if c}
        else:
            sys.exit("ERROR: Mandatory header of --split_runs tsv file not found: 'NAME', 'RUN_ID'")
            logging.error("Mandatory header of --split_runs tsv file not found: 'NAME', 'RUN_ID'")
    except IndexError:
        sys.exit("ERROR: Format of --split_runs tab separated file not as expected")
        logging.error("ERROR: Format of --split_runs tab separated file not as expected")
311567
def validate(self):
        
        log.info("{}\nValidating against {}"
                 .format("-" * 100, self.schema_def.__class__.__name__))

        if not self.schema_def:
            raise ValueError("No schema definition supplied.")

        self.checked_attributes = []

        # TODO - this should maybe choose the actually used namespace, not just
        # the first one in the list
        result = ValidationResult(self.allowed_namespaces[0],
                                  self.schema_def.__class__.__name__)
        for subject, predicate, object_ in self.graph:
            log.info("\nsubj: {subj}\npred: {pred}\n obj: {obj}"
                     .format(subj=subject, pred=predicate,
                             obj=object_.encode('utf-8')))
            result.add_error(self._check_triple((subject, predicate, object_)))
        return result
1252011
def validate(self):
        """"""
        if not self._resource.get('permissions'):
            self.permissions = self.default_permissions

        try:
            # update _resource so have default values from the schema
            self._resource = self.schema(self._resource)
        except MultipleInvalid as e:
            errors = [format_error(err, self.resource_type) for err in e.errors]
            raise exceptions.ValidationError({'errors': errors})

        yield self.check_service()
        yield self.check_unique()
192679
def validate(method):
    """"""

    @wraps(method)
    def mod_run(self, rinput):
        self.validate_input(rinput)
        #
        result = method(self, rinput)
        #
        self.validate_result(result)
        return result

    return mod_run