Returns an array of schema file names defined as entry points
493138
public function getSchemaEntryPoints()
	{
		return array_reduce( $this->entryPoints, function( $carry, $entryPoint ) {
			$schemaFiles = array_filter( $entryPoint['entryPointDocument'], function( $entryPointDocument ) {
				return XBRL::endsWith( $entryPointDocument, ".xsd" );
			} );
			return array_merge( $carry, $schemaFiles );
		}, array() );
	}
692747
def schema_map(schema):
    """"""
    mapper = {}
    for name in getFieldNames(schema):
        mapper[name] = name
    return mapper
719736
def load_entry_point_group_templates(self, entry_point_group_templates):
        """"""
        result = []
        for ep in iter_entry_points(group=entry_point_group_templates):
            with self.app.app_context():
                for template_dir in ep.load()():
                    result.append(self.register_templates(template_dir))
        return result
292328
def _load_schema(name, path=__file__):
    """"""
    path = os.path.join(os.path.dirname(path), name + '.yaml')
    with open(path) as handle:
        schema = yaml.safe_load(handle)
    fast_schema = rapidjson.Validator(rapidjson.dumps(schema))
    return path, (schema, fast_schema)
267697
def entrypoints(section):
    
    return {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(section)}
274549
def list_entrypoints(entry_point):
    """"""
    found_entry_points = {}
    for dist in working_set:
        entry_map = dist.get_entry_map()
        for group_name, entry_points in entry_map.items():
            # Filter entry points
            if entry_point is None and \
               not group_name.startswith('invenio'):
                continue
            if entry_point is not None and \
               entry_point != group_name:
                continue

            # Store entry points.
            if group_name not in found_entry_points:
                found_entry_points[group_name] = []
            for ep in entry_points.values():
                found_entry_points[group_name].append(str(ep))

    for ep_group in sorted(found_entry_points.keys()):
        click.secho('{0}'.format(ep_group), fg='green')
        for ep in sorted(found_entry_points[ep_group]):
            click.echo('  {0}'.format(ep))
300766
def show_schemas(schemaname):
    

    ecode = 0
    try:
        schemas = {}
        schema_dir = os.path.join(contexts['anchore_config']['pkg_dir'], 'schemas')
        for f in os.listdir(schema_dir):
            sdata = {}
            try:
                with open(os.path.join(schema_dir, f), 'r') as FH:
                    sdata = json.loads(FH.read())
            except:
                anchore_print_err('found schema file but failed to parse: ' + os.path.join(schema_dir, f))

            if sdata and (not schemaname or f in schemaname):
                schemas[f] = sdata

        if not schemas:
            anchore_print_err("no specified schemas were found to show")
        else:
            anchore_print(json.dumps(schemas, indent=4))

    except Exception as err:
        anchore_print_err('operation failed')
        ecode = 1

    sys.exit(ecode)
1203446
function getEntitlementFiles(preferences) {
    const files = [];
    const entitlements = path.join(
      preferences.projectRoot,
      "platforms",
      "ios",
      preferences.projectName,
      "Resources",
      `${preferences.projectName}.entitlements`
    );
    files.push(
      path.join(
        preferences.projectRoot,
        "platforms",
        "ios",
        preferences.projectName,
        `${preferences.projectName}.entitlements`
      )
    );
    files.push(entitlements);

    for (let i = 0; i < BUILD_TYPES.length; i++) {
      const buildType = BUILD_TYPES[i];
      const plist = path.join(
        preferences.projectRoot,
        "platforms",
        "ios",
        preferences.projectName,
        `Entitlements-${buildType}.plist`
      );
      files.push(plist);
    }

    return files;
  }
1104120
function listEntryPoints(pkg) {
  debug(`listing entrypoints for ${pkg.name}`);
  if (!pkg.name) {
    throw new Error('cannot read dependencies for unnamed package');
  }
  let paths = [];

  if (pkg.main) {
    debug(`found main path for ${pkg.name}`);
    paths.push(pkg.main);
  }

  if (pkg.bin) {
    debug(`found bin entry(s) for ${pkg.name}`);
    paths = paths.concat(values(pkg.bin));
  }

  if (pkg.browser) {
    debug(`found browser entry(s) for ${pkg.name}`);
    paths = paths.concat(values(pkg.browser).filter((p) => p && !p.startsWith('@')));
  }

  debug(paths);

  return paths
    .map((p) => path.resolve('packages', 'node_modules', pkg.name, p));
}
356089
def get_flattened_bsp_keys_from_schema(schema):
    
    keys = []

    for key in schema.declared_fields.keys():
        field = schema.declared_fields[key]

        if isinstance(field, mm.fields.Nested) and \
                isinstance(field.schema, BoundSpatialPoint):
            keys.append("{}.{}".format(key, "position"))

    return keys
988702
function list(schema, defaults, options) {
  if (kindOf(schema) !== 'array' || schema.length !== 1) {
    if (process.env.NODE_ENV !== 'production') {
      throw new Error(
        `List structs must be defined as an array with a single element, but you passed: ${schema}`
      )
    } else {
      throw new Error(`Invalid schema: ${schema}`)
    }
  }

  const array = scalar('array', undefined, options)
  const element = any(schema[0], undefined, options)
  const name = 'list'
  const type = `[${element.type}]`
  const validate = (value = resolveDefaults(defaults)) => {
    const [error, result] = array.validate(value)

    if (error) {
      error.type = type
      return [error]
    }

    value = result
    const errors = []
    const ret = []

    for (let i = 0; i < value.length; i++) {
      const v = value[i]
      const [e, r] = element.validate(v)

      if (e) {
        const allE = e.errors || [e]
        allE.forEach(singleE => {
          singleE.path = [i].concat(singleE.path)
          singleE.data = value
          errors.push(singleE)
        })
        continue
      }

      ret[i] = r
    }

    if (errors.length) {
      const first = errors[0]
      first.errors = errors
      return [first]
    }

    return [undefined, ret]
  }

  return new Kind(name, type, validate)
}
1274041
def table_schema_call(self, target, cls):
        
        index_defs = []
        for name in cls.index_names() or []:
            index_defs.append(GlobalIncludeIndex(
                gsi_name(name),
                parts=[HashKey(name)],
                includes=['value']
            ))

        return target(
            cls.get_table_name(),
            connection=get_conn(),
            schema=[HashKey('id')],
            global_indexes=index_defs or None
        )
625766
def schemas(self):
        
        sql = """SELECT schema_name FROM information_schema.schemata
                 ORDER BY schema_name"""
        schemas = self.query(sql).fetchall()
        return [s[0] for s in schemas if s[0][:3] != "pg_"]
1128090
function getEntries(config) {
    assert_usage(config && config.entry);
    if( config.entry.constructor===String ) {
        return {main: [config.entry]};
    }
    if( config.entry.constructor===Array ) {
        return {main: [...config.entry]};
    }
    if( config.entry.constructor===Object ) {
        const entries = {};
        Object.entries(config.entry)
        .forEach(([entryName, entryFiles]) => {
            if( entryFiles && entryFiles.constructor===Array ) {
                entries[entryName] = [...entryFiles];
                return;
            }
            if( entryFiles && entryFiles.constructor===String ) {
                entries[entryName] = [entryFiles];
                return;
            }
            assert_usage(false, entryFiles, entryName);
        });
        return entries;
    }
    assert_usage(false);
}
23097
def discover_process(self, path):
        
        if not path.lower().endswith(('.yml', '.yaml')):
            return []

        with open(path) as fn:
            schemas = yaml.load(fn, Loader=yaml.FullLoader)
        if not schemas:
            # TODO: Logger.
            # self.stderr.write("Could not read YAML file {}".format(schema_file))
            return []

        process_schemas = []
        for schema in schemas:
            if 'run' not in schema:
                continue

            # NOTE: This currently assumes that 'bash' is the default.
            if schema['run'].get('language', 'bash') != 'workflow':
                continue

            process_schemas.append(schema)

        return process_schemas
202593
public function getSchemaEntryPoints()
	{
		$root = $this->contents[ $this->getFirstFolderName() ];
		$yearName = key( $root );
		$ifrs = $root[ $yearName ]['ifrs'];
		$ifrsName = "$yearName/ifrs";

		$entryPoints = array_filter( $ifrs, function( $item ) { return ! is_array( $item ) && strpos( $item, 'entry' ) === 0; } );
		$entryPoints = array_map( function( $item ) use( $ifrsName ) { return join( '/', array( $this::prefix, $ifrsName, $item ) ); }, $entryPoints );

		return $entryPoints;
	}
415055
def get_roots(app=None):
    '''
    
    '''
    roots = set()
    plugins = app.config['PLUGINS'] if app else None
    for name in ENTRYPOINTS.keys():
        for ep in iter_all(name):
            if plugins is None or ep.name in plugins:
                roots.add(ep.module_name.split('.', 1)[0])
    return list(roots)