Return dependency status (string)
422097
def get_installed_version(self):
        """"""
        if self.check():
            return '%s (%s)' % (self.installed_version, self.OK)
        else:
            return '%s (%s)' % (self.installed_version, self.NOK)
1024835
def filter_dependencies(self):
        '''
        
        '''
        dependencies = self.event['check'].get('dependencies', None)
        if dependencies is None or not isinstance(dependencies, list):
            return
        for dependency in self.event['check']['dependencies']:
            if not str(dependency):
                continue
            dependency_split = tuple(dependency.split('/'))
            # If there's a dependency on a check from another client, then use
            # that client name, otherwise assume same client.
            if len(dependency_split) == 2:
                client, check = dependency_split
            else:
                client = self.event['client']['name']
                check = dependency_split[0]
            if self.event_exists(client, check):
                self.bail('check dependency event exists')
1062097
def status(self):
        """"""
        return {self._acronym_status(l): l for l in self.resp_text.split('\n')
                if l.startswith(self.prefix_status)}
1121415
def _parse_dependencies(string):
    
    contents = _get_contents_between(string, '(', ')')
    unsorted_dependencies = contents.split(',')
    _check_parameters(unsorted_dependencies, ('?',))

    buildable_dependencies = []
    given_dependencies = []
    for dependency in unsorted_dependencies:
        if dependency[0] == '?':
            given_dependencies.append(dependency[1:])
        else:
            buildable_dependencies.append(dependency)

    string = string[string.index(')') + 1:]
    return buildable_dependencies, given_dependencies, string
629069
def dependencies(self, task, params={}, **options): 
        
        path = "/tasks/%s/dependencies" % (task)
        return self.client.get(path, params, **options)
709672
def _check_dep(self, depinfo, deptile, resolver):
        

        try:
            settings = self._load_depsettings(deptile)
        except IOError:
            return False

        # If this dependency was initially resolved with a different resolver, then
        # we cannot check if it is up to date
        if settings['resolver'] != resolver.__class__.__name__:
            return None

        resolver_settings = {}
        if 'settings' in settings:
            resolver_settings = settings['settings']

        return resolver.check(depinfo, deptile, resolver_settings)
925084
function readDependentJointsThatAreReady(unit, handleDependentJoint){
	//console.log("readDependentJointsThatAreReady "+unit);
	var t=Date.now();
	var from = unit ? "FROM dependencies AS src_deps JOIN dependencies USING(unit)" : "FROM dependencies";
	var where = unit ? "WHERE src_deps.depends_on_unit="+db.escape(unit) : "";
	var lock = unit ? mutex.lock : mutex.lockOrSkip;
	lock(["dependencies"], function(unlock){
		db.query(
			"SELECT dependencies.unit, unhandled_joints.unit AS unit_for_json, \n\
				SUM(CASE WHEN units.unit IS NULL THEN 1 ELSE 0 END) AS count_missing_parents \n\
			"+from+" \n\
			JOIN unhandled_joints ON dependencies.unit=unhandled_joints.unit \n\
			LEFT JOIN units ON dependencies.depends_on_unit=units.unit \n\
			"+where+" \n\
			GROUP BY dependencies.unit \n\
			HAVING count_missing_parents=0 \n\
			ORDER BY NULL", 
			function(rows){
				//console.log(rows.length+" joints are ready");
				//console.log("deps: "+(Date.now()-t));
				rows.forEach(function(row) {
					db.query("SELECT json, peer, "+db.getUnixTimestamp("creation_date")+" AS creation_ts FROM unhandled_joints WHERE unit=?", [row.unit_for_json], function(internal_rows){
						internal_rows.forEach(function(internal_row) {
							handleDependentJoint(JSON.parse(internal_row.json), parseInt(internal_row.creation_ts), internal_row.peer);
						});
					});
				});
				unlock();
			}
		);
	});
}
117569
def get(self, name):
        """"""
        if name not in self.modules:
            self.load_dependency(name, False, False, False)

        if name in self.modules:
            return self.modules[name]
        else:
            return None
1175296
function getDepends(file, config) {
    var code = fs.readFileSync(file, 'utf8'),
        // only process the first module in file
        meta = ast.parse(code)[0],
        deps = ((meta || {}).dependencies || []).map(function (dep) {
            return idToPath(dep, config);
        });
    return deps;
}
572981
def check_dependency(self, dependency_path):
        """"""
        stored_hash = self._stamp_file_hashes.get(dependency_path)

        # This file was newly added, or we don't have a file
        # with stored hashes yet. Assume out of date.
        if not stored_hash:
            return False

        return stored_hash == _sha1_for_file(dependency_path)
1041495
def missing_dependencies():
    """"""
    missing_deps = []
    for dependency in DEPENDENCIES:
        if not dependency.check() and not dependency.optional:
            missing_deps.append(dependency)
    if missing_deps:
        return status(deps=missing_deps, linesep='<br>')
    else:
        return ""
216240
function depend(p) {
	var s = '';
	var a = toArray(p);

	for (var i in a) {
		if (a[i].filter) {
			s += '* Dependency on filter '+a[i].filter+(a[i].value ? ' value: '+a[i].value : '')+'\n';
		}
		if (a[i].mixin) {
			s += '* Dependency on mixin '+a[i].mixin+'\n';
		}
	}
	return s;
}
1279801
def _get_dependency_definition(task_id, dependencies):
    
    set_upstream_statements = ''
    for dependency in dependencies:
      set_upstream_statements = set_upstream_statements + \
          '{0}.set_upstream({1})'.format(task_id, dependency) + '\n'
    return set_upstream_statements
682694
def depends_on(self, dependency):
        
        packages = self.package_info()
        return [package for package in packages if dependency in package.get("requires", "")]
134953
def get_dependencies(self):
    """"""
    producer_infos = set()
    for product_type in self._dependencies:
      producer_infos.update(self._get_producer_infos_by_product_type(product_type))
    return producer_infos
1044659
def check_deps(deps):
        """"""
        if not isinstance(deps, list):
            deps = [deps]
        checks = list(Environment.has_apps(deps))
        if not all(checks):
            for name, available in list(dict(zip(deps, checks)).items()):
                if not available:
                    error_msg = "The required application/dependency '{0}'" \
                                " isn't available.".format(name)
                    raise SystemError(error_msg)
1180760
def get_status(self):
        
        status = ctypes.c_int32()
        result = self.library.Par_GetStatus(self.pointer, ctypes.byref(status))
        check_error(result, "partner")
        return status