Setup the application, assigns all the packages, config,
routes
770636
public function setup()
    {
        $this->request = new Request();
        $this->response = new Response();
        $this->env = new Environment();
        $this->mode = $this->env->getMode();
        if (!$this->env->isProduction() || $this->cache == null) {
            $this->cache = new AdapterNull();
        }
        $this->loadPackages();
        $this->loadConfig();
        // @codeCoverageIgnoreStart
        if (array_key_exists('ini.set', $this->config)) {
            foreach ($this->config['ini.set'] as $iniName => $iniValue) {
                ini_set($iniName, $iniValue);
            }
        }
        // @codeCoverageIgnoreEnd
        $this->loadRoutes();
        $this->isSetup = true;
    }
1089050
def set_up(self):
        """"""
        self.path.profile = self.path.gen.joinpath("profile")

        if not self.path.profile.exists():
            self.path.profile.mkdir()

        self.python = hitchpylibrarytoolkit.project_build(
            "strictyaml",
            self.path,
            self.given["python version"],
            {"ruamel.yaml": self.given["ruamel version"]},
        ).bin.python

        self.example_py_code = (
            ExamplePythonCode(self.python, self.path.gen)
            .with_code(self.given.get("code", ""))
            .with_setup_code(
                self.given.get("setup", "")
            )
            .with_terminal_size(160, 100)
            .with_strings(
                yaml_snippet_1=self.given.get("yaml_snippet_1"),
                yaml_snippet=self.given.get("yaml_snippet"),
                yaml_snippet_2=self.given.get("yaml_snippet_2"),
                modified_yaml_snippet=self.given.get("modified_yaml_snippet"),
            )
        )
1045340
protected function setUp()
    {
        if (empty($this->asset)) {
            return;
        }

        $this->asset = $this->normalizePath($this->asset);
        $this->realPath = $this->locateResource();

        // The asset has not been located, so the full path is the asset itself
        if (null === $this->realPath) {
            $this->realPath = $this->asset;
        }
        $this->absolutePath = $this->retrieveBundleWebFolder();
    }
1019950
def setup(self):
    
    return self._load_plugins(
      self._working_set,
      self._bootstrap_options.pythonpath,
      self._bootstrap_options.plugins,
      self._bootstrap_options.backend_packages
    )
785173
def create_app(settings):
    """"""
    app = Flask(__name__)

    # Import settings from file
    for name in dir(settings):
        value = getattr(settings, name)
        if not (name.startswith('_') or isinstance(value, ModuleType)
                or isinstance(value, FunctionType)):
            app.config[name] = value

    # Bootstrapping
    if 'INSTALLED_APPS' in app.config:
        app.installed_apps = app.config.get('INSTALLED_APPS', [])

    # Extensions
    Funnel(app)
    Mobility(app)

    # Register blueprints
    for app_path in app.installed_apps:
        app.register_blueprint(
            getattr(__import__('{0}.views'.format(app_path),
                               fromlist=['blueprint']),
                    'blueprint'))

    # Register error handlers
    register_error_handlers(app)

    @app.context_processor
    def context_processor():
        return dict(config=app.config)

    @app.teardown_request
    def teardown_request(exception=None):
        # Remove the database session if it exists
        if hasattr(app, 'db_session'):
            app.db_session.close()

    return app
1050599
def Setup():
    '''
    

    '''

    if not os.path.exists(os.path.join(EVEREST_DAT, 'k2', 'cbv')):
        os.makedirs(os.path.join(EVEREST_DAT, 'k2', 'cbv'))
    GetK2Stars(clobber=False)
191562
private function setup()
    {
        self::$version = '3.1.7';
        self::$src = dirname(__FILE__);
        self::$dir = dirname(dirname(__FILE__));
        self::$url = $this->getCuztomUrl(self::$src);

        // Do
        do_action('cuztom_setup');
    }
15044
private function setupApp()
    {
        if ($this->session instanceof \SessionHandlerInterface)
        {
            $serverStack = new SessionProvider(
                new WampServer(
                    $this->getContainer()->get("jdare_clank.clank_app")
                ),
                $this->session
            );

        }else{
            $serverStack = new WampServer(
                $this->getContainer()->get("jdare_clank.clank_app")
            );
        }


        $this->app = new WsServer(
            $serverStack
        );
    }
894415
protected function installPackage()
    {
        if ($this->confirm('Do you want publish the pingpong/admin\'s migrations ?')) {
            $this->call('admin:migration');
        }

        if ($this->confirm('Do you want publish the pingpong/trusty\'s migrations ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Trusty\TrustyServiceProvider',
            ]);
        }

        if ($this->confirm('Do you want run all migrations now ?')) {
            $this->call('migrate');
        }

        if ($this->confirm('Do you want run the pingpong/admin\'s seeders now ?')) {
            $this->call('admin:seed');
        }

        if ($this->confirm('Do you want publish configuration files from pingpong/admin package ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Admin\AdminServiceProvider',
                ['--tag' => ['config']],
            ]);
        }

        if ($this->confirm('Do you want publish assets from pingpong/admin package ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Admin\AdminServiceProvider',
                ['--tag' => ['assets']],
            ]);
        }

        if ($this->confirm('Do you want create the app/menus.php file ?')) {
            $this->installMenus();
        }

        $this->call('optimize');
    }
412780
def setup_application (self):
    
    # figure out precise method name, specific to this use
    name = 'configure_%s_app' % self.parent.name
    # call generic set up method
    getattr(self.method, 'configure_app', self._no_op_setup)(self, self.parser)
    # call specific set up method
    getattr(self.method, name, self._no_op_setup)(self, self.parser)
297741
def load_config_from_setup(app):
    
    # for now, assume project root is one level up
    root = os.path.join(app.confdir, '..')
    setup_script = os.path.join(root, 'setup.py')
    fields = ['--name', '--version', '--url', '--author']
    dist_info_cmd = [sys.executable, setup_script] + fields
    output = subprocess.check_output(
        dist_info_cmd,
        cwd=root,
        universal_newlines=True,
    )
    outputs = output.strip().split('\n')
    project, version, url, author = outputs
    app.config.project = project
    app.config.version = app.config.release = version
    app.config.package_url = url
    app.config.author = app.config.copyright = author
1099662
def setup(self, options=None, extractor=None):
        
        # Get our programmatic options
        self._util.use_options(options, extractor)

        # Overwrite non defaults in self.values with values from config
        self._util.use_config_file()
437575
def _setup(app, *, schema,  title=None, app_key=APP_KEY, db=None):
    """"""

    admin = web.Application(loop=app.loop)
    app[app_key] = admin
    loader = jinja2.FileSystemLoader([TEMPLATES_ROOT, ])
    aiohttp_jinja2.setup(admin, loader=loader, app_key=TEMPLATE_APP_KEY)

    if title:
        schema.title = title

    resources = [
        init(db, info['table'], url=info['url'])
        for init, info in schema.resources
    ]

    admin_handler = AdminOnRestHandler(
        admin,
        resources=resources,
        loop=app.loop,
        schema=schema,
    )

    admin['admin_handler'] = admin_handler
    setup_admin_on_rest_handlers(admin, admin_handler)

    return admin
765615
@Before
    public void setUp() {
        defineApplicationLocales();

        clearKeys();

        List<Key> keys = new ArrayList<>();
        keys.add(createKey(KEY_DEFAULT, false, false, false));

        Key outdatedKey = createKey(KEY_OUTDATED, false, false, false);
        outdatedKey.setOutdated();
        keys.add(outdatedKey);

        keys.add(createKey(KEY_TLN_APPROX, true, false, false));
        keys.add(createKey(KEY_TLN_OUTDATED, false, true, false));
        keys.add(createKey(KEY_TLN_MISSING, false, false, true));

        Key key = keyFactory.createKey(KEY_WITH_MISSING_TRANSLATION);
        key.addTranslation(FR, TRANSLATION_FR);
        keys.add(key);

        for (Key keyToPersist : keys) {
            keyRepository.add(keyToPersist);
        }
    }
818653
public function setup()
    {
        $this->di->set('config', $this->config);

        $this->initEnvironment($this->config);
        $this->initErrorHandler($this->config);
        $this->initLoader($this->config);
        $this->initModules($this->config);
        $this->initRoutes($this->config);
        $this->initServices($this->config);
        $this->initDispatcher();

        $this->application->setDI($this->di);
        DI::setDefault($this->di);

        return $this;
    }
465524
def setup(app):
    ""
    app.add_config_value("sphinx_to_github", True, '')
    app.add_config_value("sphinx_to_github_verbose", True, '')
    app.connect("build-finished", sphinx_extension)
1106194
def setup!
      return self if @app_is_setup
      puts "Hatchet setup: #{name.inspect} for #{repo_name.inspect}"
      create_git_repo! unless is_git_repo?
      create_app
      set_labs!
      buildpack_list = @buildpacks.map { |pack| { buildpack: pack } }
      api_rate_limit.call.buildpack_installation.update(name, updates: buildpack_list)
      set_config @app_config

      call_before_deploy
      @app_is_setup = true
      self
    end