Renders, stages, and uploads a hub.
420335
def upload_hub(hub, host, remote_dir, user=None, port=22, rsync_options=RSYNC_OPTIONS, staging=None):
    
    hub.render()
    if staging is None:
        staging = tempfile.mkdtemp()
    staging, linknames = stage_hub(hub, staging=staging)
    local_dir = os.path.join(staging)
    upload(host, user, local_dir=local_dir, remote_dir=remote_dir, rsync_options=rsync_options)
    return linknames
336056
def build(self):
        """"""

        # If there's no output tube, it means that this stage
        # is at the end of a fork (hasn't been linked to any stage downstream).
        # Therefore, create one output tube.
        if not self._output_tubes:
            self._output_tubes.append(self._worker_class.getTubeClass()())

        self._worker_class.assemble(
            self._worker_args,
            self._input_tube,
            self._output_tubes,
            self._size,
            self._disable_result,
            self._do_stop_task,
            )

        # Build all downstream stages.
        for stage in self._next_stages:
            stage.build()
52715
public function onAfterRevertToLive()
    {
        // Use an alias to get the updates made by $this->publish
        /** @var SiteTree $stageSelf */
        $stageSelf = Versioned::get_by_stage(self::class, Versioned::DRAFT)->byID($this->ID);
        $stageSelf->writeWithoutVersion();

        // Need to update pages linking to this one as no longer broken
        foreach ($stageSelf->DependentPages() as $page) {
            /** @var SiteTree $page */
            $page->writeWithoutVersion();
        }
    }
600199
def setup(console=False, port=None):
    

    if self._has_been_setup:
        teardown()

    register_plugins()
    register_host()

    self._has_been_setup = True
    print("pyblish: Pyblish loaded successfully.")
656080
function render() {
  var createNodes = require("./create-nodes");
  var createClusters = require("./create-clusters");
  var createEdgeLabels = require("./create-edge-labels");
  var createEdgePaths = require("./create-edge-paths");
  var positionNodes = require("./position-nodes");
  var positionEdgeLabels = require("./position-edge-labels");
  var positionClusters = require("./position-clusters");
  var shapes = require("./shapes");
  var arrows = require("./arrows");

  var fn = function(svg, g) {
    preProcessGraph(g);

    var outputGroup = createOrSelectGroup(svg, "output");
    var clustersGroup = createOrSelectGroup(outputGroup, "clusters");
    var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths");
    var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g);
    var nodes = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes);

    layout(g);

    positionNodes(nodes, g);
    positionEdgeLabels(edgeLabels, g);
    createEdgePaths(edgePathsGroup, g, arrows);

    var clusters = createClusters(clustersGroup, g);
    positionClusters(clusters, g);

    postProcessGraph(g);
  };

  fn.createNodes = function(value) {
    if (!arguments.length) return createNodes;
    createNodes = value;
    return fn;
  };

  fn.createClusters = function(value) {
    if (!arguments.length) return createClusters;
    createClusters = value;
    return fn;
  };

  fn.createEdgeLabels = function(value) {
    if (!arguments.length) return createEdgeLabels;
    createEdgeLabels = value;
    return fn;
  };

  fn.createEdgePaths = function(value) {
    if (!arguments.length) return createEdgePaths;
    createEdgePaths = value;
    return fn;
  };

  fn.shapes = function(value) {
    if (!arguments.length) return shapes;
    shapes = value;
    return fn;
  };

  fn.arrows = function(value) {
    if (!arguments.length) return arrows;
    arrows = value;
    return fn;
  };

  return fn;
}
350890
def frontend(ctx, dev, rebuild, no_install, build_type):
    """"""

    install_frontend(instance=ctx.obj['instance'],
                     forcerebuild=rebuild,
                     development=dev,
                     install=not no_install,
                     build_type=build_type)
522067
def stage(x, staging):
    
    linknames = []

    # Objects that don't represent a file shouldn't be staged
    non_file_objects = (
        track.ViewTrack,
        track.CompositeTrack,
        track.AggregateTrack,
        track.SuperTrack,
        genome.Genome,
    )
    if isinstance(x, non_file_objects):
        return linknames

    # If it's an object representing a file, then render it.
    #
    # Track objects don't represent files, but their documentation does
    linknames.append(x.render(staging))

    if hasattr(x, 'source') and hasattr(x, 'filename'):
        def _stg(x, ext=''):
            # A remote track hosted elsewhere does not need staging. This is
            # defined by a track with a url, but no source or filename.
            if (
                x.source is None
                and x.filename is None
                and getattr(x, 'url', None) is not None
            ):
                return

            linknames.append(
                local_link(x.source + ext, x.filename + ext, staging)
            )

        _stg(x)

        if isinstance(x, track.Track):
            if x.tracktype == 'bam':
                _stg(x, ext='.bai')
            if x.tracktype == 'vcfTabix':
                _stg(x, ext='.tbi')

        if isinstance(x, track.CompositeTrack):
            if x._html:
                _stg(x._html)

    return linknames
187110
public function process ()
		{
			if (!empty( $this->_params ))
			{
				if ($this->getIsUploading())
					$this->uploadChunk();
				else
					$this->testChunk();
			}
		}
338857
public function deployArtifactsGenerate()
    {
        $this->startTimer();

        $this->printStageInfo('GENERATE ASSETS');

        $this->printTaskInfo('SET PRODUCTION MODE');
        $this->taskMagentoSetProductionMode()->run();

        $this->printTaskInfo('MAGENTO SETUP DI COMPILE');
        $this->taskMagentoSetupDiCompile()->run();

        $this->printTaskInfo('COMPOSER DUMP AUTOLOAD');
        $this->taskMagentoDumpAutoload()->run();

        $this->printTaskInfo('MAGENTO SETUP STATIC CONTENT DEPLOY');
        $this->taskMagentoSetupStaticContentDeploy()->run();

        $this->printTaskInfo('GENERATE ARTIFACTS');
        $this->taskArtifactCreatePackages()->run();

        $this->stopTimer();
        $this->printRuntime(__FUNCTION__);
    }
1368764
def load(self):
        
        publish = self._get_publish()
        self.architectures = publish['Architectures']
        for source in publish['Sources']:
            component = source['Component']
            snapshot = source['Name']
            self.publish_snapshots.append({
                'Component': component,
                'Name': snapshot
            })

            snapshot_remote = self._find_snapshot(snapshot)
            for source in self._get_source_snapshots(snapshot_remote, fallback_self=True):
                self.add(source, component)
869651
def workflow_move_stage(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/moveStage' % object_id, input_params, always_retry=always_retry, **kwargs)
287491
protected function render ()
  {
    $prop   = $this->props;
    $assets = $this->context->getAssetsService ();

    if (exists ($prop->var))
      $assets->addInlineScript (sprintf ('var %s=%s;', $prop->var, javascriptLiteral ($prop->export, false)));

    elseif (exists ($prop->src))
      $assets->addScript ($prop->src, $this->props->prepend);

    elseif ($this->hasChildren ())
      $assets->addInlineScript (self::getRenderingOfSet ($this->getChildren ()), $prop->name, $this->props->prepend);
  }
971850
function outstreamRender(bid) {
  bid.renderer.push(() => {
    window.VOutstreamAPI.initOutstreams([{
      width: bid.width,
      height: bid.height,
      vastUrl: bid.vastUrl,
      elId: bid.adUnitCode
    }]);
  });
}
989523
protected function publishAssets()
    {
        $assets = [];

        foreach ($this->assets as $location => $asset) {
            $assets[$this->basePath($location)] = base_path($asset);
        }

        $this->publishes($assets);
    }
726280
def workflow_add_stage(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addStage' % object_id, input_params, always_retry=always_retry, **kwargs)
138302
function () {
    var projectPath = path.resolve(cwd, './__publish__');
    projectPublishRoot = projectPath;
    if (!fs.existsSync(path.resolve(cwd, './__publish__'))) {
        fs.mkdirSync(path.resolve(cwd, './__publish__'));
    }
    fs.mkdirSync(projectPath + '/styles');
    fs.mkdirSync(projectPath + '/scripts');
    fs.mkdirSync(projectPath + '/statics');

    pageToPublish.forEach(function (subPage) {
        var dirPath = getPageDir(subPage);
        if (!fs.existsSync(dirPath)) {
            shell.mkdir('-p', dirPath);
        }
    });
}
102380
def upload():
    """"""
    try:
        o = check_output(['twine', 'upload'] + glob('dist/*'))
    except CalledProcessError:
        call(['twine', 'upload'] + glob('dist/*'))
        raise
    print(o.decode('utf-8'))