Initialize a new scenario for use with Molecule.
429982
def scenario(ctx, dependency_name, driver_name, lint_name, provisioner_name,
             role_name, scenario_name, verifier_name):  # pragma: no cover
    
    command_args = {
        'dependency_name': dependency_name,
        'driver_name': driver_name,
        'lint_name': lint_name,
        'provisioner_name': provisioner_name,
        'role_name': role_name,
        'scenario_name': scenario_name,
        'subcommand': __name__,
        'verifier_name': verifier_name,
    }

    if verifier_name == 'inspec':
        command_args['verifier_lint_name'] = 'rubocop'

    if verifier_name == 'goss':
        command_args['verifier_lint_name'] = 'yamllint'

    if verifier_name == 'ansible':
        command_args['verifier_lint_name'] = 'ansible-lint'

    s = Scenario(command_args)
    s.execute()
874608
private static void initMapNucleotidesNaturalAnalog() throws FastaFormatException, ChemistryException {
		try {
			nucleotidesNaturalAnalog = MonomerFactory.getInstance().getMonomerDB().get("RNA");
		} catch (IOException e) {
			e.printStackTrace();
			LOG.error("Nucleotides can not be initialized");
			throw new FastaFormatException(e.getMessage());
		}
	}
932642
def init_with_context(self, context):
        
        super(AppIconList, self).init_with_context(context)
        apps = self.children

        # Standard model only has a title, change_url and add_url.
        # Restore the app_name and name, so icons can be matched.
        for app in apps:
            app_name = self._get_app_name(app)
            app['name'] = app_name

            for model in app['models']:
                try:
                    model_name = self._get_model_name(model)
                    model['name'] = model_name
                    model['icon'] = self.get_icon_for_model(app_name, model_name) or appsettings.FLUENT_DASHBOARD_DEFAULT_ICON
                except ValueError:
                    model['icon'] = appsettings.FLUENT_DASHBOARD_DEFAULT_ICON

                # Automatically add STATIC_URL before relative icon paths.
                model['icon'] = self.get_icon_url(model['icon'])
                model['app_name'] = app_name
797209
def init_app(self, app):
        """"""
        app.extensions['invenio-documents'] = self
        app.cli.add_command(cmd)
208217
def init_app(self, app):
        """"""
        self.init_config(app)
        app.extensions['invenio-pidrelations'] = _InvenioPIDRelationsState(app)
517731
@Override
    public void init(IAtomContainer reactant, IAtomContainer product, boolean removeHydrogen,
            boolean cleanAndConfigureMolecule) throws CDKException {
        this.removeHydrogen = removeHydrogen;
        init(new MolHandler(reactant, removeHydrogen, cleanAndConfigureMolecule), new MolHandler(product,
                removeHydrogen, cleanAndConfigureMolecule));
    }
512163
async def init(self, name, conf=None):
        '''
        
        '''
        tank = self.tanks.get(name)
        if tank is not None:
            return tank

        iden = s_common.guid()

        logger.info('Creating new tank: %s', name)

        path = s_common.genpath(self.dirn, 'tanks', iden)

        tank = await CryoTank.anit(path, conf)

        node = await self.names.open((name,))
        await node.set((iden, conf))

        self.tanks.put(name, tank)

        return tank
703739
def _init(self):
        '''
        
        '''
        num = 0
        for field in self._fields:
            field._initialize()
            self._need_second_pass |= field._need_second_pass
        for field in self._fields:
            num += field.num_mutations()
        self._calculate_mutations(num)
        self._initialize_default_buffer()
1305128
def _set_up_context(cls):
        """"""
        cls.context = AttributeDict()
        cls.context.new_meta = {}
        cls.context.new_transitions = {}
        cls.context.new_methods = {}
942037
public static IAtomContainer createNewMolecule(IChemModel chemModel) {
        // Add a new molecule either the set of molecules
        IAtomContainer molecule = chemModel.getBuilder().newInstance(IAtomContainer.class);
        if (chemModel.getMoleculeSet() != null) {
            IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
            for (int i = 0; i < moleculeSet.getAtomContainerCount(); i++) {
                if (moleculeSet.getAtomContainer(i).getAtomCount() == 0) {
                    moleculeSet.removeAtomContainer(i);
                    i--;
                }
            }
            moleculeSet.addAtomContainer(molecule);
        } else {
            IAtomContainerSet moleculeSet = chemModel.getBuilder().newInstance(IAtomContainerSet.class);
            moleculeSet.addAtomContainer(molecule);
            chemModel.setMoleculeSet(moleculeSet);
        }
        return molecule;
    }
1118490
def init_app(self, app, **kwargs):
        """"""
        self.kwargs.update(kwargs)
        self.settings = self.dynaconf_instance or LazySettings(**self.kwargs)
        app.config = self.make_config(app)
        app.dynaconf = self.settings
781482
def init_app(self, app):
        """"""
        self.init_config(app)

        # Register current_profile
        app.context_processor(lambda: dict(
            current_userprofile=current_userprofile))

        app.extensions['invenio-userprofiles'] = self
1141583
def init_app(self, app):
        """"""
        assert 'zodb' not in app.extensions, \
               'app already initiated for zodb'
        app.extensions['zodb'] = _ZODBState(self, app)
        app.teardown_request(self.close_db)
320067
def init_app(self, app, entry_point_group='invenio_previewer.previewers'):
        """"""
        self.init_config(app)
        app.register_blueprint(blueprint)
        state = _InvenioPreviewerState(
            app,
            entry_point_group=entry_point_group)
        app.extensions['invenio-previewer'] = state
        return state
1213952
def init_db(self, app, entry_point_group='invenio_db.models', **kwargs):
        """"""
        # Setup SQLAlchemy
        app.config.setdefault(
            'SQLALCHEMY_DATABASE_URI',
            'sqlite:///' + os.path.join(app.instance_path, app.name + '.db')
        )
        app.config.setdefault('SQLALCHEMY_ECHO', False)

        # 
        database = kwargs.get('db', db)
        database.init_app(app)

        # Initialize versioning support.
        self.init_versioning(app, database, kwargs.get('versioning_manager'))

        # Initialize model bases
        if entry_point_group:
            for base_entry in pkg_resources.iter_entry_points(
                    entry_point_group):
                base_entry.load()

        # All models should be loaded by now.
        sa.orm.configure_mappers()
        # Ensure that versioning classes have been built.
        if app.config['DB_VERSIONING']:
            manager = self.versioning_manager
            if manager.pending_classes:
                if not versioning_models_registered(manager, database.Model):
                    manager.builder.configure_versioned_classes()
            elif 'transaction' not in database.metadata.tables:
                manager.declarative_base = database.Model
                manager.create_transaction_model()
                manager.plugins.after_build_tx_class(manager)
466099
def init():
    """"""
    global app
    if app: return app
    conf.init(), db.init(conf.DbPath, conf.DbStatements)

    bottle.TEMPLATE_PATH.insert(0, conf.TemplatePath)
    app = bottle.default_app()
    bottle.BaseTemplate.defaults.update(get_url=app.get_url)
    return app
428294
private void initialize() {
        // these pairs will be transformed
        addTransformationPair( GroupElement.NOT,
                               new NotOrTransformation() );
        addTransformationPair( GroupElement.EXISTS,
                               new ExistOrTransformation() );
        addTransformationPair( GroupElement.AND,
                               new AndOrTransformation() );
    }