Register the artifact metadata dictionary for a built target.
12212
def register_target_artifact_metadata(self, target: str, metadata: dict):
        """"""
        with self.context_lock:
            self.artifacts_metadata[target.name] = metadata
1283181
public void registerJsonPropertyNameProcessor( Class target, PropertyNameProcessor propertyNameProcessor ) {
      if( target != null && propertyNameProcessor != null ) {
         jsonPropertyNameProcessorMap.put( target, propertyNameProcessor );
      }
   }
158343
def add_info(self, data):
        """"""
        for key in data:
            # verboten
            if key in ('status','state','name','id','application','services','release'):
                raise ValueError("Sorry, cannot set build info with key of {}".format(key))
            self.obj[key] = data[key]
        self.changes.append("Adding build info")
        return self
435617
def add_item_metadata(self, handle, key, value):
        
        _mkdir_if_missing(self._metadata_fragments_abspath)

        prefix = self._handle_to_fragment_absprefixpath(handle)
        fpath = prefix + '.{}.json'.format(key)

        _put_obj(fpath, value)
1117337
def get_artifact_metadata(self, package_name):
        

        filename = self.metadata.get(package_name)
        if not filename or not exists(filename):
            return {}
        with open(filename, encoding='utf8') as fd:
            contents = fd.read()

        try:
            is_json_compat(contents)
        except ValueError:
            logger.info("artifact metadata file '%s' is invalid", filename)
            return {}

        return json.loads(contents)
204352
def set_metadata(self, key, metadata):
        
        with self._lock:
            self._metadata[key] = metadata
680858
def built(self):
        """"""

        # Clear the implicit dependency caches of any Nodes
        # waiting for this Node to be built.
        for parent in self.waiting_parents:
            parent.implicit = None

        self.clear()

        if self.pseudo:
            if self.exists():
                raise SCons.Errors.UserError("Pseudo target " + str(self) + " must not exist")
        else:
            if not self.exists() and do_store_info:
                SCons.Warnings.warn(SCons.Warnings.TargetNotBuiltWarning,
                                    "Cannot find target " + str(self) + " after building")
        self.ninfo.update(self)
672797
def _construct_register(reg, default_reg):
    """"""
    if reg:
        x = dict((k, reg.get(k, d)) for k, d in default_reg.items())
    else:
        x = dict(default_reg)
    return x
525903
def add_custom_metadata(self, key, value, meta_type=None):
        
        self.metadata.append({'key': key, 'value': value, 'type': meta_type})
703812
def _save_metadata(self):
        
        with open(self.paths.metadata(), 'w') as metadata_fd:
            utils.json_dump(self.metadata, metadata_fd)
89335
def save_metadata(self, profile="default"):
        """"""
        if len(self.tables) > 0:
            f = profile_path(DBPY_PROFILE_ID, profile)
            dump_to_json(f, self.to_dict())
640774
def register(self):
        """"""
        # connect to tracker
        result = requests.post(urljoin(self.tracker, 'models'), data=json.dumps(self.metadata))
        logger.debug("registered at server %s: %s", self.tracker, result)
        self.metadata["tracker"] = result.json()
411533
def add(self, key, metric, **dims):
        
        return super(MetricsRegistry, self).add(
            self.metadata.register(key, **dims), metric)
1121194
def register(self, key, **kwargs):
        """"""
        dimensions = dict((k, str(v)) for k, v in kwargs.items())
        composite_key = self._composite_name(key, dimensions)
        self._metadata[composite_key] = {
            'metric': key,
            'dimensions': dimensions
        }
        return composite_key
647183
def build(self, builder):
        """"""
        params = dict(MetaDataVersionOID=str(self.metadata_version_oid),
                      StudyOID="%s (%s)" % (self.projectname, self.environment,),
                      )

        # mixins
        self.mixin_params(params)

        builder.start("ClinicalData", params)
        # Ask children
        if self.subject_data:
            for subject in self.subject_data:
                subject.build(builder)
        # Add the Annotations
        if self.annotations is not None:
            self.annotations.build(builder)
        builder.end("ClinicalData")
1079776
def _register_make(cls):
    ''''''
    assert cls.nxm_headers is not None
    assert cls.nxm_headers is not []
    for nxm_header in cls.nxm_headers:
        assert nxm_header not in _MF_FIELDS
        _MF_FIELDS[nxm_header] = cls.make
    return cls
442364
def cmd_build(conf: Config, run_tests: bool=False):
    """"""
    build_context = BuildContext(conf)
    populate_targets_graph(build_context, conf)
    build_context.build_graph(run_tests=run_tests)
    build_context.write_artifacts_metadata()